[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] export of LD_LIBRARY_PATH in e_start_main.c



On Sun, 17 Dec 2006 18:44:33 +0100 Nikolas Arend <Nikolas.Arend@gmx.net>
babbled:

> Hi,
> 
> I just came to realize that LD_LIBRARY_PATH is exported during e17 
> startup. In my case (SuSE 10.1) it's set to /usr/lib. That caused me 
> some headaches with ATI GL drivers (which are installed in 
> /usr/X11R6/lib) as I didn't understand why they where failing to load: 
> libGL from /usr/lib was used because of the LD_LIBRARY_PATH setting.
> 
> Although I could of course unset LD_LIBRARY_PATH manually, I wonder if 
> this is really needed, i.e. is there any Linux distribution that doesn't 
> have /usr/lib in the standard search path for libraries?
> 
> Best,  Nick.

this is part of the setup that enlightenment_start does to make sure e finds
libraries in the prefix it's installed in. basically this is there for when
people install, e17, evas, eet, etc. in, for example, /opt/e17 or /usr/local
which is the default, and on linux DONT add /opt/e17/lib to /etc/ld.so.conf or
if on bsd DONT add it to LD_LIBRARY_PATH. this means that things "just work". e
also adds to $PATH too to make sure it can execute things in its own install
prefix. it detects this on the fly at runtime because e is actually relocatable
at runtime and doesnt need a recompile to be moved. this also handles the
problem where users do silly things like install libs multiple times in
different prefixes - the LD_LIBRARY_PATH makes the "prefix local" libs
preferred over others (i.e. the ones e17 was most likely compiled against).

prefix runtime moving works like this: i compile it for preifx of /opt/e17 -
i can now mv /opt/e17 to /usr/local/e17 and e will continue to run and work just
fine.

now you get /usr/lib because that happens to be the prefix where e is
installed. e has detected it correctly. now you do have a weird situation where
you have multiple copies of a library installed (generally a bad thing), but
the one you want found by default is not where e is installed.

> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)