glib 2.58.2 broken on powerpc (missing atomic ops ?)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

glib 2.58.2 broken on powerpc (missing atomic ops ?)

Matthieu Herrb-7
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.

--
Matthieu Herrb

Reply | Threaded
Open this post in threaded view
|

Re: glib 2.58.2 broken on powerpc (missing atomic ops ?)

Antoine Jacoutot-7
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

Reply | Threaded
Open this post in threaded view
|

Re: glib 2.58.2 broken on powerpc (missing atomic ops ?)

Stuart Henderson
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?

I've seen similar before where an autoconf script does a test compile
(to a .o) but doesn't try linking and/or running it so the error doesn't
show up.

Reply | Threaded
Open this post in threaded view
|

Re: glib 2.58.2 broken on powerpc (missing atomic ops ?)

Matthieu Herrb-7
In reply to this post by Antoine Jacoutot-7
On Mon, Jan 07, 2019 at 04:42:26PM +0100, 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?

The full log is here : http://herrb.eu/glib2-2.58.2p0.log

Intesting lines:

meson.build:1534: WARNING: Unknown host cpu: macppc
Checking if "atomic ops" links: YES

--
Matthieu Herrb

Reply | Threaded
Open this post in threaded view
|

Re: glib 2.58.2 broken on powerpc (missing atomic ops ?)

Stuart Henderson
On 2019/01/07 16:57, Matthieu Herrb wrote:

> On Mon, Jan 07, 2019 at 04:42:26PM +0100, 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?
>
> The full log is here : http://herrb.eu/glib2-2.58.2p0.log
>
> Intesting lines:
>
> meson.build:1534: WARNING: Unknown host cpu: macppc
> Checking if "atomic ops" links: YES
>
> --
> Matthieu Herrb
>

You should have ${WRKDIR}/build-*/meson-logs/meson-log.txt with the results
of the compiler tests, which may give a clue ..

Reply | Threaded
Open this post in threaded view
|

Re: glib 2.58.2 broken on powerpc (missing atomic ops ?)

Landry Breuil-5
In reply to this post by Stuart Henderson
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