After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 693299 - cannot compile on Solaris: error in gbitlock.c
cannot compile on Solaris: error in gbitlock.c
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.33.x
Other Solaris
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-02-07 08:37 UTC by Eugene M. Zheganin
Modified: 2014-01-20 13:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eugene M. Zheganin 2013-02-07 08:37:09 UTC
Env:

OS: Solaris 11.0 x86
GCC: 4.5.2
Glib: 2.33.14

While compiling I get:

Making all in .
gmake[4]: Entering directory `/home/emz/src/glib-2.33.14/glib'
gmake[4]: Nothing to be done for `all-am'.
gmake[4]: Leaving directory `/home/emz/src/glib-2.33.14/glib'
Making all in tests
gmake[4]: Entering directory `/home/emz/src/glib-2.33.14/glib/tests'
  CC     1bit_emufutex-1bit-mutex.o
In file included from 1bit-mutex.c:48:0:
../../glib/gbitlock.c: In function ‘_emufutex_g_bit_lock’:
../../glib/gbitlock.c:210:3: error: ‘asm’ undeclared (first use in this function)
../../glib/gbitlock.c:210:3: note: each undeclared identifier is reported only once for each function it appears in
../../glib/gbitlock.c:210:7: error: expected ‘;’ before ‘volatile’
../../glib/gbitlock.c:218:2: warning: label ‘contended’ defined but not used
../../glib/gbitlock.c: In function ‘_emufutex_g_bit_trylock’:
../../glib/gbitlock.c:283:3: error: ‘asm’ undeclared (first use in this function)
../../glib/gbitlock.c:283:7: error: expected ‘;’ before ‘volatile’
../../glib/gbitlock.c: In function ‘_emufutex_g_bit_unlock’:
../../glib/gbitlock.c:321:3: error: ‘asm’ undeclared (first use in this function)
../../glib/gbitlock.c:321:7: error: expected ‘;’ before ‘volatile’
../../glib/gbitlock.c: In function ‘_emufutex_g_pointer_bit_lock’:
../../glib/gbitlock.c:404:5: error: ‘asm’ undeclared (first use in this function)
../../glib/gbitlock.c:404:9: error: expected ‘;’ before ‘volatile’
../../glib/gbitlock.c:412:2: warning: label ‘contended’ defined but not used
../../glib/gbitlock.c: In function ‘_emufutex_g_pointer_bit_trylock’:
../../glib/gbitlock.c:476:5: error: ‘asm’ undeclared (first use in this function)
../../glib/gbitlock.c:476:9: error: expected ‘;’ before ‘volatile’
../../glib/gbitlock.c: In function ‘_emufutex_g_pointer_bit_unlock’:
../../glib/gbitlock.c:519:5: error: ‘asm’ undeclared (first use in this function)
../../glib/gbitlock.c:519:9: error: expected ‘;’ before ‘volatile’
gmake[4]: *** [1bit_emufutex-1bit-mutex.o] Error 1
gmake[4]: Leaving directory `/home/emz/src/glib-2.33.14/glib/tests'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/home/emz/src/glib-2.33.14/glib'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/emz/src/glib-2.33.14/glib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/emz/src/glib-2.33.14'
gmake: *** [all] Error 2
Comment 1 Dan Winship 2013-02-15 14:47:13 UTC
(In reply to comment #0)
> ../../glib/gbitlock.c: In function ‘_emufutex_g_bit_lock’:
> ../../glib/gbitlock.c:210:3: error: ‘asm’ undeclared (first use in this
> function)

are you compiling with unusual CFLAGS?

Does changing "asm" to "__asm__" in gbitlock.c fix things?
Comment 2 Eugene M. Zheganin 2013-02-15 16:44:29 UTC
- I am compiling with the "-g -m64" CFLAGS and LDFLAGS, to produce 64-bit binaries so all the dependant software can benefit from using way more memory. Are those unusual ? I am compiling all of the other versions of glib with same flags. Some do build, some do not.

- Thanks a lot, it did help, I'm able to pass the crash point. I'm able to build the glib-2.33.14 now.