MacPorts 1.5.2 now available

Vincent Lefevre vincent-opdarw at vinc17.org
Wed Aug 22 08:33:15 PDT 2007


On 2007-08-22 08:42:20 -0400, Jason Stelzer wrote:
> Its not that /usr/local is special, its that it is part of the
> standard runtime/compile time search path by default. You should be
> able to override its search vial -L at compile time and
> DYLD_LIBRARY_PATH at runtime.

Yes, for libraries *only* (see below).

> Shared libraries on os x work almost exactly like they do on linux.

Not exactly, Mac OS X uses a run path by default (under Linux, one
needs LD_LIBRARY_PATH, except when one explicitly set the run path
at compile time, but it is difficult to do that in a portable way).

> Using the right CFLAGS with the correct -L -I values and at run time
> having DYLD_LIBRARY_PATH set correctly would work.

It depends on what you want to do. If you want to use the Mac OS X
libreadline, then -I/usr/include won't work, because this is a
system directory. See:

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31186

(unfortunately, it seems that this feature won't change, there will
just be a fix in the documentation about this problem).

> The one thing I'm not sure about is, the os x version of -rpath.
> When building you would want to use the equivalent of -rpath at link
> time to ensure paths to libraries are linked and the runtime library
> loader doesn't get confused.

On Mac OS X, this is done by default (at least, this is what I've
noticed).

-- 
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



More information about the macports-users mailing list