[MOAB-dev] Redundant -L/usr/lib causing problems

Jason Kraftcheck kraftche at cae.wisc.edu
Wed Feb 24 10:21:45 CST 2010


Jed Brown wrote:
> 
> That's nice (though a bit nonstandard in that the user needs to be
> careful when to make MOAB guess and when to specify), 

It is not non-standard.  The 'standard' (as in documented) way to use
configure scripts is to specify your own LDFLAGS on the configure line and
not specify arguments to any of the --with-* flags.  Not specifying any
option for libraries in default search locations is consistent with that.

Anyway, there is no other practical way to do things.  There is no
'standard' for default library search paths.  While that list typically
includes /lib, /usr/lib, and /usr/local/lib, it need not contain them and
may contain other paths.  And it is often configurable at both the system
and user level.  From what I recall, it was fairly common on Unix-based
systems to have a few other library search paths.  There is no portable way
to detect if a user specified a library path that is one of the defaults.
 All we can do is check if the library can be linked w/out any paths being
specified.  But we cannot discard some other path specified by the user
because we may succeed in linking to some other version of the library in a
default path.  So, in practice, the only solution is to explicitly echo all
user-specified library paths in the link command.

I think that whatever 'standard' configure scripts you're familiar with that
require one to specify system default paths are broken.

> but autoconf for
> zoltan and parmetis don't handle this properly:
> 
>   configure: error: "yes/include : not a directory"
> 
>   configure: WARNING: "Guessing '/usr/lib'"
>   configure: error: "yes: not a directory"
> 

On the other hand, apparently MOAB's configure script is also broken.  For
all the reasons discussed above, we obviously should not be requiring that a
path be specified.

- jason



More information about the moab-dev mailing list