Re: death to -{I,L}/our/{include,lib}!
Rolf Neugebauer <[email protected]> 19 Jul 2001 14:10:54 +0100
| Newsgroups | gmane.comp.sysutils.ark.devel |
|---|---|
| Message-ID | <[email protected]> |
Will Partain <[email protected]> writes: > Rolf asks: > > > > gcc -I/.-ark-deploy/zlib--1.1.3/include \ > > > -I/.-ark-deploy/libpng--1.0.9/include \ > > > -L/.-ark-deploy/zlib--1.1.3/lib \ > > > -L/.-ark-deploy/libpng--1.0.9/lib ... > > > > don't you also have a problem with runtime linking? ... > > Yep; it's called "gliding over the details" :-) I would > really try to sneak more flags to the linker... > > [non-HP-UX] > > gcc -I/.-ark-deploy/zlib--1.1.3/include \ > -I/.-ark-deploy/libpng--1.0.9/include \ > -L/.-ark-deploy/zlib--1.1.3/lib \ > -L/.-ark-deploy/libpng--1.0.9/lib \ > -Wl,-R/.-ark-deploy/zlib--1.1.3/lib \ > -Wl,-R/.-ark-deploy/libpng--1.0.9/lib ... > > [HP-UX] > > gcc -I/.-ark-deploy/zlib--1.1.3/include \ > -I/.-ark-deploy/libpng--1.0.9/include \ > -L/.-ark-deploy/zlib--1.1.3/lib \ > -L/.-ark-deploy/libpng--1.0.9/lib \ > -Wl,+b,: ... > > Anyone got any improvements to that? > (Death to LD_LIBRARY_PATH!) I didn't know about this option (learn something new every day :). I just tried it on my FreeBSD box and it works as expected. However, the runtime link editor does not complain if a library is not at the specified location if it can find it somewhere else. I don't expect this to be a major problem but maybe it is something one should be aware of, especially if you really care about versions/compilation options etc. Ie. if you really care to pick up _your_ zlib--1.1.3 in /.-ark-deploy and you definitely do not want to pick up the vendor supplied version from /usr/lib/. Rolf