MacPorts 1.4 rc2
Vincent Lefevre
vincent-opdarw at vinc17.org
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:
C_INCLUDE_PATH=/Users/vinc17/include:/opt/local/include
LIBRARY_PATH=/Users/vinc17/lib:/opt/local/lib
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
fails.
> 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:
/opt/local/include/readline/readline.h
/usr/include/readline/readline.h
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
explanation?
--
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-dev
mailing list