[xsd-users] Request for Mac OS X 64-bit binaries
Boris Kolpackov
boris at codesynthesis.com
Tue Dec 2 03:35:13 EST 2014
Hi Randall,
Randall Britten <r.britten at auckland.ac.nz> writes:
> I’m trying out XSD, and I’ve managed to generate code and compile
> code for the schema document of interest (http://www.fieldml.org/
> resources/xml/0.5/FieldML_0.5.xsd). I used homebrew to install
> xerces-c, and so I think its libraries are 64-bit, so I haven’t
> managed to link yet. Would it be possible for you to please
> make 64-bit Mac OS X binaries available?
I don't see how a 64-bit binary of the XSD compiler will help you
here. If you are able to run the existing MacOS XSD binary (and you
are), then you don't need a 64-bit one. The 64-bit one would generate
identical C++ source code.
If you are having problems linking your application to Xerces-C++,
then this could be due to several reasons:
1. Different width (32/64). You can try to pass -m64 or -m32 when
building your application and see if that makes a difference.
2. Different C++ compilers and/or C++ runtimes used. This is actually
a big mess at the moment in MacOS since there are two C++ runtimes
(Clang's libc++ and GCC's libstdc++). So what very well could have
happened is that Brew used GCC to build Xerces-C++ and linked it
to libstdc++ while you are using Clang to build your application
and linking to libc++. As you can probably guess, nothing good is
going to come out of it.
As a result, what I would strongly recommend is that you scrap Brew
(i.e., uninstall Xerces-C++) and build everything yourself using
exactly the same compiler for everything (I would suggest the default
clang from the command line tools). Building Xerces-C++ should be a
simple matter of running:
./configure CC=clang CXX=clang++
make
sudo make install
> Also, I had to make a minor modification to the above document so
> that it only referred to local schemas, I kept on getting
> “FieldML_0.5.xsd: error: 'http://www.cellml.org/tools/cellml_1_1_
> schema/common/xlink-href.xsd': unable to open in read mode”.
See the --location-map option in the XSD command line manual.
Boris
More information about the xsd-users
mailing list