qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Latest QEMU does not support --enable-check-utests on Debian with --enable-pie (default)
@ 2011-11-23 19:40 Stefan Weil
  2011-11-24  8:00 ` Markus Armbruster
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2011-11-23 19:40 UTC (permalink / raw)
  To: QEMU Developers; +Cc: Avi Kivity

This is my configuration and the output from configure:

configure '--audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda' 
'--audio-drv-list=alsa,sdl,oss,esd,pa' '--enable-mixemu' 
'--enable-check-utests' '--enable-vnc-thread'
ERROR
ERROR: User requested feature check
ERROR: configure was not able to find it
ERROR

This is what configure does internally:

gcc -fPIE -DPIE -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes 
-Wredundant-decls -Wmissing-format-attribute -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/usr/include/libpng12 -o /tmp/qemu-conf--4272-.exe 
/tmp/qemu-conf--4272-.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g -lcheck
/usr/bin/ld: 
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libcheck.a(check.o): 
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when 
making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libcheck.a: could 
not read symbols: Bad value

When I add --disable-pie, configure works.

Regards,
Stefan Weil

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Latest QEMU does not support --enable-check-utests on Debian with --enable-pie (default)
  2011-11-23 19:40 [Qemu-devel] Latest QEMU does not support --enable-check-utests on Debian with --enable-pie (default) Stefan Weil
@ 2011-11-24  8:00 ` Markus Armbruster
  2011-11-24 18:36   ` Stefan Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Armbruster @ 2011-11-24  8:00 UTC (permalink / raw)
  To: Stefan Weil; +Cc: QEMU Developers, Avi Kivity

Stefan Weil <sw@weilnetz.de> writes:

> This is my configuration and the output from configure:
>
> configure '--audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda'
> --audio-drv-list=alsa,sdl,oss,esd,pa' '--enable-mixemu'
> --enable-check-utests' '--enable-vnc-thread'
> ERROR
> ERROR: User requested feature check
> ERROR: configure was not able to find it
> ERROR

Works for me, see appended log.

> This is what configure does internally:
>
> gcc -fPIE -DPIE -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
> -Wredundant-decls -Wmissing-format-attribute -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/usr/include/libpng12 -o
> /tmp/qemu-conf--4272-.exe /tmp/qemu-conf--4272-.c -Wl,-z,relro
> -Wl,-z,now -pie -m64 -g -lcheck
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libcheck.a(check.o):
> relocation R_X86_64_32 against `.rodata.str1.1' can not be used when
> making a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libcheck.a: could
> not read symbols: Bad value
>
> When I add --disable-pie, configure works.

You can't link non-PIC code like libcheck.a into a PIE.  Do you have
libcheck.so?



$ ../configure '--audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda' --audio-drv-list=alsa,sdl,oss,pa '--enable-mixemu' --enable-check-utests '--enable-vnc-thread'
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
library directory /usr/local/lib
include directory /usr/local/include
config directory  /usr/local/etc
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /home/armbru/work/qemu
C compiler        gcc
Host C compiler   gcc
CFLAGS            -O2 -g 
QEMU_CFLAGS       -fPIE -DPIE -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/usr/include/libpng12   -I/usr/include/spice-server -I/usr/include/pixman-1 -I/usr/include/spice-1  
LDFLAGS           -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g 
make              make
install           install
python            python
smbd              /usr/sbin/smbd
host CPU          x86_64
host big endian   no
target list       i386-softmmu x86_64-softmmu alpha-softmmu arm-softmmu cris-softmmu lm32-softmmu m68k-softmmu microblaze-softmmu microblazeel-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu s390x-softmmu xtensa-softmmu xtensaeb-softmmu i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user microblaze-linux-user microblazeel-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user unicore32-linux-user s390x-linux-user 
tcg debug enabled no
Mon debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
-Werror enabled   no
SDL support       yes
curses support    yes
curl support      yes
check support     yes
mingw32 support   no
Audio drivers     alsa sdl oss pa
Extra audio cards ac97 es1370 sb16 cs4231a adlib gus hda
Block whitelist   
Mixer emulation   yes
VNC support       yes
VNC TLS support   yes
VNC SASL support  yes
VNC JPEG support  yes
VNC PNG support   yes
VNC thread        yes
xen support       yes
brlapi support    no
bluez  support    no
Documentation     yes
NPTL support      yes
GUEST_BASE        yes
PIE               yes
vde support       no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
TCG interpreter   no
fdt support       no
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
uuid support      yes
vhost-net support yes
Trace backend     nop
Trace output file trace-<pid>
spice support     yes
rbd support       no
xfsctl support    no
nss used          no
usb net redir     no
OpenGL support    yes
libiscsi support  no
build guest agent yes
$ grep lcheck config.log 
gcc -fPIE -DPIE -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/usr/include/libpng12 -o /tmp/qemu-conf-29100-10373-30351.exe /tmp/qemu-conf-2019-10373-32038.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g -lcheck

Note I dropped esd (too lazy to install right now), fixed up your
quoting, and run in a sub-directory.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Latest QEMU does not support --enable-check-utests on Debian with --enable-pie (default)
  2011-11-24  8:00 ` Markus Armbruster
@ 2011-11-24 18:36   ` Stefan Weil
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Weil @ 2011-11-24 18:36 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: QEMU Developers, Avi Kivity

Am 24.11.2011 09:00, schrieb Markus Armbruster:
> Stefan Weil<sw@weilnetz.de>  writes:
>
>    
>> This is my configuration and the output from configure:
>>
>> configure '--audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda'
>> --audio-drv-list=alsa,sdl,oss,esd,pa' '--enable-mixemu'
>> --enable-check-utests' '--enable-vnc-thread'
>> ERROR
>> ERROR: User requested feature check
>> ERROR: configure was not able to find it
>> ERROR
>>      
> Works for me, see appended log.
>
>    
>> This is what configure does internally:
>>
>> gcc -fPIE -DPIE -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
>> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
>> -Wredundant-decls -Wmissing-format-attribute -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/usr/include/libpng12 -o
>> /tmp/qemu-conf--4272-.exe /tmp/qemu-conf--4272-.c -Wl,-z,relro
>> -Wl,-z,now -pie -m64 -g -lcheck
>> /usr/bin/ld:
>> /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libcheck.a(check.o):
>> relocation R_X86_64_32 against `.rodata.str1.1' can not be used when
>> making a shared object; recompile with -fPIC
>> /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libcheck.a: could
>> not read symbols: Bad value
>>
>> When I add --disable-pie, configure works.
>>      
> You can't link non-PIC code like libcheck.a into a PIE.  Do you have
> libcheck.so?
>    

Debian squeeze has libcheck.a and libcheck_pic.a, but no
libcheck.so in package 'check'.

There are other files names *_pic.a, and obviously those
libraries are to be linked to a PIE. If I use -lcheck_pic,
building PIEs works.

Maybe configure must be extended to try library names
with an additional _pic for PIE.

Regards,
Stefan Weil

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-24 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-23 19:40 [Qemu-devel] Latest QEMU does not support --enable-check-utests on Debian with --enable-pie (default) Stefan Weil
2011-11-24  8:00 ` Markus Armbruster
2011-11-24 18:36   ` Stefan Weil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).