On Mon, Jan 07, 2019 at 03:49:47PM +0000, Stuart Henderson wrote: > On 2019/01/07 16:42, Antoine Jacoutot wrote: > > On Mon, Jan 07, 2019 at 04:35:51PM +0100, Matthieu Herrb wrote: > > > Hi, > > > > > > Trying to build some ports on macppc, glib2 is now broken: > > > > > > FAILED: glib/4430778@@glib-2.0@sha/gatomic.c.o > > > cc -Iglib/4430778@@glib-2.0@sha -Iglib -I../glib-2.58.2/glib -I. > > > -I../glib-2.58.2/ -I/usr/local/include -pipe -D_FILE_OFFSET_BITS=64 > > > -std=gnu89 -D_GNU_SOURCE -fno-strict-aliasing -Wall -Wstrict-prototypes > > > -Wunused -Wno-bad-function-cast -Werror=declaration-after-statement > > > -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self > > > -Werror=missing-include-dirs -Werror=missing-prototypes > > > -Werror=pointer-arith -O2 -g -fPIC -pthread '-DG_LOG_DOMAIN="GLib"' > > > -DGLIB_COMPILATION -fvisibility=hidden -MD -MQ > > > 'glib/4430778@@glib-2.0@sha/gatomic.c.o' -MF > > > 'glib/4430778@@glib-2.0@sha/gatomic.c.o.d' -o > > > 'glib/4430778@@glib-2.0@sha/gatomic.c.o' -c ../glib-2.58.2/glib/gatomic.c > > > ../glib-2.58.2/glib/gatomic.c:675:2: error: #error G_ATOMIC_LOCK_FREE > > > defined, but incapable of lock-free atomics. > > > ninja: build stopped: subcommand failed. > > > > Probably a broken test at configure time? > > > > -- > > Antoine > > > > This is the one landry ran into the other day I think?
Yes that's the one. https://gitlab.gnome.org/GNOME/glib/blob/master/glib/gatomic.c#L675 is where it barfs. https://gitlab.gnome.org/GNOME/glib/blob/master/meson.build#L1578 might have to be tested for OpenBSD. from what i understood reading https://gitlab.gnome.org/GNOME/glib/blob/master/meson.build#L1562 meson links int main() { volatile int atomic = 2; __sync_bool_compare_and_swap (&atomic, 2, 3); return 0; } to check that atomic ops are supported but later on __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 isnt defined for some reason and the #ifdef explodes in gatomic.c. note that it also affects sparc64, and probably all non-clang archs. on the bright side the current sparc64 & macppc bulks will have a fast turnaround, as not having glib2 cuts a good chunk of the tree. Landry
