On 12/03/13 12:15, Paolo Bonzini wrote:
> Il 03/12/2013 14:25, Stefano Stabellini ha scritto:
>> CC'ing Paolo and xen-devel.
>> The original thread is here:
>>
>> http://marc.info/?l=xen-devel&m=135718999710640
>>
>> On Mon, 2 Dec 2013, Don Slutz wrote:
>>> Public bug reported:
>>>
>>> lt LINK libcacard.la
>>> /usr/bin/ld: libcacard/.libs/vcard.o: relocation R_X86_64_PC32 against `vcard_buffer_response_delete' can not be used when making a shared object; recompile with -fPIC
>>> /usr/bin/ld: final link failed: Bad value
>>> collect2: ld returned 1 exit status
>>> make[4]: *** [libcacard.la] Error 1
>>> make[3]: *** [subdir-libcacard] Error 2
> This is a bug in RHEL5 binutils. Configure with --disable-pie to work
> around it.
Any hints or pointers about the bug in RHEL5 binutils? I can try and
make a patch to auto detect this.
That still fails for (7dc65c0 (HEAD, origin/master, origin/HEAD, master)
Open 2.0 development tree):
dcs-xen-53:~/qemu>rm -rf out/tmp;mkdir out/tmp;pushd
out/tmp;../../configure --disable-pie;make V=1 1>zz1 2>&1;popd
~/qemu/out/tmp ~/qemu
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
binary directory /usr/local/bin
library directory /usr/local/lib
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/don/qemu
C compiler cc
Host C compiler cc
C++ compiler c++
Objective-C compiler cc
ARFLAGS rv
CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g
QEMU_CFLAGS -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef
-Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -Wendif-labels
-Wmissing-include-dirs -Wnested-externs -Wformat-security -Wformat-y2k
-Winit-self -Wold-style-definition -fstack-protector-all
-I/usr/include/libpng12 -I/usr/include/nss3 -I/usr/include/nspr4
-pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt
LDFLAGS -Wl,--warn-common -m64 -g
make make
install install
python python
smbd /usr/sbin/smbd
host CPU x86_64
host big endian no
target list alpha-softmmu arm-softmmu cris-softmmu i386-softmmu
lm32-softmmu m68k-softmmu microblaze-softmmu microblazeel-softmmu
mips-softmmu mips64-softmmu mips64el-softmmu mipsel-softmmu
moxie-softmmu or32-softmmu ppc-softmmu ppc64-softmmu ppcemb-softmmu
s390x-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu
unicore32-softmmu x86_64-softmmu xtensa-softmmu xtensaeb-softmmu
alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user
i386-linux-user m68k-linux-user microblaze-linux-user
microblazeel-linux-user mips-linux-user mips64-linux-user
mips64el-linux-user mipsel-linux-user mipsn32-linux-user
mipsn32el-linux-user or32-linux-user ppc-linux-user ppc64-linux-user
ppc64abi32-linux-user s390x-linux-user sh4-linux-user sh4eb-linux-user
sparc-linux-user sparc32plus-linux-user sparc64-linux-user
unicore32-linux-user x86_64-linux-user
tcg debug enabled no
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
-Werror enabled no
pixman system
SDL support yes
GTK support no
curses support yes
curl support yes
mingw32 support no
Audio drivers oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support yes
VNC support yes
VNC TLS support no
VNC SASL support yes
VNC JPEG support yes
VNC PNG support yes
VNC WS support no
xen support yes
brlapi support no
bluez support no
Documentation yes
GUEST_BASE yes
PIE no
vde support no
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support yes
RDMA support no
TCG interpreter no
fdt support yes
preadv support no
fdatasync yes
madvise yes
posix_madvise yes
sigev_thread_id yes
uuid support yes
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
Trace backend nop
Trace output file trace-<pid>
spice support no (/)
rbd support no
xfsctl support no
nss used yes
libusb no
usb net redir no
GLX support yes
libiscsi support no
build guest agent yes
QGA VSS support no
seccomp support no
coroutine backend ucontext
coroutine pool yes
GlusterFS support no
virtio-blk-data-plane no
gcov gcov
gcov enabled no
TPM support no
libssh2 support no
TPM passthrough no
QOM debugging yes
vhdx yes
It is needed to give that flag to the linker as well, but latest
libtool 2.4.2 still swallows that argument, so let's pass it with
libtool -Wc argument.
qemu-1.4.0/stubs/arch-query-cpu-def.c:6: undefined reference to
`__stack_chk_guard'
On 12/03/13 12:15, Paolo Bonzini wrote: marc.info/ ?l=xen- devel&m= 135718999710640 .libs/vcard. o: relocation R_X86_64_PC32 against `vcard_ buffer_ response_ delete' can not be used when making a shared object; recompile with -fPIC
> Il 03/12/2013 14:25, Stefano Stabellini ha scritto:
>> CC'ing Paolo and xen-devel.
>> The original thread is here:
>>
>> http://
>>
>> On Mon, 2 Dec 2013, Don Slutz wrote:
>>> Public bug reported:
>>>
>>> lt LINK libcacard.la
>>> /usr/bin/ld: libcacard/
>>> /usr/bin/ld: final link failed: Bad value
>>> collect2: ld returned 1 exit status
>>> make[4]: *** [libcacard.la] Error 1
>>> make[3]: *** [subdir-libcacard] Error 2
> This is a bug in RHEL5 binutils. Configure with --disable-pie to work
> around it.
Any hints or pointers about the bug in RHEL5 binutils? I can try and
make a patch to auto detect this.
That still fails for (7dc65c0 (HEAD, origin/master, origin/HEAD, master)
Open 2.0 development tree):
... OFFSET_ BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes prototypes aliasing -Wendif-labels -Wmissing- include- dirs definition -fstack- protector- all -I/usr/ include/ libpng12 include/ nspr4 -pthread include/ glib-2. 0 -I/usr/ lib64/glib- 2.0/include include/ pixman- 1 -I/home/ don/qemu/ dtc/libfdt -pthread include/ glib-2. 0 -I/usr/ lib64/glib- 2.0/include don/qemu/ tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g vscclient. o protector- all -lrt -pthread -L/lib64 kerberos/ lib64 -lcurl -ldl OFFSET_ BITS=64 -D_LARGEFILE_SOURCE prototypes -fno-strict- aliasing -Wendif-labels include- dirs -Wnested-externs -Wformat-security -Wformat-y2k definition -fstack- protector- all include/ libpng12 -I/usr/include/nss3 -I/usr/ include/ nspr4 include/ glib-2. 0 -I/usr/ lib64/glib- 2.0/include include/ pixman- 1 -I/home/ don/qemu/ dtc/libfdt -pthread include/ glib-2. 0 -I/usr/ lib64/glib- 2.0/include don/qemu/ tests -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g vscclient. o protector- all -pthread ./.libs/ libcacard. so -L/lib64 kerberos/ lib64 -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4
libtool --mode=link --tag=CC cc -m64 -D_GNU_SOURCE
-D_FILE_
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-
-fno-strict-
-Wnested-externs -Wformat-security -Wformat-y2k -Winit-self
-Wold-style-
-I/usr/include/nss3 -I/usr/
-I/usr/
-I/usr/
-I/usr/
-I/home/
-Wl,--warn-common -m64 -g -o vscclient libcacard/
libcacard.la -Wc,-fstack-
-lgthread-2.0 -lglib-2.0 -lz -L/usr/
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz -luuid
cc -m64 -D_GNU_SOURCE -D_FILE_
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-
-Wmissing-
-Winit-self -Wold-style-
-I/usr/
-pthread -I/usr/
-I/usr/
-I/usr/
-I/home/
-Wl,--warn-common -m64 -g -o .libs/vscclient libcacard/
-Wl,-fstack-
-L/usr/
-lnspr4 -lpthread -lrt -lgthread-2.0 -lglib-2.0 -lcurl -ldl
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz
-luuid -Wl,--rpath -Wl,/usr/local/lib
/usr/bin/ld: -f may not be used without -shared
collect2: ld returned 1 exit status
make: *** [vscclient] Error 1
Attached is the full "make V=1" output.
Here is the configure output:
dcs-xen- 53:~/qemu> rm -rf out/tmp;mkdir out/tmp;pushd ../../configure --disable-pie;make V=1 1>zz1 2>&1;popd share/qemu share/man OFFSET_ BITS=64 prototypes -fno-strict- aliasing -Wendif-labels include- dirs -Wnested-externs -Wformat-security -Wformat-y2k definition -fstack- protector- all include/ libpng12 -I/usr/include/nss3 -I/usr/ include/ nspr4 include/ glib-2. 0 -I/usr/ lib64/glib- 2.0/include include/ pixman- 1 -I$(SRC_ PATH)/dtc/ libfdt softmmu linux-user linux-user mips-linux-user mips64-linux-user linux-user or32-linux-user ppc-linux-user ppc64-linux-user linux-user s390x-linux-user sh4-linux-user sh4eb-linux-user linux-user sparc64-linux-user linux-user x86_64-linux-user blk-data- plane no
out/tmp;
~/qemu/out/tmp ~/qemu
Install prefix /usr/local
BIOS directory /usr/local/
binary directory /usr/local/bin
library directory /usr/local/lib
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/don/qemu
C compiler cc
Host C compiler cc
C++ compiler c++
Objective-C compiler cc
ARFLAGS rv
CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g
QEMU_CFLAGS -m64 -D_GNU_SOURCE -D_FILE_
-D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef
-Wwrite-strings -Wmissing-
-Wmissing-
-Winit-self -Wold-style-
-I/usr/
-pthread -I/usr/
-I/usr/
LDFLAGS -Wl,--warn-common -m64 -g
make make
install install
python python
smbd /usr/sbin/smbd
host CPU x86_64
host big endian no
target list alpha-softmmu arm-softmmu cris-softmmu i386-softmmu
lm32-softmmu m68k-softmmu microblaze-softmmu microblazeel-
mips-softmmu mips64-softmmu mips64el-softmmu mipsel-softmmu
moxie-softmmu or32-softmmu ppc-softmmu ppc64-softmmu ppcemb-softmmu
s390x-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu
unicore32-softmmu x86_64-softmmu xtensa-softmmu xtensaeb-softmmu
alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user
i386-linux-user m68k-linux-user microblaze-
microblazeel-
mips64el-linux-user mipsel-linux-user mipsn32-linux-user
mipsn32el-
ppc64abi32-
sparc-linux-user sparc32plus-
unicore32-
tcg debug enabled no
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
-Werror enabled no
pixman system
SDL support yes
GTK support no
curses support yes
curl support yes
mingw32 support no
Audio drivers oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support yes
VNC support yes
VNC TLS support no
VNC SASL support yes
VNC JPEG support yes
VNC PNG support yes
VNC WS support no
xen support yes
brlapi support no
bluez support no
Documentation yes
GUEST_BASE yes
PIE no
vde support no
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support yes
RDMA support no
TCG interpreter no
fdt support yes
preadv support no
fdatasync yes
madvise yes
posix_madvise yes
sigev_thread_id yes
uuid support yes
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
Trace backend nop
Trace output file trace-<pid>
spice support no (/)
rbd support no
xfsctl support no
nss used yes
libusb no
usb net redir no
GLX support yes
libiscsi support no
build guest agent yes
QGA VSS support no
seccomp support no
coroutine backend ucontext
coroutine pool yes
GlusterFS support no
virtio-
gcov gcov
gcov enabled no
TPM support no
libssh2 support no
TPM passthrough no
QOM debugging yes
vhdx yes
I bisect'd this to:
dcs-xen- 53:~/qemu> git-bisect good a019ea0fa45f776 c36c561457 is the first bad commit a019ea0fa45f776 c36c561457
37746c5eacf309f
commit 37746c5eacf309f
Author: Marc-André Lureau <email address hidden>
Date: Mon Feb 25 23:31:12 2013 +0100
build-sys: must link with -fstack-protector
It is needed to give that flag to the linker as well, but latest
libtool 2.4.2 still swallows that argument, so let's pass it with
libtool -Wc argument.
qemu- 1.4.0/stubs/ arch-query- cpu-def. c:6: undefined reference to
`__stack_chk_guard'
Signed-off-by: Marc-André Lureau <email address hidden>
Reviewed-by: Alon Levy <email address hidden>
:100755 100755 33d3354ea308386 94020660f5822f5 51293d7e9a af96e4e404e3f76 58efcbe74b M configure 608b97f85bd9324 60fa50da73 8acde7640818e94 a28dd03c80 M rules.mak
ee2e7e8ad9b8a23
:100644 100644 edc2552f0886c99
36aba2de1fa9e0f
Do you want a bug opened for this?
-Don Slutz
> Paolo