Skip to contentSkip to conversation

Minor bug in 0.7.1 install

Qemu-devel Greg Bell 4 participants 6 messages Aug 30, 2005

lore
Share & tools
lore

Greg Bell

author
#0 lore raw

hi qemu,

thanks for a neat project. two minor problems:

1) on my FC3 box, i had to force sdl to compile statically because the sdl test didn't work for some reason (could be my box's problem). but there's no way to set sdl = 'yes' from the configure command line. so i hacked configure, but then line 730 dies:

echo "SDL_LIBS=$sdl_static_libs" >> $config_mak

this is because $sdl_static_libs evaluates to a multiple word string on my system. eg:

$ sdl-config --static-libs
-L/usr/lib -lSDL -lpthread -lm -ldl -lasound -L/usr/X11R6/lib -lX11 -lXext

so "SDL_LIBS=multiple word thing" is an error.

2) i needed to chmod 777 /usr/local/share/qemu/ before i could run qemu as a normal user.

~gb

Signature · 1 line
Greg Bell +61 4 10 432 772  (alternately [email protected])
#1 lore raw
Quoted 13 lines · Greg Bell

hi qemu,

thanks for a neat project. two minor problems:

1) on my FC3 box, i had to force sdl to compile statically because the sdl test didn't work for some reason (could be my box's problem). but there's no way to set sdl = 'yes' from the configure command line. so i hacked configure, but then line 730 dies:

echo "SDL_LIBS=$sdl_static_libs" >> $config_mak

Quoted 8 lines

this is because $sdl_static_libs evaluates to a multiple word string on my system. eg:

$ sdl-config --static-libs
-L/usr/lib -lSDL -lpthread -lm -ldl -lasound -L/usr/X11R6/lib -lX11 -lXext

so "SDL_LIBS=multiple word thing" is an error.

My config.mak has this multi-word line (for dynamic SDL)

SDL_LIBS=-L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread

and it works fine. I'm not sure why its not working for you. At least its not the length, as I have longer LIB lines which work (tho none of them are static).

Quoted 4 lines

2) i needed to chmod 777 /usr/local/share/qemu/ before i could run qemu as a normal user.

Assuming its owned by root:root, chmod 555 should be enough (mine is currently set to 755).

Quoted 3 lines

~gb

Signature · 2 lines
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.
#2 lore raw
In reply to Greg Bell
Quoted 8 lines

1) on my FC3 box, i had to force sdl to compile statically because the sdl test didn't work for some reason (could be my box's problem). but there's no way to set sdl = 'yes' from the configure command line. so i hacked configure, but then line 730 dies:

echo "SDL_LIBS=$sdl_static_libs" >> $config_mak

Quoted 7 lines

this is because $sdl_static_libs evaluates to a multiple word string on my system. eg:

$ sdl-config --static-libs
-L/usr/lib -lSDL -lpthread -lm -ldl -lasound -L/usr/X11R6/lib -lX11 -lXext

so "SDL_LIBS=multiple word thing" is an error.

$config_mak is a makefile fragment, not a shell script, so this should work fine.

Paul

author
#3 lore raw
Quoted 2 lines

$config_mak is a makefile fragment, not a shell script, so this should work fine.

hmmm... configure errors out for me after i hack it to force static linking with SDL and this is what i traced it to. here's the actual output rather than my possibly flawed analysis :)

# ./configure
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /dl/new/qemu-0.7.1
C compiler        gcc
Host C compiler   gcc
make              make
host CPU          i386
host big endian   no
target list       i386-user arm-user armeb-user sparc-user ppc-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu
gprof enabled     no
static build      no
SDL support       yes
SDL static link
mingw32 support   no
Adlib support     no
FMOD support      no
kqemu support     no
./configure: line 732: --libs: command not found
./configure: line 734: --cflags: command not found
./configure: line 732: --libs: command not found
./configure: line 734: --cflags: command not found
./configure: line 732: --libs: command not found
./configure: line 734: --cflags: command not found
./configure: line 732: --libs: command not found
./configure: line 734: --cflags: command not found
./configure: line 732: --libs: command not found
./configure: line 734: --cflags: command not found
$ diff -urN configure.bak configure
--- configure.bak       2005-08-30 17:33:01.000000000 +1000
+++ configure   2005-08-30 17:33:10.000000000 +1000
@@ -272,7 +272,7 @@
 # SDL probe

sdl_too_old=no
-
+sdl=yes
if test -z "$sdl" ; then

sdl_config="sdl-config"

#4 lore raw
Quoted 5 lines · Greg Bell
Quoted 2 lines

$config_mak is a makefile fragment, not a shell script, so this should work fine.

hmmm... configure errors out for me after i hack it to force static linking with SDL and this is what i traced it to. here's the actual output rather than my possibly flawed analysis :)

Quoted 15 lines
# ./configure
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /dl/new/qemu-0.7.1
C compiler        gcc
Host C compiler   gcc
make              make
host CPU          i386
host big endian   no
target list       i386-user arm-user armeb-user sparc-user ppc-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu
gprof enabled     no
static build      no

I think this is your original problem.. for SDL to be linked statically qemu must be linked statically.

Try going back to the original version and simply add --static to your configure line..

Regards
Henrik

#5 lore raw
In reply to Greg Bell
Quoted 6 lines · Greg Bell

sdl_too_old=no

(quoted diff) +1 -1
-
+sdl=yes

if test -z "$sdl" ; then

sdl_config="sdl-config"

This is not sufficient as a lot of the SDL logics is contained in the if block you have now disabled.. you need to also at minimum set sdl_config, sdl_static and sdl_static_libs accordingly.

I am a little curious about what exacly you are attemptig to do. SDL is by default linked statically if your SDL installation supports static linking..

What is the output of "sdl-config --static-libs" on your system? Prehaps your SDL is not built with support for static linking?

Regards
Henrik