[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] cannot build qemu with "--static" configure option
From: |
Mr Dash Four |
Subject: |
Re: [Qemu-devel] cannot build qemu with "--static" configure option |
Date: |
Wed, 23 Nov 2011 23:02:42 +0000 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20110312) |
>> $ make V=1
>> gcc -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
>> -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef
>> -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing
>> -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body
>> -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self
>> -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition
>> -Wtype-limits -I../linux-headers -I..
>> -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/target-i386 -DNEED_CPU_H -pthread
>> -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
>> -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user/x86_64
>> -I/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/linux-user -O2 -g
>> -Wl,--warn-common -m64 -static -g -Wl,-T../config-host.ld
>> -Wl,-T,/home/jcmvbkbc/ws/m/awt/emu/xtensa/qemu/x86_64.ld -o qemu-x86_64
>> ../libdis-user/i386-dis.o ../libuser/cache-utils.o ../libuser/cutils.o
>> ../libuser/envlist.o ../libuser/host-utils.o ../libuser/path.o
>> ../libuser/tcg-runtime.o ../lib
user/trace.o ../libuser/trace/control.o ../libuser/trace/default.o cpu-exec.o
cpu-uname.o cpuid.o disas.o elfload.o exec.o fpu/softfloat.o gdbstub.o helper.o
ioport-user.o linuxload.o main.o mmap.o op_helper.o osdep.o oslib-posix.o
qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o tcg/tcg.o
thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt -pthread
-pthread -lgthread-2.0 -lrt -lglib-2.0 -lm
>>
>> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24):
>> undefined reference to `glib_mem__alloc_semaphore'
>> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x7c):
>> undefined reference to `glib_mem__alloc_semaphore'
>> /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd0):
>> undefined reference to `glib_mem__alloc_semaphore'
> ...
>
> It appears to be glib2 issue:
> https://bugzilla.gnome.org/show_bug.cgi?id=654078
Spot on, unfortunately! This is what I now have after applying your patch
(thank you!):
gcc -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef
-Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing
-fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body
-Wnested-externs -Wformat-security -Wformat-y2k -Winit-self
-Wignored-qualifiers -Wold-style-declaration -Wold-style-definition
-Wtype-limits -I../linux-headers -I.. -I/home/gogo/t/qemu-1.0-rc3/target-arm
-DNEED_CPU_H -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/home/gogo/t/qemu-1.0-rc3/linux-user/arm
-I/home/gogo/t/qemu-1.0-rc3/linux-user -O2 -g -Wl,--warn-common -m64 -static
-g -Wl,-T../config-host.ld -Wl,-T,/home/gogo/t/qemu-1.0-rc3/x86_64.ld -o
qemu-arm ../libdis-user/arm-dis.o ../libdis-user/i386-dis.o
../libuser/cache-utils.o ../libuser/cutils.o ../libuser/envlist.o
../libuser/host-utils.o ../libuser/path.o ../libuser/tcg-runtime.o
../libuser/trace.o ../libuser/trace/control.o .
./libuser/trace/default.o arm-semi.o cpu-exec.o cpu-uname.o disas.o elfload.o
exec.o flatload.o fpu/softfloat.o gdbstub-xml.o gdbstub.o helper.o
iwmmxt_helper.o linuxload.o main.o mmap.o neon_helper.o nwfpe/double_cpdo.o
nwfpe/extended_cpdo.o nwfpe/fpa11.o nwfpe/fpa11_cpdo.o nwfpe/fpa11_cpdt.o
nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o op_helper.o osdep.o
oslib-posix.o qemu-thread-posix.o signal.o strace.o syscall.o tcg/optimize.o
tcg/tcg.o thunk.o translate-all.o translate.o uaccess.o user-exec.o -lrt
-pthread -pthread -lgthread-2.0 -lrt -lglib-2.0 -lm
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o):
In function `g_get_any_init_do':
(.text+0x11bc): warning: Using 'getpwuid' in statically linked applications
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o):
In function `g_get_any_init_do':
(.text+0x11b0): warning: Using 'setpwent' in statically linked applications
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o):
In function `g_get_any_init_do':
(.text+0x11c6): warning: Using 'endpwent' in statically linked applications
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o):
In function `g_get_any_init_do':
(.text+0xefa): warning: Using 'getpwnam_r' in statically linked applications
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gutils.o):
In function `g_get_any_init_do':
(.text+0xf36): warning: Using 'getpwuid_r' in statically linked applications
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libpthread.a(libpthread.o):
In function `sem_open':
(.text+0x75dd): warning: the use of `mktemp' is dangerous, better use `mkstemp'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x24):
undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x80):
undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0xd8):
undefined reference to `glib_mem__free_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x11c):
undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x178):
undefined reference to `glib_mem__realloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x1d0):
undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x228):
undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x27c):
undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gmem.o):(.note.stapsdt+0x2d4):
undefined reference to `glib_mem__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gslice.o):(.note.stapsdt+0x24):
undefined reference to `glib_slice__alloc_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gslice.o):(.note.stapsdt+0x70):
undefined reference to `glib_slice__free_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x24):
undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x70):
undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0xbc):
undefined reference to `glib_quark__new_semaphore'
/usr/lib/gcc/x86_64-redhat-linux/4.4.5/../../../../lib64/libglib-2.0.a(gdataset.o):(.note.stapsdt+0x108):
undefined reference to `glib_quark__new_semaphore'
collect2: ld returned 1 exit status
make[1]: *** [qemu-arm] Error 1
make[1]: Leaving directory `/home/gogo/t/qemu-1.0-rc3/arm-linux-user'
make: *** [subdir-arm-linux-user] Error 2
Is there any solution to this?
> In the latest F15 it's not fixed. Mr-4, probably you will not escape
> re-compiling, if not even patching glib2.
I am not afraid of doing that as long as it works and helps me out. Should I
see/try whether it has been fixed in rawhide?
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, (continued)
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Peter Maydell, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Peter Maydell, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Max Filippov, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Peter Maydell, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Max Filippov, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Max Filippov, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option,
Mr Dash Four <=
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Max Filippov, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Peter Maydell, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Max Filippov, 2011/11/24
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/24
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Paolo Bonzini, 2011/11/24
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/24
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Mr Dash Four, 2011/11/23
- Re: [Qemu-devel] cannot build qemu with "--static" configure option, Max Filippov, 2011/11/23