configure flag for compilation question..
Quoted 14 lines · ---- Martin Bochnig
Quoted 12 lines · Ben Taylor
Quoted 9 lines · ---- Ishwar Rattan
Trying to compile qemu on amd64 based Solaris.
I do not have write permission to
/usr/localsubtree./configure --libdir=other-path --prefix=not-ustlocal is fine
but make always generates binaries that want to find/usr/local/lib/libSDL-1.2.so.0etc. (checked with ldd).
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
What is the way out for this sticky point?
Manually add "-L/usr/local/lib -R/usr/local/lib"
Rather "-L/his/home/sdl_amd64/lib -R/his/home/sdl_amd64/lib"
Yeah, that. brain fart when I was typing that.
Quoted 3 lines
Because I doubt, an amd64 version of libSDL is currently present in
/usr/local/lib/amd64
(and he doesn't have w access).
Right. I knew what I meant, I just didn't type it right.
Quoted 14 lines
This method is btw not really "new" to me, see my posting from a few hours ago:
http://www.opensolaris.org/jive/thread.jspa?threadID=15448&tstart=0Quoted 9 lines
to the
Makefilefor the link
phase so it will correctly add those paths to the library lookup. If I had a code base to look at this instance, I could tell you where. You could also add those flags to Makefile.target in the SOLARIS specific areas, which would probably make more sense.As Martin indicated, setting
LD_LIBRARY_PATHmay get you a running binary, butLD_LIBRARY_PATHis the wrong answer for Solaris.
Quoted 7 lines
Quoted 5 lines
Ben
"
LD_LIBRARY_PATHis the wrong answer for Solaris"???
--->> Weak statement.
LD_LIBRARY_PATH is the wrong answer for Solaris. It's great for trying to fix problems like this when the app won't run with a particular set of libraries, or you're testing with new libraries and you don't want to recompile (I've done this before). Too many people use it as a panacea for poorly compiled/configured Open source software. In this case, he might just set the LD_LIBRARY_PATH and never recompile it, even though it won't work if it uses the default LIB path.
Quoted 2 lines
It has its [dis]advantages.
Namely that the paths to a library are _not_ hardwired.
But then that requires a dependency on knowing where your libraries are, and could possibly create an imcombaility by overriding a library path for some other application that is also leaning on LD_LIBRARY_PATH. Obviously you can get around this by encapsulating each application requiring LD_LIBRARY_PATH, thereby negating the need for a user or system wide LD_LIBRARY_PATH variable.
Quoted 1 line
That's the exactly reason, why I did recommend it in this very scenario.
In this case, I can agree for the purposes of a test. But it also indicates that some work is required for the Solaris port if other library paths need to be linked in during the compliation/link phase.
Quoted 1 line
And I would do it again for Ishwar's current needs.
Works for me.
Ben
Quoted 77 lines · Ben Taylor
Quoted 23 lines · ---- Martin Bochnig
Quoted 19 lines · Ben Taylor
Quoted 14 lines · ---- Ishwar Rattan
Trying to compile qemu on amd64 based Solaris.
I do not have write permission to
/usr/localsubtree./configure --libdir=other-path --prefix=not-ustlocal is fine
but make always generates binaries that want to find/usr/local/lib/libSDL-1.2.so.0etc. (checked with ldd).What is the way out for this sticky point?
Quoted 7 lines
Quoted 4 lines
Manually add "-L/usr/local/lib -R/usr/local/lib"
Rather "-L/his/home/sdl_amd64/lib -R/his/home/sdl_amd64/lib"
Yeah, that. brain fart when I was typing that.
Quoted 5 lines
Because I doubt, an amd64 version of libSDL is currently present in
/usr/local/lib/amd64
(and he doesn't have w access).Right. I knew what I meant, I just didn't type it right.
Quoted 21 lines
This method is btw not really "new" to me, see my posting from a few hours ago:
http://www.opensolaris.org/jive/thread.jspa?threadID=15448&tstart=0Quoted 14 lines
to the
Makefilefor the link
phase so it will correctly add those paths to the library lookup. If I had a code base to look at this instance, I could tell you where. You could also add those flags to Makefile.target in the SOLARIS specific areas, which would probably make more sense.As Martin indicated, setting
LD_LIBRARY_PATHmay get you a running binary, butLD_LIBRARY_PATHis the wrong answer for Solaris.Ben
Quoted 7 lines
Quoted 3 lines
"
LD_LIBRARY_PATHis the wrong answer for Solaris"???
--->> Weak statement.
Quoted 9 lines
LD_LIBRARY_PATHis the wrong answer for Solaris. It's great for trying to fix problems like this when the app won't run with a particular set of libraries, or you're testing with new libraries and you don't want to recompile (I've done this before). Too many people use it as a panacea for poorly compiled/configured Open source software. In this case, he might just set theLD_LIBRARY_PATHand never recompile it, even though it won't work if it uses the default LIB path.
No further comment, except this one:
bash-3.00# pwd/opt/SUNWqemu/bin
bash-3.00# ls -al
total 676
dr-xr-xr-x 5 root bin 1024 Oct 14 06:26 . drwxr-xr-x 5 root bin 512 Oct 14 06:26 .. lrwxrwxrwx 1 root root 9 Oct 14 06:26 JQEMU.jar -> jqemu.jar lrwxrwxrwx 1 root root 10 Oct 14 06:26 JQEMU.jnlp -> jqemu.jnlp lrwxrwxrwx 1 root root 20 Oct 14 06:26 SWING-LAYOUT-1.0.jar -> swing-layout-1.0.jar -r-xr-xr-x 1 root bin 48 Oct 14 03:23 jqemu-launcher-gui -r-xr-xr-x 1 root bin 150854 Oct 14 03:30 jqemu.jar -r-xr-xr-x 1 root bin 524 Oct 14 03:32 jqemu.jnlp lrwxrwxrwx 1 root root 18 Oct 14 06:26 qemu ->
./sparcv8plus/qemu
lrwxrwxrwx 1 root root 22 Oct 14 06:26 qemu-img ->
./sparcv8plus/qemu-img
lrwxrwxrwx 1 root root 29 Oct 14 06:26 qemu-system-586 ->
./sparcv8plus/qemu-system-586
lrwxrwxrwx 1 root root 29 Oct 14 06:26 qemu-system-686 ->
./sparcv8plus/qemu-system-686
lrwxrwxrwx 1 root root 29 Oct 14 06:26 qemu-system-arm ->
./sparcv8plus/qemu-system-arm
lrwxrwxrwx 1 root root 30 Oct 14 06:26 qemu-system-mips
-> ./sparcv8plus/qemu-system-mips
lrwxrwxrwx 1 root root 32 Oct 14 06:26 qemu-system-mipsel
-> ./sparcv8plus/qemu-system-mipsel
lrwxrwxrwx 1 root root 29 Oct 14 06:26 qemu-system-ppc ->
./sparcv8plus/qemu-system-ppc
lrwxrwxrwx 1 root root 31 Oct 14 06:26 qemu-system-sparc
-> ./sparcv8plus/qemu-system-sparc
lrwxrwxrwx 1 root root 32 Oct 14 06:26 qemu-system-x86_64
-> ./sparcv8plus/qemu-system-x86_64
-r-xr-xr-x 1 root bin 1591 Oct 14 00:00 sdl-config
dr-xr-xr-x 2 root bin 512 Oct 14 06:26 sparcv7
dr-xr-xr-x 2 root bin 512 Oct 14 06:26 sparcv8
dr-xr-xr-x 2 root bin 512 Oct 14 06:26 sparcv8plus
-r-xr-xr-x 1 root bin 140545 Oct 14 03:30 swing-layout-1.0.jar
-r-xr-xr-x 1 root bin 332 Oct 14 05:39 test-qemu
-r-xr-xr-x 1 root bin 252 Oct 14 05:40 test-qemu-system-arm
-r-xr-xr-x 1 root bin 887 Oct 14 04:49 test-qemu-system-mips
-r-xr-xr-x 1 root bin 319 Oct 14 04:54 test-qemu-system-sparc
bash-3.00# ldd */qemu-system-mips|grep SDL
libSDL-1.2.so.0 => /opt/SUNWqemu/lib/sparcv7/libSDL-1.2.so.0
libSDL-1.2.so.0 => /opt/SUNWqemu/lib/sparcv8/libSDL-1.2.so.0
libSDL-1.2.so.0 =>
/opt/SUNWqemu/lib/sparcv8plus/libSDL-1.2.so.0
bash-3.00# ldd */qemu-system-mips|grep libz
libz.so => /opt/SUNWqemu/lib/sparcv7/libz.so
libz.so => /opt/SUNWqemu/lib/sparcv8/libz.so
libz.so => /opt/SUNWqemu/lib/sparcv8plus/libz.sobash-3.00# uname -a
SunOS mb1x-ws1 5.11 snv_41 sun4u sparc SUNW,Sun-Fire-280R bash-3.00# isainfo -v
64-bit sparcv9 applications
vis2 vis
32-bit sparc applications
vis2 vis v8plus div32 mul32
bash-3.00#
Quoted 39 lines
Quoted 7 lines
It has its [dis]advantages.
Namely that the paths to a library are _not_ hardwired.But then that requires a dependency on knowing where your libraries are, and could possibly create an imcombaility by overriding a library path for some other application that is also leaning on
LD_LIBRARY_PATH. Obviously you can get around this by encapsulating each application requiringLD_LIBRARY_PATH, thereby negating the need for a user or system wideLD_LIBRARY_PATHvariable.Quoted 3 lines
That's the exactly reason, why I did recommend it in this very scenario.
In this case, I can agree for the purposes of a test. But it also indicates that some work is required for the Solaris port if other library paths need to be linked in during the compliation/link phase.
Quoted 3 lines
And I would do it again for Ishwar's current needs.
Works for me.
Ben