[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] SHM broken
From: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] SHM broken |
Date: |
Mon, 23 Mar 2015 22:16:16 -0700 |
Yo Hal!
On Mon, 23 Mar 2015 21:04:33 -0700
Hal Murray <address@hidden> wrote:
> I noticed a SHM warning in a log file.
Yup.
> It's right after the can't find libkern/OSAtomic.h message so
> it looks like SHM depends on a strange file I 've never heard of
> before.
Yup. gpsd has memory barriers if you have gcc C11 compatibity, or if
you have the OSAtomic.h file. The header file is only on OS X.
> From the log file:
> Checking if compiler is C11 ...(cached) no
Your gcc does not support C11
> Checking for C header file libkern/OSAtomic.h... (cached) no
You are not on a recent OS X.
> No memory barriers - SHM export and time hinting may not be
> reliable.
Thus no memory barriers, which are a recent addition.
I see that on RasPi running Debian Wheezy. Gentoo unstable is C11, so
has memory barriers.
> Looking at the code in SConstruct
> # check for C11 or better, and __STDC__NO_ATOMICS__ is no defined
> # before looking for stdatomic.h
>
> gpsd_config.h says:
> /* #undef HAVE_STDATOMIC_H */
> /* #undef HAVE_OSATOMIC_H */
Yup, that is correct.
> I've got an up to date Fedora box.
> gcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)
> /usr/lib/gcc/i686-redhat-linux/4.9.2/include/stdatomic.h
Well, except RedHat gcc 4.9.2 is not the same a Gnu gcc 4.9.2
RedHat always plays games with version numerbers and upstream version
numbers.
Last I checked RedHat gcc 4.9.2 was not C11 by default, thus no memory
barriers. GNU gcc 4.9.2 is C11 by default, thus memory barriers.
> google found stuff with "-std=c11" on the command line for gcc. The
> man page for gcc says the default is gnu89 with lots of fine print.
> grep -w doesn't find any "std" in SConstruct.
Lost me. Your point is? Other than RedHat is broken?
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
address@hidden Tel:+1(541)382-8588