MacPorts 1.4 rc2

Vincent Lefevre vincent-opdarw at
Thu Mar 15 06:37:08 PDT 2007

On 2007-03-15 19:03:37 +0900, Paul Guyot wrote:
> >prunille:~> locate libreadline.dylib
> >/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libreadline.dylib
> >/opt/local/lib/libreadline.dylib
> >/opt/local/var/db/dports/build/_Users_vinc17_software_darwinports_dports_devel_readline/work/destroot/opt/local/lib/libreadline.dylib
> >/opt/local/var/db/dports/software/readline/5.1.004_0/opt/local/lib/libreadline.dylib
> >/usr/lib/libreadline.dylib

> >But only /opt/local/lib/libreadline.dylib and /usr/lib/libreadline.dylib
> >should be available.

> configure (normally?) doesn't look into /opt/local.

It completely depends on the environment variables. To benefit from
MacPorts, I have:


Anyway, since -L/usr/lib is used, it will have the precedence over
/opt/local/include and /usr/lib/libreadline.dylib will be used. And
indeed, no problem with it: if I unset LIBRARY_PATH, the build still

> And the linker didn't use /opt/local/lib, to quote your log excerpt:
> >cc -dynamiclib -L/usr/local/lib  -L/usr/lib -lcurl -lssl -lcrypto -lz 
> >Pextlib.o strsed.o fgetln.o md5cmd.o setmode.o xinstall.o find.o 
> >strcasecmp.o vercomp.o filemap.o sha1cmd.o compat.o curl.o rmd160cmd.o 
> >readline.o uid.o -o Pextlib.dylib 
> >-L/System/Library/Frameworks/Tcl.framework/Versions/8.4 -ltclstub8.4 
> >-L/usr/local/lib  -L/usr/lib -lcurl -lssl -lcrypto -lz -lreadline  -lcrypto

> What does "locate readline.h" print out?

In short, I have:

BTW, I've noticed a bug: -L/usr/local/lib  -L/usr/lib is used at link
time, but only -I"/usr/include" is used at compile time, instead of
-I/usr/local/include -I/usr/include. Now, this doesn't explain the
problem I have.

If I unset C_INCLUDE_PATH, then the build doesn't fail. So, this means
that readline.h is taken from /opt/local/include/readline/readline.h
(with my C_INCLUDE_PATH), even though -I"/usr/include" is used. Any

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

More information about the macports-dev mailing list