Re: Re: Problems compiling libsbml on the Mac
31 Jan '06 11:27
Thanks for the problem report. However, I must say I'm perplexed. I
develop libSBML on my Mac laptop and have never encountered this
problem nor do I recall any other Mac users reporting it. Not to
mention that #include <expat.h> should search in standard system
location (e.g. /usr/local/include) and not the current directory. See:
That's not to say I don't believe you. I certainly do. I also know
the Mac OS filesystem is case-insensitive. I'm just curious what's
different about your build setup. Can you send me (privately) your
config.log file or the command-line used to compile
xml/StreamFormatTarget.cpp? I'm most interested in the order of the
include directories passed to g++.
I'll fix this by renaming those two files in the next release.
Thanks (and sorry for the trouble).
On Jan 31, 2006, at 10:43 AM, Anthony Liekens wrote:
> I have found the problem, and was able to solve my libsbml+expat
> compilation problems on the mac.
> The problem resides in the weirdness of case-insensitivity in the mac
> file system (i.e. a file "file.cpp" is the same as "FiLe.CpP" on a
> * src/xml/StreamFormatTarget.cpp has an #include <expat.h>
> * the src/xml directory contains Expat.h and Expat.cpp files to wrap
> expat.h as a C++ classes
> * instead of including /usr/include/expat.h (or wherever the header
> file may reside) in StreamFormatTarget.cpp, it looked no further than
> its local directory for includes, and included "Expat.h" where
> /usr/include/expat.h was intended
> A solution for this problem:
> * rename the Expat.h and Expat.cpp files in src/xml to ExpatWrapper.h
> and ExpatWrapper.cpp
> * make sure that the files that include Expat.h (with capital) are
> updated with this new filename (not only in src/xml but also in
> src/math/MathMLHandler.h, src/sbml/SBMLHandler.h, )
> * make sure that makefile(.in) files are also updated
> * try compiling, and it'll work!
> I know, it's really weird and un-UNIX-y, but unfortenately this is how
> Mac OS X is built ... I hope this solution can be patched in future
> libsbml releases!
Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)