qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] configure flag for compilation question..
@ 2006-10-13 23:03 Ben Taylor
  2006-10-13 23:10 ` Martin Bochnig
  0 siblings, 1 reply; 17+ messages in thread
From: Ben Taylor @ 2006-10-13 23:03 UTC (permalink / raw)
  To: Martin Bochnig, qemu-devel


---- Martin Bochnig <mb1x@gmx.com> wrote: 
> Ben Taylor wrote:
> 
> >As Martin indicated, setting LD_LIBRARY_PATH may get you a running
> >binary, but LD_LIBRARY_PATH is the wrong answer for Solaris.
> >
> >  
> >
> 
> My answer had been a bit longer:
> 
> "Read ld.so.1(1)
> i.e.
> # man ld.so.1
> 
> Then: *One* option is to set $LD_LIBRARY_PATH (or potentially
> $LD_LIBRARY_PATH_64 [not required])."

I'm not saying it doesn't work.  But properly compiled programs for
Solaris include the run time paths to the libraries so an LD_LIBRARY_PATH
environment variable is not required.

LD_LIBRARY_PATH is interesting to test out new versions of support
libraries without actually having to recompile, so it has it's uses.
but too often, folks use LD_LIBRARY_PATH as a panacea on Solaris
to fix poorly compiled programs.

Ben

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [Qemu-devel] configure flag for compilation question..
@ 2006-10-13 23:27 Ben Taylor
  2006-10-14  0:21 ` Martin Bochnig
  0 siblings, 1 reply; 17+ messages in thread
From: Ben Taylor @ 2006-10-13 23:27 UTC (permalink / raw)
  To: qemu-devel


---- Ishwar Rattan <ishwar@pali.cps.cmich.edu> wrote: 
> 
> 
> On Fri, 13 Oct 2006, Martin Bochnig wrote:
> 
> > Ishwar Rattan wrote:
> >
> >>
> > Where is the problem 64bit versus 32bit ?
> > (32 bit version of libSDL-1.2.so.0 found while amd64 64bit version needed?)
> > (should go under /usr/local/lib/amd64/libSDL-1.2.so.0)
> Well, the problem is I do not root privileges so can't place libSL in
> /usr/local/lib or /usr/local/lib/amd64.
> 
> I would like to  keep it in $HOME/lib and want qemu to see the lib 
> archive.
> 
> I will try LD_LIBRARY_PATH option. 

It should work.  the main thing is to not to agressive with LD_LIBRARY_PATH in
this case.  Since it sounds like it already may be linking against /usr/local/lib
where the current libSDL is, you should just be able to add the new lib dir
to the LD_LIBRARY_PATH env variable, and then run ldd on qemu to make
sure it's finding the right libraries. When you have the right LD_LIBRARY_PATH,
then it should be working for you.

> Is to possible to have a staticly
> linked version of libSDL in the qemu binaries?

There is an option for statically linked libSDL in the qemu binaries, 
and I tried to make sure I kept that intact for solaris in the configure
script.  Try it and see what happens.  

Ben

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [Qemu-devel] configure flag for compilation question..
@ 2006-10-13 23:22 Ben Taylor
  2006-10-14  5:23 ` Martin Bochnig
  0 siblings, 1 reply; 17+ messages in thread
From: Ben Taylor @ 2006-10-13 23:22 UTC (permalink / raw)
  To: Martin Bochnig, qemu-devel


---- Martin Bochnig <mb1x@gmx.com> wrote: 
> Ben Taylor wrote:
> 
> >---- Ishwar Rattan <ishwar@pali.cps.cmich.edu> wrote: 
> >  
> >
> >>Trying to compile qemu on amd64 based Solaris.
> >>
> >>I do not have write permission to /usr/local subtree
> >>
> >>./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.0 etc. (checked with ldd).
> >>
> >>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.

> 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.

> 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=0
> 
> 
> >to the Makefile for 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_PATH may get you a running
> >binary, but LD_LIBRARY_PATH is the wrong answer for Solaris.
> >
> >Ben
> >  
> >
> 
> > "LD_LIBRARY_PATH is 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.
 
> 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.

> 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.

> And I would do it again for Ishwar's current needs.

Works for me.

Ben

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [Qemu-devel] configure flag for compilation question..
@ 2006-10-13 19:18 Ben Taylor
  2006-10-13 19:30 ` Martin Bochnig
  2006-10-13 20:16 ` Martin Bochnig
  0 siblings, 2 replies; 17+ messages in thread
From: Ben Taylor @ 2006-10-13 19:18 UTC (permalink / raw)
  To: qemu-devel


---- Ishwar Rattan <ishwar@pali.cps.cmich.edu> wrote: 
> 
> Trying to compile qemu on amd64 based Solaris.
> 
> I do not have write permission to /usr/local subtree
> 
> ./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.0 etc. (checked with ldd).
> 
> What is the way out for this sticky point?

Manually add "-L/usr/local/lib -R/usr/local/lib" to the Makefile for 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_PATH may get you a running
binary, but LD_LIBRARY_PATH is the wrong answer for Solaris.

Ben

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: [Qemu-devel] configure flag for compilation question..
@ 2006-10-13 19:18 Ben Taylor
  2006-10-16 21:41 ` Ishwar Rattan
  0 siblings, 1 reply; 17+ messages in thread
From: Ben Taylor @ 2006-10-13 19:18 UTC (permalink / raw)
  To: qemu-devel


---- Ishwar Rattan <ishwar@pali.cps.cmich.edu> wrote: 
> 
> Trying to compile qemu on amd64 based Solaris.
> 
> I do not have write permission to /usr/local subtree
> 
> ./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.0 etc. (checked with ldd).
> 
> What is the way out for this sticky point?

Manually add "-L/usr/local/lib -R/usr/local/lib" to the Makefile for 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_PATH may get you a running
binary, but LD_LIBRARY_PATH is the wrong answer for Solaris.

Ben

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [Qemu-devel] configure flag for compilation question..
@ 2006-10-13 18:18 Ishwar Rattan
  2006-10-13 18:52 ` Martin Bochnig
  0 siblings, 1 reply; 17+ messages in thread
From: Ishwar Rattan @ 2006-10-13 18:18 UTC (permalink / raw)
  To: qemu-devel


Trying to compile qemu on amd64 based Solaris.

I do not have write permission to /usr/local subtree

./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.0 etc. (checked with ldd).

What is the way out for this sticky point?

-ishwar

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

end of thread, other threads:[~2006-10-16 22:01 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-13 23:03 [Qemu-devel] configure flag for compilation question Ben Taylor
2006-10-13 23:10 ` Martin Bochnig
  -- strict thread matches above, loose matches on Subject: below --
2006-10-13 23:27 Ben Taylor
2006-10-14  0:21 ` Martin Bochnig
2006-10-13 23:22 Ben Taylor
2006-10-14  5:23 ` Martin Bochnig
2006-10-13 19:18 Ben Taylor
2006-10-13 19:30 ` Martin Bochnig
2006-10-13 20:16 ` Martin Bochnig
2006-10-13 19:18 Ben Taylor
2006-10-16 21:41 ` Ishwar Rattan
2006-10-13 18:18 Ishwar Rattan
2006-10-13 18:52 ` Martin Bochnig
2006-10-13 18:48   ` Ishwar Rattan
2006-10-13 19:11     ` Martin Bochnig
2006-10-13 19:17       ` Ishwar Rattan
2006-10-13 19:39         ` Martin Bochnig

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).