gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] Fedora 24, gcc 6.1.1 - 'memory_order_seq_cst' was not dec


From: Robert Norris
Subject: Re: [gpsd-dev] Fedora 24, gcc 6.1.1 - 'memory_order_seq_cst' was not declared in this scope
Date: Fri, 30 Dec 2016 21:41:31 +0000


This is still failing to compile gpsd for me (gcc version 6.2.1 20161215 (Debian 6.2.1-7) ) from the latest git head:


In file included from clock_gettime.c:10:0:
compiler.h: In function 'void memory_barrier()':
compiler.h:93:25: error: 'memory_order_seq_cst' was not declared in this scope
     atomic_thread_fence(memory_order_seq_cst);

Shoving 'std::' in front of memory_order_seq_cst on line 93 of compiler.h seems to make it work on my system.


Hopefully someone with access to other systems can check to see if this is the simplest fix for all distributions.


--
Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.

From: gpsd-dev <gpsd-dev-bounces+address@hidden> on behalf of Robert Norris <address@hidden>
Sent: 27 September 2016 22:21:28
Cc: gpsd dev
Subject: Re: [gpsd-dev] Fedora 24, gcc 6.1.1 - 'memory_order_seq_cst' was not declared in this scope
 

On my Debian system with gcc 6.2, I can use the fix as per Debian (see https://github.com/bzed/pkg-gpsd/commit/1444f940b802341a507258031eee6fde75bedf1f)


Although this leads to lots of warnings on every compilation with gcc:

"cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C"


Using this method both CFLAGS and CXXFLAGS seem to need setting. (Just setting CXXFLAGS doesn't seem to work - even if the compile failure is in using g++ for the qt build).


I don't understand enough about the C++ namespacing, but shoving 'std::' in front of memory_order_seq_cst on line 93 of compiler.h seems to make it work on my system.


No idea why it would should need this or why previously/other systems work without it.


--
Be Seeing You - Rob.
If at first you don't succeed,
then skydiving isn't for you.



From: gpsd-dev <gpsd-dev-bounces+address@hidden> on behalf of Gary E. Miller <address@hidden>
Sent: 27 September 2016 03:50
To: Jason Azze
Cc: gpsd dev
Subject: Re: [gpsd-dev] Fedora 24, gcc 6.1.1 - 'memory_order_seq_cst' was not declared in this scope
 
Yo Jason!

Sorry, I got behind on my email.  has this been handled?

On Sun, 18 Sep 2016 08:49:13 -0400
Jason Azze <address@hidden> wrote:

> Summary: Build of release-3.16-486-ga3ff750 broken on Fedora 24 (Linux
> 4.7.3) using gcc 6.1.1, glibc 2.23
>
> Probably identical to this Debian bug:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830993
>
> Apologies if this is a repeat report. I know we've seen problems on
> Fedora with our old friend, atomic_thread_fence, before. I was trying
> to see if I could reproduce (with Fedora) some build errors with the
> Debian gcc 6 build that bzed re-reported on irc last night. I got
> these errors instead. This means gpsd won't build on the latest Fedora
> or Debian releases using their default gcc.
>
> In file included from clock_gettime.c:10:0:
> compiler.h: In function 'void memory_barrier()':
> compiler.h:93:25: error: 'memory_order_seq_cst' was not declared in
> this scope atomic_thread_fence(memory_order_seq_cst);
>                          ^~~~~~~~~~~~~~~~~~~~
> compiler.h:93:25: note: suggested alternative:
> In file included from /usr/include/c++/6.1.1/atomic:41:0,
>                  from compiler.h:75,
>                  from clock_gettime.c:10:
> /usr/include/c++/6.1.1/bits/atomic_base.h:62:7: note:
> 'memory_order_seq_cst' memory_order_seq_cst
>        ^~~~~~~~~~~~~~~~~~~~
> In file included from clock_gettime.c:10:0:
> compiler.h:93:45: error: 'atomic_thread_fence' was not declared in
> this scope atomic_thread_fence(memory_order_seq_cst);
>                                              ^
> compiler.h:93:45: note: suggested alternative:
> In file included from /usr/include/c++/6.1.1/atomic:41:0,
>                  from compiler.h:75,
>                  from clock_gettime.c:10:
> /usr/include/c++/6.1.1/bits/atomic_base.h:101:3: note:
> 'std::atomic_thread_fence'
>    atomic_thread_fence(memory_order __m) noexcept
>    ^~~~~~~~~~~~~~~~~~~
> scons: *** [qt-clock_gettime.os] Error 1
> scons: building terminated because of errors.
>
> I have attached a gzipped (to protect from munging in transit) report
> with more detail.
> Or see it here: http://hastebin.com/raw/izeruqefuv




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

reply via email to

[Prev in Thread] Current Thread [Next in Thread]