GNOME Bugzilla – Bug 693299
cannot compile on Solaris: error in gbitlock.c
Last modified: 2014-01-20 13:44:14 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
(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?
- 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.