[MOAB-dev] Question re: MOAB

Jason Kraftcheck kraftche at cae.wisc.edu
Tue Aug 9 17:00:17 CDT 2011


On 08/09/2011 02:45 PM, Hill, Ellen M. wrote:
> I tried it without success ... LIBS gets overwritten when -lm is set.
>

That is definitely a bug in MOAB's configure script.  It should preserve 
user-specified values for LIBS (and LDLFAGS, CPPFLAGS, etc.).

However, it doesn't really address the larger issue.  It should not be 
necessary to specify -lz explicitly.  Did you try specifying ./configure 
LDFLAGS=-static?  While just as cumbersome and obscure of a solution, at 
least that one can be argued to be correct as MOAB has no way of knowing 
that the application intends to link with -static (assuming it because 
MOAB is being built as a static library is not correct in all cases.)

A more robust solution that we could implement in MOAB would be to ( 
after determining whether or not -lz and/or -lsz are required to link 
the HDF5 library) check whether or not the HDF5 library contains the 
H5Pset_deflate and/or H5Pset_szip and add -lz or -lsz, respectively, 
when those functions are present and we haven't already added those link 
flags, even though the HDF5 library does not appear to require them for 
linking.  Specifying them explicitly for a shared HDF5 shouldn't hurt 
anything and this way when the choice of which HDF5 library to use 
(shared vs. static) changes underneath us things still work.

- jason


More information about the moab-dev mailing list