Hi, dnewh...@rockwellcollins.com <dnewh...@rockwellcollins.com> writes:
> I am starting a new project and I want to know if anyone has successfully > built Xerxces 3.0.1 on LynxOS. I think we will be using the PowerPC > platform. We successfully built and tested Xerces-C++ 3.0.1 on LynxOS 4.2 as part of a port of CodeSynthesis XSD[1] for a client. The major obstacle in building Xerces-C++ on this platform is the lack of Unicode support. Because of that, one has to use the ICU library which does not support easy cross-compilation. Here are the instructions I found on the net for building ICU 3.6 in a Linux-to-LynxOS cross development environment: "First build a native ICU (no need to install it). Set environment variable NATIVEBINDIR to the bin dir of the native build (/some/path/icu/source/bin). List the libraries in /some/path/icu/source/lib in LD_PRELOAD (libicutu.so.36, libicui18n.so.36, libicuuc.so.36, libicui18n.so.36, libicudata.so.36). Unpack the ICU source again to some other destination and apply the attached patch". Then I configured and built ICU for LynxOS like so: $ ./configure --disable-64bit-libs --disable-shared --enable-static \ --disable-extras --disable-icuio --disable-layout --disable-tests \ --disable-samples --prefix=/tmp/lynx42 CC=gcc CXX=g++ CFLAGS=-O3 \ CXXFLAGS=-O3 --host=i386-lynx-lynxos --disable-threads $ make You may get some warnings during compilation about not being able to load the libraries from LD_PRELOAD for some commands. You can ignore them (I think this has to do with the fact that LynxOS toolchain binaries are in the a.out format instead of ELF). Then you will need to unpack the Xerces-C++ 3.0.1 source code and comment out the call to abspath() in src/xercesc/util/FileManagers/PosixFileMgr.cpp You can just comment the whole body of getFullPath() and simply return 0; from this function. This function is not used anywhere in the Xerces-C++ source code and we should probably remove it altogether. After that, configure Xerces-C++ like so: ./configure --host=i386-lynx-lynxos --disable-shared \ --enable-msgloader-inmemory --disable-network --disable-threads \ CFLAGS=-O3 CXXFLAGS=-O3 --enable-transcoder-icu \ CPPFLAGS="-DNDEBUG -I/tmp/lynx42/include" LDFLAGS=-L/tmp/lynx42/lib \ --with-icu=/tmp/lynx42 Then cd to src/ and run make. When building our own applications, you will need to link to libxerces-c.a, as well as to libicuuc.a and libicudata.a [1] http://www.codesynthesis.com/products/xsd Boris -- Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog Open source XML data binding for C++: http://codesynthesis.com/products/xsd Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde