Vincent Lefevre on Mon, 31 Oct 2005 02:21:12 +0100

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

Re: Configure bug when CPPFLAGS is set

On 2005-10-30 13:27:50 -0800, Justin C. Walker wrote:
> As a special feature of Mac OS X, 10.4, you now have an odd-ball  
> include file, /usr/include/readline.h, which is supposed (I think) to  
> provide some of the GNU readline features, via the 'editline' library.
> It interferes with anything that is used to using libreadline,

As a user point of view, it doesn't interfere with anything if you use
$C_INCLUDE_PATH (and matching paths in $LIBRARY_PATH for libraries).
Port managers shouldn't use user-defined paths, but can do something
equivalent (by either defining these environment variables or by using
-I and -L flags with the compiler).

> and my solution was to remove (rename, move, ...) that header file.

This is a bad solution. You shouldn't remove anything from the vendor
system, or bad things may happen during an upgrade or with some other
vendor tools. The good solution is to override the system settings.

> After that, things work fine (since the library in question doesn't
> conflict by name, there is no additional hassle).
> I have not heard of any problems with this solution, but I suspect it  
> might interfere with building something in the Darwin base.

Yes, or an upgrade may fail because its system detects that some files
have been removed (or if a patch is applied to a removed file). Also,
some future header files may use readline.h, and you cannot know what
Apple will do...

Moreover, if you remove the header file, you should also remove the
corresponding libraries, otherwise some configure scripts may pass
though they shouldn't (and finding the error may be difficult and/or
take more time -- I had such a problem with Mutt in the past). But
in this case, some programs may fail because the dynamical library
can't be found.

I think that Pari's Configure script should take into account
$C_INCLUDE_PATH, and should take an argument --with-includedir=DIR
that the user (or a program) should use if he uses a -I flag in

Vincent Lefèvre <> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA