Xalan-C build on Mac OS X Snow Leopard

View: New views
6 Messages — Rating Filter:   Alert me  

Xalan-C build on Mac OS X Snow Leopard

by xn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm having problems building Xalan-C for Mac OS X Snow Leopard - I don't think there are binaries available for this platform. I've got Xerces-C-2_8_0 working (I think) and installed in /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/ but when I download, unzip and untar Xalan-C_1_10-src.tar.gz to /Users/christian/temp/ and try to build it from the resulting ~/temp/xml-xalan/c/ directory, it won't work.
I have set $XERCESCROOT to /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0
and $XALANCROOT to /Users/christian/temp/xml-xalan/c
and added /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0 to $PATH
and $DYLD_LIBRARY_PATH is /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib:
Then,
./runConfigure -p macosx -c gcc -x g++
seems to set up the configuration OK, but when I run 'make' I get problems starting with:
ld: warning: in /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib/libxerces-c.dylib, file is not of required architecture
I've tried reinstalling the latest version of XCode, but it doesn't help. Any help would be much appreciated - I'm a bit new to this.
Cheers,
Christian

Here's the full output from make:

make -C src/xalanc all
Preparing the directory structure for a build ...
mkdir -p ../../obj
mkdir -p ../../lib
mkdir -p ../../bin
make -C Utils prepare
mkdir -p ../../../nls
mkdir -p ../../../nls/include
make -C Utils locale
make -C MsgCreator
g++ -O -DNDEBUG     -fno-elide-constructors -Wall -fno-elide-constructors -DMACOSX -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS -DXALAN_INMEM_MSG_LOADER -c -I/Users/christian/temp/xml-xalan/c/src -I/Users/christian/temp/xml-xalan/c/include -I../../../../nls/include -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//src/ -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/xercesc -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/  -o ../../../../obj/MsgFileOutputStream.o /Users/christian/temp/xml-xalan/c/src/xalanc/Utils/MsgCreator/MsgFileOutputStream.cpp
g++ -O -DNDEBUG     -fno-elide-constructors -Wall -fno-elide-constructors -DMACOSX -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS -DXALAN_INMEM_MSG_LOADER -c -I/Users/christian/temp/xml-xalan/c/src -I/Users/christian/temp/xml-xalan/c/include -I../../../../nls/include -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//src/ -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/xercesc -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/  -o ../../../../obj/ICUResHandler.o /Users/christian/temp/xml-xalan/c/src/xalanc/Utils/MsgCreator/ICUResHandler.cpp
g++ -O -DNDEBUG     -fno-elide-constructors -Wall -fno-elide-constructors -DMACOSX -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS -DXALAN_INMEM_MSG_LOADER -c -I/Users/christian/temp/xml-xalan/c/src -I/Users/christian/temp/xml-xalan/c/include -I../../../../nls/include -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//src/ -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/xercesc -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/  -o ../../../../obj/InMemHandler.o /Users/christian/temp/xml-xalan/c/src/xalanc/Utils/MsgCreator/InMemHandler.cpp
g++ -O -DNDEBUG     -fno-elide-constructors -Wall -fno-elide-constructors -DMACOSX -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS -DXALAN_INMEM_MSG_LOADER -c -I/Users/christian/temp/xml-xalan/c/src -I/Users/christian/temp/xml-xalan/c/include -I../../../../nls/include -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//src/ -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/xercesc -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/  -o ../../../../obj/MsgCreator.o /Users/christian/temp/xml-xalan/c/src/xalanc/Utils/MsgCreator/MsgCreator.cpp
g++ -O -DNDEBUG     -fno-elide-constructors -Wall -fno-elide-constructors -DMACOSX -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS -DXALAN_INMEM_MSG_LOADER -c -I/Users/christian/temp/xml-xalan/c/src -I/Users/christian/temp/xml-xalan/c/include -I../../../../nls/include -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//src/ -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/xercesc -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/  -o ../../../../obj/NLSHandler.o /Users/christian/temp/xml-xalan/c/src/xalanc/Utils/MsgCreator/NLSHandler.cpp
g++ -O -DNDEBUG     -fno-elide-constructors -Wall -fno-elide-constructors -DMACOSX -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS -DXALAN_INMEM_MSG_LOADER -c -I/Users/christian/temp/xml-xalan/c/src -I/Users/christian/temp/xml-xalan/c/include -I../../../../nls/include -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//src/ -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/xercesc -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//include/  -o ../../../../obj/SAX2Handler.o /Users/christian/temp/xml-xalan/c/src/xalanc/Utils/MsgCreator/SAX2Handler.cpp
g++ -O -DNDEBUG     -fno-elide-constructors -Wall -fno-elide-constructors -DMACOSX -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS  -DXALAN_INMEM_MSG_LOADER   \
          -L/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0//lib -lxerces-c ../../../../obj/MsgFileOutputStream.o ../../../../obj/ICUResHandler.o ../../../../obj/InMemHandler.o ../../../../obj/MsgCreator.o ../../../../obj/NLSHandler.o ../../../../obj/SAX2Handler.o -o ../../../../bin/MsgCreator
ld: warning: in /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib/libxerces-c.dylib, file is not of required architecture
Undefined symbols:
  "xercesc_2_8::XMLString::release(char**)", referenced from:
      XalanFileOutputStream::writeAsASCII(unsigned short const*, unsigned int)in MsgFileOutputStream.o
      _main in MsgCreator.o
      _main in MsgCreator.o
      _main in MsgCreator.o
      _main in MsgCreator.o
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
  "xercesc_2_8::XMLString::release(unsigned short**)", referenced from:
      XalanFileOutputStream::write(char const*, unsigned int)in MsgFileOutputStream.o
      SAX2Handler::setLocale(char const*)in SAX2Handler.o
      SAX2Handler::~SAX2Handler()in SAX2Handler.o
      SAX2Handler::~SAX2Handler()in SAX2Handler.o
  "typeinfo for xercesc_2_8::SAXParseException", referenced from:
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in ICUResHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in InMemHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in MsgCreator.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in NLSHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in SAX2Handler.o
  "xercesc_2_8::XMLUni::fgXercesDynamic", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::XMLPlatformUtils::Initialize(char const*, char const*, xercesc_2_8::PanicHandler*, xercesc_2_8::MemoryManager*, bool)", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::SAXParseException::SAXParseException(xercesc_2_8::SAXParseException const&)", referenced from:
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in ICUResHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in InMemHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in MsgCreator.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in NLSHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in SAX2Handler.o
  "xercesc_2_8::XMLUni::fgXercesSchema", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::XMLUni::fgXercescDefaultLocale", referenced from:
      _main in MsgCreator.o
  "typeinfo for xercesc_2_8::XMLException", referenced from:
      _main.lsda in MsgCreator.o
  "xercesc_2_8::XMLUni::fgXercesSchemaFullChecking", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::XMLPlatformUtils::Terminate()", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::XMLUni::fgSAX2CoreValidation", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::XMLReaderFactory::createXMLReader(xercesc_2_8::MemoryManager*, xercesc_2_8::XMLGrammarPool*)", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::SAXParseException::getSystemId() const", referenced from:
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
  "xercesc_2_8::XMLPlatformUtils::fgMemoryManager", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::XMLUni::fgSAX2CoreNameSpacePrefixes", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::XMLString::compareString(unsigned short const*, unsigned short const*)", referenced from:
      ICUResHandler::endElement(unsigned short const*, unsigned short const*, unsigned short const*)in ICUResHandler.o
      ICUResHandler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_2_8::Attributes const&)in ICUResHandler.o
      ICUResHandler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_2_8::Attributes const&)in ICUResHandler.o
      InMemHandler::endElement(unsigned short const*, unsigned short const*, unsigned short const*)in InMemHandler.o
      InMemHandler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_2_8::Attributes const&)in InMemHandler.o
      InMemHandler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_2_8::Attributes const&)in InMemHandler.o
      SAX2Handler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_2_8::Attributes const&)in SAX2Handler.o
      SAX2Handler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_2_8::Attributes const&)in SAX2Handler.o
  "xercesc_2_8::XMLString::stringLen(char const*)", referenced from:
      SAX2Handler::printToIndexFile(char const**)in SAX2Handler.o
      SAX2Handler::startElement(unsigned short const*, unsigned short const*, unsigned short const*, xercesc_2_8::Attributes const&)in SAX2Handler.o
  "xercesc_2_8::XMLString::transcode(char const*)", referenced from:
      XalanFileOutputStream::write(char const*, unsigned int)in MsgFileOutputStream.o
      SAX2Handler::setLocale(char const*)in SAX2Handler.o
  "xercesc_2_8::XMLString::transcode(unsigned short const*)", referenced from:
      XalanFileOutputStream::writeAsASCII(unsigned short const*, unsigned int)in MsgFileOutputStream.o
      _main in MsgCreator.o
      _main in MsgCreator.o
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
  "xercesc_2_8::XMLUni::fgSAX2CoreNameSpaces", referenced from:
      _main in MsgCreator.o
  "xercesc_2_8::SAXParseException::~SAXParseException()", referenced from:
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in ICUResHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in InMemHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in MsgCreator.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in NLSHandler.o
      xercesc_2_8::DefaultHandler::fatalError(xercesc_2_8::SAXParseException const&)in SAX2Handler.o
  "xercesc_2_8::SAXParseException::getColumnNumber() const", referenced from:
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
  "xercesc_2_8::SAXParseException::getLineNumber() const", referenced from:
      SAX2Handler::error(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::warning(xercesc_2_8::SAXParseException const&)    in SAX2Handler.o
      SAX2Handler::fatalError(xercesc_2_8::SAXParseException const&)     in SAX2Handler.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [../../../../bin/MsgCreator] Error 1
make[2]: *** [../../../bin/MsgCreator] Error 2
make[1]: *** [locale] Error 2
make: *** [all] Error 2

Re: Xalan-C build on Mac OS X Snow Leopard

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

xn wrote:

> I'm having problems building Xalan-C for Mac OS X Snow Leopard - I don't
> think there are binaries available for this platform. I've got
> Xerces-C-2_8_0 working (I think) and installed in
> /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/ but when I download, unzip and
> untar Xalan-C_1_10-src.tar.gz to /Users/christian/temp/ and try to build it
> from the resulting ~/temp/xml-xalan/c/ directory, it won't work.
> I have set $XERCESCROOT to /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0
> and $XALANCROOT to /Users/christian/temp/xml-xalan/c
> and added /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0 to $PATH
> and $DYLD_LIBRARY_PATH is /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib:
> Then,
> ./runConfigure -p macosx -c gcc -x g++
> seems to set up the configuration OK, but when I run 'make' I get problems
> starting with:
> ld: warning: in
> /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib/libxerces-c.dylib, file is
> not of required architecture
This indicates the Xerces-C binary you built is for a different
architecture than the Xalan-C binaries you're linking with it. When you
way you "think" you've got Xerces-C working, can you provide more
details, like the flags you provided to the Xerces-C runConfigure
script?  Also, it would be helpful if you could provide a dump of the
header of the Xerces-C shared object, using otool:

otool -h libxerces-c.dylib

You can find more information about deciphering this output here:

http://0xfe.blogspot.com/2006/03/how-os-x-executes-applications.html

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@...
For additional commands, e-mail: xalan-dev-help@...


Re: Xalan-C build on Mac OS X Snow Leopard

by xn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for your reply, Dave - the output from the otool command you suggested is:
libxerces-c.dylib:
Mach header
      magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
 0xfeedface       7          3  0x00          6    13       1856 0x00118085
I don't understand it all, but from the link you suggested, it seems to be the correct architecture (i386, 32-bit). (BTW, *is* this correct for a MacBook Pro? I had thought that these were 64-bit, but everything I've installed and compiled has been 32-bit)
I didn't actually compile Xerces, but installed the binary: the reason I think it is working is that I tried some of the Samples included in the installation and they seemed to parse the XML properly - e.g. running:
SAXCount personal.xml
in /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/samples/data/
gives:
personal.xml: 15 ms (37 elems, 12 attrs, 134 spaces, 134 chars)
which I suppose is the correct breakdown of that XML file.
Thanks for your help,
Christian

David Bertoni wrote:
xn wrote:
> I'm having problems building Xalan-C for Mac OS X Snow Leopard - I don't
> think there are binaries available for this platform. I've got
> Xerces-C-2_8_0 working (I think) and installed in
> /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/ but when I download, unzip and
> untar Xalan-C_1_10-src.tar.gz to /Users/christian/temp/ and try to build it
> from the resulting ~/temp/xml-xalan/c/ directory, it won't work.
> I have set $XERCESCROOT to /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0
> and $XALANCROOT to /Users/christian/temp/xml-xalan/c
> and added /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0 to $PATH
> and $DYLD_LIBRARY_PATH is /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib:
> Then,
> ./runConfigure -p macosx -c gcc -x g++
> seems to set up the configuration OK, but when I run 'make' I get problems
> starting with:
> ld: warning: in
> /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib/libxerces-c.dylib, file is
> not of required architecture
This indicates the Xerces-C binary you built is for a different
architecture than the Xalan-C binaries you're linking with it. When you
way you "think" you've got Xerces-C working, can you provide more
details, like the flags you provided to the Xerces-C runConfigure
script?  Also, it would be helpful if you could provide a dump of the
header of the Xerces-C shared object, using otool:

otool -h libxerces-c.dylib

You can find more information about deciphering this output here:

http://0xfe.blogspot.com/2006/03/how-os-x-executes-applications.html

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org

Re: Xalan-C build on Mac OS X Snow Leopard

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

xn wrote:

> Thanks for your reply, Dave - the output from the otool command you suggested
> is:
> libxerces-c.dylib:
> Mach header
>       magic cputype cpusubtype  caps    filetype ncmds sizeofcmds      flags
>  0xfeedface       7          3  0x00          6    13       1856 0x00118085
> I don't understand it all, but from the link you suggested, it seems to be
> the correct architecture (i386, 32-bit). (BTW, *is* this correct for a
> MacBook Pro? I had thought that these were 64-bit, but everything I've
> installed and compiled has been 32-bit)
As far as I know, OS X is not yet fully 64-bit, so perhaps the default
for most binaries is to build 32-bit versions.

> I didn't actually compile Xerces, but installed the binary: the reason I
> think it is working is that I tried some of the Samples included in the
> installation and they seemed to parse the XML properly - e.g. running:
> SAXCount personal.xml
> in /usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/samples/data/
> gives:
> personal.xml: 15 ms (37 elems, 12 attrs, 134 spaces, 134 chars)
> which I suppose is the correct breakdown of that XML file.
Yes, I would assume the binary distribution would work.

I think you may be generating 64-bit Xalan-C object files. That would
happen if the default for your version of gcc is 64-bit. You might try
to add a few flags to the runConfigure command for Xalan-C:

-z -m32 -l -m32

that should force 32-bit binaries.

Also, could you supply the actual runConfigure command line you used?
Unfortunately, it looks like using "-b 32" won't force a 32-bit build on
64-bit platforms.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@...
For additional commands, e-mail: xalan-dev-help@...


Re: Xalan-C build on Mac OS X Snow Leopard

by xn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Dave,

Also, could you supply the actual runConfigure command line you used?
Unfortunately, it looks like using "-b 32" won't force a 32-bit build on
64-bit platforms.
A bit of progress- with the following runConfigure commmand:
./runConfigure -p macosx -c gcc -x g++ -z -m32 -l -m32
I get the output:
Generating makefiles with the following options ...
Platform: macosx
C Compiler: gcc
C++ Compiler: g++
Extra compile options:  -m32
Extra link options:  -m32
Transcoder: default
Localization system: inmem
Locale: en_US
Thread option:
bitsToBuild option: 32
Extra configure options:
Debug is OFF

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for autoconf... autoconf
checking whether -fno-elide-constructors works correctly... yes
checking build system type... i686-apple-darwin10.0.0
checking host system type... i686-apple-darwin10.0.0
checking for floor in -lm... yes
checking how to run the C++ preprocessor... g++ -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for mbstowcs... yes
checking if mbstowcs can count only... yes
configure: creating ./config.status
config.status: creating Makefile.incl
config.status: creating Makefile
config.status: creating src/xalanc/Makefile
config.status: creating src/xalanc/Utils/Makefile
config.status: creating src/xalanc/Utils/MsgCreator/Makefile
config.status: creating src/xalanc/Utils/XalanMsgLib/Makefile
config.status: creating samples/Makefile
config.status: creating Tests/Makefile

If the result of the above commands look OK to you, go to the directory
/Users/christian/temp/xml-xalan/c and type "gmake" or "make" to make the XALAN-C system.

Note: You must use GNU make to use the Xalan Makefile.

and when I "make", it gets a lot further through compiling... before falling over with undefined symbols: Here's where I think it all goes wrong (apart from some earlier deprecated header warnings):

... mostly good stuff, then:
In file included from /usr/include/c++/4.2.1/backward/strstream:51,
                 from /Users/christian/temp/xml-xalan/c/src/xalanc/Harness/XalanFileUtility.hpp:30,
                 from /Users/christian/temp/xml-xalan/c/src/xalanc/Harness/XalanFileUtility.cpp:17:
/usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
g++ -m32 -O -DNDEBUG     -fno-elide-constructors -Wall -fno-elide-constructors -DMACOSX -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS -DXALAN_INMEM_MSG_LOADER -c -I/Users/christian/temp/xml-xalan/c/src -I/Users/christian/temp/xml-xalan/c/include -I../../nls/include -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/src/ -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/include/xercesc -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/include/  -o ../../obj/XalanXMLFileReporter.o /Users/christian/temp/xml-xalan/c/src/xalanc/Harness/XalanXMLFileReporter.cpp
g++ -m32 -O -DNDEBUG     -fno-elide-constructors -DMACOSX -dynamiclib -prebind -seg1addr 0x38000000  -compatibility_version 1 -current_version 1.10 -install_name libxalan-c.dylib -m32     -lm  -lpthread  -L/usr/lib -L/usr/local/lib -L/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib -lxerces-c -L../../lib -lxalanMsg ../../obj/XalanAttr.o ../../obj/XalanCDataSection.o ../../obj/XalanCharacterData.o ../../obj/XalanComment.o ../../obj/XalanDOMException.o ../../obj/XalanDOMImplementation.o ../../obj/XalanDOMInit.o ../../obj/XalanDOMString.o ../../obj/XalanDocument.o ../../obj/XalanDocumentFragment.o ../../obj/XalanDocumentType.o ../../obj/XalanElement.o ../../obj/XalanEmptyNamedNodeMap.o ../../obj/XalanEntity.o ../../obj/XalanEntityReference.o ../../obj/XalanNamedNodeMap.o ../../obj/XalanNode.o ../../obj/XalanNodeList.o ../../obj/XalanNodeListDummy.o ../../obj/XalanNodeListSurrogate.o ../../obj/XalanNotation.o ../../obj/XalanProcessingInstruction.o ../../obj/XalanText.o ../../obj/AttributeListImpl.o ../../obj/AttributesImpl.o ../../obj/DOMStringHelper.o ../../obj/DOMStringPrintWriter.o ../../obj/DoubleSupport.o ../../obj/ExecutionContext.o ../../obj/FormatterListener.o ../../obj/NamedNodeMapAttributeList.o ../../obj/NullPrintWriter.o ../../obj/PlatformSupportInit.o ../../obj/PrefixResolver.o ../../obj/PrintWriter.o ../../obj/Resettable.o ../../obj/StdBinInputStream.o ../../obj/StringTokenizer.o ../../obj/URISupport.o ../../obj/Writer.o ../../obj/XSLException.o ../../obj/XalanBitmap.o ../../obj/XalanDOMStringAllocator.o ../../obj/XalanDOMStringCache.o ../../obj/XalanDOMStringHashTable.o ../../obj/XalanDOMStringPool.o ../../obj/XalanDOMStringReusableAllocator.o ../../obj/XalanDecimalFormatSymbols.o ../../obj/XalanEncodingPropertyCache.o ../../obj/XalanFStreamOutputStream.o ../../obj/XalanFileOutputStream.o ../../obj/XalanICUMessageLoader.o ../../obj/XalanInMemoryMessageLoader.o ../../obj/XalanMemoryManagement.o ../../obj/XalanMemoryManagerDefault.o ../../obj/XalanMessageLoader.o ../../obj/XalanNLSMessageLoader.o ../../obj/XalanNullOutputStream.o ../../obj/XalanNumberFormat.o ../../obj/XalanOutputStream.o ../../obj/XalanOutputStreamPrintWriter.o ../../obj/XalanParsedURI.o ../../obj/XalanReferenceCountedObject.o ../../obj/XalanSimplePrefixResolver.o ../../obj/XalanStdOutputStream.o ../../obj/XalanToXercesTranscoderWrapper.o ../../obj/XalanTranscodingServices.o ../../obj/XalanUTF16Transcoder.o ../../obj/XalanXMLChar.o ../../obj/DOMServices.o ../../obj/DOMSupport.o ../../obj/DOMSupportDefault.o ../../obj/DOMSupportException.o ../../obj/DOMSupportInit.o ../../obj/TreeWalker.o ../../obj/XalanDocumentPrefixResolver.o ../../obj/XalanNamespacesStack.o ../../obj/FormatterToDOM.o ../../obj/FormatterToHTML.o ../../obj/FormatterToNull.o ../../obj/FormatterToText.o ../../obj/FormatterToXML.o ../../obj/FormatterTreeWalker.o ../../obj/XMLParserLiaison.o ../../obj/XMLSupportException.o ../../obj/XMLSupportInit.o ../../obj/XalanHTMLElementsProperties.o ../../obj/XalanUTF16Writer.o ../../obj/XalanUTF8Writer.o ../../obj/XalanXMLSerializerBase.o ../../obj/XalanXMLSerializerFactory.o ../../obj/ElementPrefixResolverProxy.o ../../obj/FormatterStringLengthCounter.o ../../obj/Function.o ../../obj/FunctionConcat.o ../../obj/FunctionContains.o ../../obj/FunctionID.o ../../obj/FunctionLang.o ../../obj/FunctionNamespaceURI.o ../../obj/FunctionNormalizeSpace.o ../../obj/FunctionStartsWith.o ../../obj/FunctionString.o ../../obj/FunctionSubstring.o ../../obj/FunctionSubstringAfter.o ../../obj/FunctionSubstringBefore.o ../../obj/FunctionTranslate.o ../../obj/MutableNodeRefList.o ../../obj/NodeRefList.o ../../obj/NodeRefListBase.o ../../obj/XBoolean.o ../../obj/XNodeSet.o ../../obj/XNodeSetAllocator.o ../../obj/XNodeSetBase.o ../../obj/XNodeSetNodeProxy.o ../../obj/XNodeSetNodeProxyAllocator.o ../../obj/XNodeSetResultTreeFragProxy.o ../../obj/XNull.o ../../obj/XNumber.o ../../obj/XNumberAllocator.o ../../obj/XNumberBase.o ../../obj/XObject.o ../../obj/XObjectFactory.o ../../obj/XObjectFactoryDefault.o ../../obj/XObjectResultTreeFragProxy.o ../../obj/XObjectResultTreeFragProxyBase.o ../../obj/XObjectResultTreeFragProxyText.o ../../obj/XObjectTypeCallback.o ../../obj/XPath.o ../../obj/XPathAllocator.o ../../obj/XPathConstructionContext.o ../../obj/XPathConstructionContextDefault.o ../../obj/XPathEnvSupport.o ../../obj/XPathEnvSupportDefault.o ../../obj/XPathEvaluator.o ../../obj/XPathExecutionContext.o ../../obj/XPathExecutionContextDefault.o ../../obj/XPathExpression.o ../../obj/XPathFactory.o ../../obj/XPathFactoryBlock.o ../../obj/XPathFactoryDefault.o ../../obj/XPathFunctionTable.o ../../obj/XPathInit.o ../../obj/XPathParserException.o ../../obj/XPathProcessor.o ../../obj/XPathProcessorImpl.o ../../obj/XSpan.o ../../obj/XString.o ../../obj/XStringAdapter.o ../../obj/XStringAdapterAllocator.o ../../obj/XStringAllocator.o ../../obj/XStringBase.o ../../obj/XStringCached.o ../../obj/XStringCachedAllocator.o ../../obj/XStringReference.o ../../obj/XStringReferenceAllocator.o ../../obj/XToken.o ../../obj/XTokenNumberAdapter.o ../../obj/XTokenNumberAdapterAllocator.o ../../obj/XTokenStringAdapter.o ../../obj/XTokenStringAdapterAllocator.o ../../obj/XUnknown.o ../../obj/XalanDocumentFragmentNodeRefListBaseProxy.o ../../obj/XalanQName.o ../../obj/XalanQNameByReference.o ../../obj/XalanQNameByValue.o ../../obj/XalanQNameByValueAllocator.o ../../obj/XalanXPathException.o ../../obj/FormatterToXercesDOM.o ../../obj/XercesAttrWrapper.o ../../obj/XercesAttrWrapperAllocator.o ../../obj/XercesCDATASectionWrapper.o ../../obj/XercesCommentWrapper.o ../../obj/XercesDOMException.o ../../obj/XercesDOMFormatterWalker.o ../../obj/XercesDOMImplementationWrapper.o ../../obj/XercesDOMSupport.o ../../obj/XercesDOMWalker.o ../../obj/XercesDOMWrapperException.o ../../obj/XercesDocumentTypeWrapper.o ../../obj/XercesDocumentWrapper.o ../../obj/XercesElementWrapper.o ../../obj/XercesElementWrapperAllocator.o ../../obj/XercesEntityReferenceWrapper.o ../../obj/XercesEntityWrapper.o ../../obj/XercesLiaisonXalanDOMStringPool.o ../../obj/XercesNamedNodeMapAttributeList.o ../../obj/XercesNamedNodeMapWrapper.o ../../obj/XercesNodeListWrapper.o ../../obj/XercesNotationWrapper.o ../../obj/XercesParserLiaison.o ../../obj/XercesProcessingInstructionWrapper.o ../../obj/XercesTextWrapper.o ../../obj/XercesTextWrapperAllocator.o ../../obj/XercesWrapperHelper.o ../../obj/XercesWrapperNavigator.o ../../obj/XercesWrapperNavigatorAllocator.o ../../obj/XercesWrapperToXalanNodeMap.o ../../obj/FormatterToDeprecatedXercesDOM.o ../../obj/XercesAttrBridge.o ../../obj/XercesAttributeBridgeAllocator.o ../../obj/XercesBridgeHelper.o ../../obj/XercesBridgeNavigator.o ../../obj/XercesCDATASectionBridge.o ../../obj/XercesCommentBridge.o ../../obj/XercesDOMImplementationBridge.o ../../obj/XercesDOM_NodeHack.o ../../obj/XercesDocumentBridge.o ../../obj/XercesDocumentFragmentBridge.o ../../obj/XercesDocumentTypeBridge.o ../../obj/XercesElementBridge.o ../../obj/XercesElementBridgeAllocator.o ../../obj/XercesEntityBridge.o ../../obj/XercesEntityReferenceBridge.o ../../obj/XercesNamedNodeMapBridge.o ../../obj/XercesNodeListBridge.o ../../obj/XercesNotationBridge.o ../../obj/XercesProcessingInstructionBridge.o ../../obj/XercesTextBridge.o ../../obj/XercesTextBridgeAllocator.o ../../obj/XercesToXalanNodeMap.o ../../obj/XercesTreeWalker.o ../../obj/FormatterToSourceTree.o ../../obj/XalanSourceTreeAttr.o ../../obj/XalanSourceTreeAttrNS.o ../../obj/XalanSourceTreeAttributeAllocator.o ../../obj/XalanSourceTreeAttributeNSAllocator.o ../../obj/XalanSourceTreeComment.o ../../obj/XalanSourceTreeCommentAllocator.o ../../obj/XalanSourceTreeContentHandler.o ../../obj/XalanSourceTreeDOMSupport.o ../../obj/XalanSourceTreeDocument.o ../../obj/XalanSourceTreeDocumentFragment.o ../../obj/XalanSourceTreeElement.o ../../obj/XalanSourceTreeElementA.o ../../obj/XalanSourceTreeElementAAllocator.o ../../obj/XalanSourceTreeElementANS.o ../../obj/XalanSourceTreeElementANSAllocator.o ../../obj/XalanSourceTreeElementNA.o ../../obj/XalanSourceTreeElementNAAllocator.o ../../obj/XalanSourceTreeElementNANS.o ../../obj/XalanSourceTreeElementNANSAllocator.o ../../obj/XalanSourceTreeHelper.o ../../obj/XalanSourceTreeInit.o ../../obj/XalanSourceTreeParserLiaison.o ../../obj/XalanSourceTreeProcessingInstruction.o ../../obj/XalanSourceTreeProcessingInstructionAllocator.o ../../obj/XalanSourceTreeText.o ../../obj/XalanSourceTreeTextAllocator.o ../../obj/XalanSourceTreeTextIWS.o ../../obj/XalanSourceTreeTextIWSAllocator.o ../../obj/XPathCAPI.o ../../obj/AVT.o ../../obj/AVTPart.o ../../obj/AVTPartSimple.o ../../obj/AVTPartXPath.o ../../obj/Constants.o ../../obj/CountersTable.o ../../obj/ElemApplyImport.o ../../obj/ElemApplyTemplates.o ../../obj/ElemAttribute.o ../../obj/ElemAttributeSet.o ../../obj/ElemCallTemplate.o ../../obj/ElemChoose.o ../../obj/ElemComment.o ../../obj/ElemCopy.o ../../obj/ElemCopyOf.o ../../obj/ElemDecimalFormat.o ../../obj/ElemElement.o ../../obj/ElemEmpty.o ../../obj/ElemExtensionCall.o ../../obj/ElemFallback.o ../../obj/ElemForEach.o ../../obj/ElemForwardCompatible.o ../../obj/ElemIf.o ../../obj/ElemLiteralResult.o ../../obj/ElemMessage.o ../../obj/ElemNumber.o ../../obj/ElemOtherwise.o ../../obj/ElemPI.o ../../obj/ElemParam.o ../../obj/ElemSort.o ../../obj/ElemTemplate.o ../../obj/ElemTemplateElement.o ../../obj/ElemText.o ../../obj/ElemTextLiteral.o ../../obj/ElemUse.o ../../obj/ElemValueOf.o ../../obj/ElemVariable.o ../../obj/ElemWhen.o ../../obj/ElemWithParam.o ../../obj/ExtensionFunctionHandler.o ../../obj/ExtensionNSHandler.o ../../obj/FunctionCurrent.o ../../obj/FunctionDocument.o ../../obj/FunctionElementAvailable.o ../../obj/FunctionFormatNumber.o ../../obj/FunctionFunctionAvailable.o ../../obj/FunctionGenerateID.o ../../obj/FunctionKey.o ../../obj/FunctionSystemProperty.o ../../obj/FunctionUnparsedEntityURI.o ../../obj/GenerateEvent.o ../../obj/KeyTable.o ../../obj/NamespacesHandler.o ../../obj/NodeSortKey.o ../../obj/NodeSorter.o ../../obj/OutputContextStack.o ../../obj/ProblemListener.o ../../obj/ProblemListenerDefault.o ../../obj/ResultNamespacesStack.o ../../obj/SelectionEvent.o ../../obj/Stylesheet.o ../../obj/StylesheetConstructionContext.o ../../obj/StylesheetConstructionContextDefault.o ../../obj/StylesheetExecutionContext.o ../../obj/StylesheetExecutionContextDefault.o ../../obj/StylesheetHandler.o ../../obj/StylesheetRoot.o ../../obj/TopLevelArg.o ../../obj/TraceListener.o ../../obj/TraceListenerDefault.o ../../obj/TracerEvent.o ../../obj/VariablesStack.o ../../obj/XResultTreeFrag.o ../../obj/XResultTreeFragAllocator.o ../../obj/XSLTEngineImpl.o ../../obj/XSLTInit.o ../../obj/XSLTInputSource.o ../../obj/XSLTProcessor.o ../../obj/XSLTProcessorEnvSupport.o ../../obj/XSLTProcessorEnvSupportDefault.o ../../obj/XSLTProcessorException.o ../../obj/XSLTResultTarget.o ../../obj/XalanAVTAllocator.o ../../obj/XalanAVTPartSimpleAllocator.o ../../obj/XalanAVTPartXPathAllocator.o ../../obj/XalanElemApplyTemplatesAllocator.o ../../obj/XalanElemAttributeAllocator.o ../../obj/XalanElemAttributeSetAllocator.o ../../obj/XalanElemCallTemplateAllocator.o ../../obj/XalanElemElementAllocator.o ../../obj/XalanElemEmptyAllocator.o ../../obj/XalanElemLiteralResultAllocator.o ../../obj/XalanElemTemplateAllocator.o ../../obj/XalanElemTextAllocator.o ../../obj/XalanElemTextLiteralAllocator.o ../../obj/XalanElemValueOfAllocator.o ../../obj/XalanElemVariableAllocator.o ../../obj/XalanMatchPatternData.o ../../obj/XalanMatchPatternDataAllocator.o ../../obj/XalanNumberingResourceBundle.o ../../obj/XalanSourceTreeDocumentAllocator.o ../../obj/XalanSourceTreeDocumentFragmentAllocator.o ../../obj/XalanSpaceNodeTester.o ../../obj/FunctionDifference.o ../../obj/FunctionDistinct.o ../../obj/FunctionEvaluate.o ../../obj/FunctionHasSameNodes.o ../../obj/FunctionIntersection.o ../../obj/FunctionNodeSet.o ../../obj/XalanExtensions.o ../../obj/XalanCAPI.o ../../obj/XalanCompiledStylesheetDefault.o ../../obj/XalanDefaultDocumentBuilder.o ../../obj/XalanDefaultParsedSource.o ../../obj/XalanParsedSource.o ../../obj/XalanSourceTreeWrapperParsedSource.o ../../obj/XalanTransformer.o ../../obj/XalanTransformerOutputStream.o ../../obj/XalanTransformerProblemListener.o ../../obj/XercesDOMParsedSource.o ../../obj/XercesDOMWrapperParsedSource.o ../../obj/XalanEXSLTCommon.o ../../obj/XalanEXSLTDateTime.o ../../obj/XalanEXSLTDynamic.o ../../obj/XalanEXSLTMath.o ../../obj/XalanEXSLTSet.o ../../obj/XalanEXSLTString.o ../../obj/XalanDiagnosticMemoryManager.o ../../obj/XalanFileUtility.o ../../obj/XalanXMLFileReporter.o -o ../../lib/libxalan-c.110.0.dylib
Undefined symbols:
  "xercesc_2_8::MemBufInputSource::~MemBufInputSource()", referenced from:
      _XalanEvaluateXPathAsBoolean in XPathCAPI.o
      _XalanEvaluateXPathAsBoolean in XPathCAPI.o
  "xercesc_2_8::XMLURL::buildFullText()", referenced from:
      xalanc_1_10::XSLTEngineImpl::getStylesheetFromPIURL(xalanc_1_10::XalanDOMString const&, xalanc_1_10::XalanNode&, xalanc_1_10::XalanDOMString const&, bool, xalanc_1_10::StylesheetConstructionContext&)in XSLTEngineImpl.o
      xalanc_1_10::XSLTProcessorEnvSupportDefault::parseXML(xercesc_2_8::MemoryManager&, xalanc_1_10::XalanDOMString const&, xalanc_1_10::XalanDOMString const&)in XSLTProcessorEnvSupportDefault.o
  "xercesc_2_8::DTDEntityDecl::isSerializable() const", referenced from:
      vtable for xercesc_2_8::DTDEntityDeclin XercesParserLiaison.o
  "xercesc_2_8::XMemory::operator new(unsigned long, xercesc_2_8::MemoryManager*)", referenced from:
      xalanc_1_10::URISupport::getURLFromString(unsigned short const*, xercesc_2_8::MemoryManager&)in URISupport.o
      xalanc_1_10::XercesParserLiaison::createSAXParser()       in XercesParserLiaison.o
      xalanc_1_10::XercesParserLiaison::createDOMParser()       in XercesParserLiaison.o
      xalanc_1_10::XSLTInputSource::makeStream() const  in XSLTInputSource.o
      xalanc_1_10::XalanTransformer::initialize(xercesc_2_8::MemoryManager&)          in XalanTransformer.o

... followed by more, mostly bad stuff. I've also tried building Xerces from source (initialising the config with the same options on runConfigure), but although it creates a library now I can't get the Samples to compile (more undefined symbols...) Any thoughts?

Cheers,
Christian

Re: Xalan-C build on Mac OS X Snow Leopard

by David Bertoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

xn wrote:

> Dear Dave,
>
>
>
>> Also, could you supply the actual runConfigure command line you used?
>> Unfortunately, it looks like using "-b 32" won't force a 32-bit build on
>> 64-bit platforms.
>>
>
> A bit of progress- with the following runConfigure commmand:
> ./runConfigure -p macosx -c gcc -x g++ -z -m32 -l -m32
> I get the output:
> Generating makefiles with the following options ...
> Platform: macosx
> C Compiler: gcc
> C++ Compiler: g++
> Extra compile options:  -m32
> Extra link options:  -m32
> Transcoder: default
> Localization system: inmem
> Locale: en_US
> Thread option:
> bitsToBuild option: 32
> Extra configure options:
> Debug is OFF
>
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for autoconf... autoconf
> checking whether -fno-elide-constructors works correctly... yes
> checking build system type... i686-apple-darwin10.0.0
> checking host system type... i686-apple-darwin10.0.0
> checking for floor in -lm... yes
> checking how to run the C++ preprocessor... g++ -E
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for mbstowcs... yes
> checking if mbstowcs can count only... yes
> configure: creating ./config.status
> config.status: creating Makefile.incl
> config.status: creating Makefile
> config.status: creating src/xalanc/Makefile
> config.status: creating src/xalanc/Utils/Makefile
> config.status: creating src/xalanc/Utils/MsgCreator/Makefile
> config.status: creating src/xalanc/Utils/XalanMsgLib/Makefile
> config.status: creating samples/Makefile
> config.status: creating Tests/Makefile
>
> If the result of the above commands look OK to you, go to the directory
> /Users/christian/temp/xml-xalan/c and type "gmake" or "make" to make the
> XALAN-C system.
>
> Note: You must use GNU make to use the Xalan Makefile.
>
> and when I "make", it gets a lot further through compiling... before falling
> over with undefined symbols: Here's where I think it all goes wrong (apart
> from some earlier deprecated header warnings):
>
> ... mostly good stuff, then:
> In file included from /usr/include/c++/4.2.1/backward/strstream:51,
>                  from
> /Users/christian/temp/xml-xalan/c/src/xalanc/Harness/XalanFileUtility.hpp:30,
>                  from
> /Users/christian/temp/xml-xalan/c/src/xalanc/Harness/XalanFileUtility.cpp:17:
> /usr/include/c++/4.2.1/backward/backward_warning.h:32:2: warning: #warning
> This file includes at least one deprecated or antiquated header. Please
> consider using one of the 32 headers found in section 17.4.1.2 of the C++
> standard. Examples include substituting the <X> header for the <X.h> header
> for C++ includes, or <iostream> instead of the deprecated header
> <iostream.h>. To disable this warning use -Wno-deprecated.
> g++ -m32 -O -DNDEBUG     -fno-elide-constructors -Wall
> -fno-elide-constructors -DMACOSX -D_REENTRANT
> -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS -DXALAN_INMEM_MSG_LOADER -c
> -I/Users/christian/temp/xml-xalan/c/src
> -I/Users/christian/temp/xml-xalan/c/include -I../../nls/include
> -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/src/
> -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/include/xercesc
> -I/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/include/  -o
> ../../obj/XalanXMLFileReporter.o
> /Users/christian/temp/xml-xalan/c/src/xalanc/Harness/XalanXMLFileReporter.cpp
> g++ -m32 -O -DNDEBUG     -fno-elide-constructors -DMACOSX -dynamiclib
> -prebind -seg1addr 0x38000000  -compatibility_version 1 -current_version
> 1.10 -install_name libxalan-c.dylib -m32     -lm  -lpthread  -L/usr/lib
> -L/usr/local/lib -L/usr/local/xerces-c_2_8_0-x86-macosx-gcc_4_0/lib
> -lxerces-c -L../../lib -lxalanMsg ../../obj/XalanAttr.o
> ../../obj/XalanCDataSection.o ../../obj/XalanCharacterData.o
> ../../obj/XalanComment.o ../../obj/XalanDOMException.o
> ../../obj/XalanDOMImplementation.o ../../obj/XalanDOMInit.o
> ../../obj/XalanDOMString.o ../../obj/XalanDocument.o
> ../../obj/XalanDocumentFragment.o ../../obj/XalanDocumentType.o
> ../../obj/XalanElement.o ../../obj/XalanEmptyNamedNodeMap.o
> ../../obj/XalanEntity.o ../../obj/XalanEntityReference.o
> ../../obj/XalanNamedNodeMap.o ../../obj/XalanNode.o
> ../../obj/XalanNodeList.o ../../obj/XalanNodeListDummy.o
> ../../obj/XalanNodeListSurrogate.o ../../obj/XalanNotation.o
> ../../obj/XalanProcessingInstruction.o ../../obj/XalanText.o
> ../../obj/AttributeListImpl.o ../../obj/AttributesImpl.o
> ../../obj/DOMStringHelper.o ../../obj/DOMStringPrintWriter.o
> ../../obj/DoubleSupport.o ../../obj/ExecutionContext.o
> ../../obj/FormatterListener.o ../../obj/NamedNodeMapAttributeList.o
> ../../obj/NullPrintWriter.o ../../obj/PlatformSupportInit.o
> ../../obj/PrefixResolver.o ../../obj/PrintWriter.o ../../obj/Resettable.o
> ../../obj/StdBinInputStream.o ../../obj/StringTokenizer.o
> ../../obj/URISupport.o ../../obj/Writer.o ../../obj/XSLException.o
> ../../obj/XalanBitmap.o ../../obj/XalanDOMStringAllocator.o
> ../../obj/XalanDOMStringCache.o ../../obj/XalanDOMStringHashTable.o
> ../../obj/XalanDOMStringPool.o ../../obj/XalanDOMStringReusableAllocator.o
> ../../obj/XalanDecimalFormatSymbols.o ../../obj/XalanEncodingPropertyCache.o
> ../../obj/XalanFStreamOutputStream.o ../../obj/XalanFileOutputStream.o
> ../../obj/XalanICUMessageLoader.o ../../obj/XalanInMemoryMessageLoader.o
> ../../obj/XalanMemoryManagement.o ../../obj/XalanMemoryManagerDefault.o
> ../../obj/XalanMessageLoader.o ../../obj/XalanNLSMessageLoader.o
> ../../obj/XalanNullOutputStream.o ../../obj/XalanNumberFormat.o
> ../../obj/XalanOutputStream.o ../../obj/XalanOutputStreamPrintWriter.o
> ../../obj/XalanParsedURI.o ../../obj/XalanReferenceCountedObject.o
> ../../obj/XalanSimplePrefixResolver.o ../../obj/XalanStdOutputStream.o
> ../../obj/XalanToXercesTranscoderWrapper.o
> ../../obj/XalanTranscodingServices.o ../../obj/XalanUTF16Transcoder.o
> ../../obj/XalanXMLChar.o ../../obj/DOMServices.o ../../obj/DOMSupport.o
> ../../obj/DOMSupportDefault.o ../../obj/DOMSupportException.o
> ../../obj/DOMSupportInit.o ../../obj/TreeWalker.o
> ../../obj/XalanDocumentPrefixResolver.o ../../obj/XalanNamespacesStack.o
> ../../obj/FormatterToDOM.o ../../obj/FormatterToHTML.o
> ../../obj/FormatterToNull.o ../../obj/FormatterToText.o
> ../../obj/FormatterToXML.o ../../obj/FormatterTreeWalker.o
> ../../obj/XMLParserLiaison.o ../../obj/XMLSupportException.o
> ../../obj/XMLSupportInit.o ../../obj/XalanHTMLElementsProperties.o
> ../../obj/XalanUTF16Writer.o ../../obj/XalanUTF8Writer.o
> ../../obj/XalanXMLSerializerBase.o ../../obj/XalanXMLSerializerFactory.o
> ../../obj/ElementPrefixResolverProxy.o
> ../../obj/FormatterStringLengthCounter.o ../../obj/Function.o
> ../../obj/FunctionConcat.o ../../obj/FunctionContains.o
> ../../obj/FunctionID.o ../../obj/FunctionLang.o
> ../../obj/FunctionNamespaceURI.o ../../obj/FunctionNormalizeSpace.o
> ../../obj/FunctionStartsWith.o ../../obj/FunctionString.o
> ../../obj/FunctionSubstring.o ../../obj/FunctionSubstringAfter.o
> ../../obj/FunctionSubstringBefore.o ../../obj/FunctionTranslate.o
> ../../obj/MutableNodeRefList.o ../../obj/NodeRefList.o
> ../../obj/NodeRefListBase.o ../../obj/XBoolean.o ../../obj/XNodeSet.o
> ../../obj/XNodeSetAllocator.o ../../obj/XNodeSetBase.o
> ../../obj/XNodeSetNodeProxy.o ../../obj/XNodeSetNodeProxyAllocator.o
> ../../obj/XNodeSetResultTreeFragProxy.o ../../obj/XNull.o
> ../../obj/XNumber.o ../../obj/XNumberAllocator.o ../../obj/XNumberBase.o
> ../../obj/XObject.o ../../obj/XObjectFactory.o
> ../../obj/XObjectFactoryDefault.o ../../obj/XObjectResultTreeFragProxy.o
> ../../obj/XObjectResultTreeFragProxyBase.o
> ../../obj/XObjectResultTreeFragProxyText.o ../../obj/XObjectTypeCallback.o
> ../../obj/XPath.o ../../obj/XPathAllocator.o
> ../../obj/XPathConstructionContext.o
> ../../obj/XPathConstructionContextDefault.o ../../obj/XPathEnvSupport.o
> ../../obj/XPathEnvSupportDefault.o ../../obj/XPathEvaluator.o
> ../../obj/XPathExecutionContext.o ../../obj/XPathExecutionContextDefault.o
> ../../obj/XPathExpression.o ../../obj/XPathFactory.o
> ../../obj/XPathFactoryBlock.o ../../obj/XPathFactoryDefault.o
> ../../obj/XPathFunctionTable.o ../../obj/XPathInit.o
> ../../obj/XPathParserException.o ../../obj/XPathProcessor.o
> ../../obj/XPathProcessorImpl.o ../../obj/XSpan.o ../../obj/XString.o
> ../../obj/XStringAdapter.o ../../obj/XStringAdapterAllocator.o
> ../../obj/XStringAllocator.o ../../obj/XStringBase.o
> ../../obj/XStringCached.o ../../obj/XStringCachedAllocator.o
> ../../obj/XStringReference.o ../../obj/XStringReferenceAllocator.o
> ../../obj/XToken.o ../../obj/XTokenNumberAdapter.o
> ../../obj/XTokenNumberAdapterAllocator.o ../../obj/XTokenStringAdapter.o
> ../../obj/XTokenStringAdapterAllocator.o ../../obj/XUnknown.o
> ../../obj/XalanDocumentFragmentNodeRefListBaseProxy.o ../../obj/XalanQName.o
> ../../obj/XalanQNameByReference.o ../../obj/XalanQNameByValue.o
> ../../obj/XalanQNameByValueAllocator.o ../../obj/XalanXPathException.o
> ../../obj/FormatterToXercesDOM.o ../../obj/XercesAttrWrapper.o
> ../../obj/XercesAttrWrapperAllocator.o ../../obj/XercesCDATASectionWrapper.o
> ../../obj/XercesCommentWrapper.o ../../obj/XercesDOMException.o
> ../../obj/XercesDOMFormatterWalker.o
> ../../obj/XercesDOMImplementationWrapper.o ../../obj/XercesDOMSupport.o
> ../../obj/XercesDOMWalker.o ../../obj/XercesDOMWrapperException.o
> ../../obj/XercesDocumentTypeWrapper.o ../../obj/XercesDocumentWrapper.o
> ../../obj/XercesElementWrapper.o ../../obj/XercesElementWrapperAllocator.o
> ../../obj/XercesEntityReferenceWrapper.o ../../obj/XercesEntityWrapper.o
> ../../obj/XercesLiaisonXalanDOMStringPool.o
> ../../obj/XercesNamedNodeMapAttributeList.o
> ../../obj/XercesNamedNodeMapWrapper.o ../../obj/XercesNodeListWrapper.o
> ../../obj/XercesNotationWrapper.o ../../obj/XercesParserLiaison.o
> ../../obj/XercesProcessingInstructionWrapper.o ../../obj/XercesTextWrapper.o
> ../../obj/XercesTextWrapperAllocator.o ../../obj/XercesWrapperHelper.o
> ../../obj/XercesWrapperNavigator.o
> ../../obj/XercesWrapperNavigatorAllocator.o
> ../../obj/XercesWrapperToXalanNodeMap.o
> ../../obj/FormatterToDeprecatedXercesDOM.o ../../obj/XercesAttrBridge.o
> ../../obj/XercesAttributeBridgeAllocator.o ../../obj/XercesBridgeHelper.o
> ../../obj/XercesBridgeNavigator.o ../../obj/XercesCDATASectionBridge.o
> ../../obj/XercesCommentBridge.o ../../obj/XercesDOMImplementationBridge.o
> ../../obj/XercesDOM_NodeHack.o ../../obj/XercesDocumentBridge.o
> ../../obj/XercesDocumentFragmentBridge.o
> ../../obj/XercesDocumentTypeBridge.o ../../obj/XercesElementBridge.o
> ../../obj/XercesElementBridgeAllocator.o ../../obj/XercesEntityBridge.o
> ../../obj/XercesEntityReferenceBridge.o ../../obj/XercesNamedNodeMapBridge.o
> ../../obj/XercesNodeListBridge.o ../../obj/XercesNotationBridge.o
> ../../obj/XercesProcessingInstructionBridge.o ../../obj/XercesTextBridge.o
> ../../obj/XercesTextBridgeAllocator.o ../../obj/XercesToXalanNodeMap.o
> ../../obj/XercesTreeWalker.o ../../obj/FormatterToSourceTree.o
> ../../obj/XalanSourceTreeAttr.o ../../obj/XalanSourceTreeAttrNS.o
> ../../obj/XalanSourceTreeAttributeAllocator.o
> ../../obj/XalanSourceTreeAttributeNSAllocator.o
> ../../obj/XalanSourceTreeComment.o
> ../../obj/XalanSourceTreeCommentAllocator.o
> ../../obj/XalanSourceTreeContentHandler.o
> ../../obj/XalanSourceTreeDOMSupport.o ../../obj/XalanSourceTreeDocument.o
> ../../obj/XalanSourceTreeDocumentFragment.o
> ../../obj/XalanSourceTreeElement.o ../../obj/XalanSourceTreeElementA.o
> ../../obj/XalanSourceTreeElementAAllocator.o
> ../../obj/XalanSourceTreeElementANS.o
> ../../obj/XalanSourceTreeElementANSAllocator.o
> ../../obj/XalanSourceTreeElementNA.o
> ../../obj/XalanSourceTreeElementNAAllocator.o
> ../../obj/XalanSourceTreeElementNANS.o
> ../../obj/XalanSourceTreeElementNANSAllocator.o
> ../../obj/XalanSourceTreeHelper.o ../../obj/XalanSourceTreeInit.o
> ../../obj/XalanSourceTreeParserLiaison.o
> ../../obj/XalanSourceTreeProcessingInstruction.o
> ../../obj/XalanSourceTreeProcessingInstructionAllocator.o
> ../../obj/XalanSourceTreeText.o ../../obj/XalanSourceTreeTextAllocator.o
> ../../obj/XalanSourceTreeTextIWS.o
> ../../obj/XalanSourceTreeTextIWSAllocator.o ../../obj/XPathCAPI.o
> ../../obj/AVT.o ../../obj/AVTPart.o ../../obj/AVTPartSimple.o
> ../../obj/AVTPartXPath.o ../../obj/Constants.o ../../obj/CountersTable.o
> ../../obj/ElemApplyImport.o ../../obj/ElemApplyTemplates.o
> ../../obj/ElemAttribute.o ../../obj/ElemAttributeSet.o
> ../../obj/ElemCallTemplate.o ../../obj/ElemChoose.o ../../obj/ElemComment.o
> ../../obj/ElemCopy.o ../../obj/ElemCopyOf.o ../../obj/ElemDecimalFormat.o
> ../../obj/ElemElement.o ../../obj/ElemEmpty.o ../../obj/ElemExtensionCall.o
> ../../obj/ElemFallback.o ../../obj/ElemForEach.o
> ../../obj/ElemForwardCompatible.o ../../obj/ElemIf.o
> ../../obj/ElemLiteralResult.o ../../obj/ElemMessage.o ../../obj/ElemNumber.o
> ../../obj/ElemOtherwise.o ../../obj/ElemPI.o ../../obj/ElemParam.o
> ../../obj/ElemSort.o ../../obj/ElemTemplate.o
> ../../obj/ElemTemplateElement.o ../../obj/ElemText.o
> ../../obj/ElemTextLiteral.o ../../obj/ElemUse.o ../../obj/ElemValueOf.o
> ../../obj/ElemVariable.o ../../obj/ElemWhen.o ../../obj/ElemWithParam.o
> ../../obj/ExtensionFunctionHandler.o ../../obj/ExtensionNSHandler.o
> ../../obj/FunctionCurrent.o ../../obj/FunctionDocument.o
> ../../obj/FunctionElementAvailable.o ../../obj/FunctionFormatNumber.o
> ../../obj/FunctionFunctionAvailable.o ../../obj/FunctionGenerateID.o
> ../../obj/FunctionKey.o ../../obj/FunctionSystemProperty.o
> ../../obj/FunctionUnparsedEntityURI.o ../../obj/GenerateEvent.o
> ../../obj/KeyTable.o ../../obj/NamespacesHandler.o ../../obj/NodeSortKey.o
> ../../obj/NodeSorter.o ../../obj/OutputContextStack.o
> ../../obj/ProblemListener.o ../../obj/ProblemListenerDefault.o
> ../../obj/ResultNamespacesStack.o ../../obj/SelectionEvent.o
> ../../obj/Stylesheet.o ../../obj/StylesheetConstructionContext.o
> ../../obj/StylesheetConstructionContextDefault.o
> ../../obj/StylesheetExecutionContext.o
> ../../obj/StylesheetExecutionContextDefault.o ../../obj/StylesheetHandler.o
> ../../obj/StylesheetRoot.o ../../obj/TopLevelArg.o ../../obj/TraceListener.o
> ../../obj/TraceListenerDefault.o ../../obj/TracerEvent.o
> ../../obj/VariablesStack.o ../../obj/XResultTreeFrag.o
> ../../obj/XResultTreeFragAllocator.o ../../obj/XSLTEngineImpl.o
> ../../obj/XSLTInit.o ../../obj/XSLTInputSource.o ../../obj/XSLTProcessor.o
> ../../obj/XSLTProcessorEnvSupport.o
> ../../obj/XSLTProcessorEnvSupportDefault.o
> ../../obj/XSLTProcessorException.o ../../obj/XSLTResultTarget.o
> ../../obj/XalanAVTAllocator.o ../../obj/XalanAVTPartSimpleAllocator.o
> ../../obj/XalanAVTPartXPathAllocator.o
> ../../obj/XalanElemApplyTemplatesAllocator.o
> ../../obj/XalanElemAttributeAllocator.o
> ../../obj/XalanElemAttributeSetAllocator.o
> ../../obj/XalanElemCallTemplateAllocator.o
> ../../obj/XalanElemElementAllocator.o ../../obj/XalanElemEmptyAllocator.o
> ../../obj/XalanElemLiteralResultAllocator.o
> ../../obj/XalanElemTemplateAllocator.o ../../obj/XalanElemTextAllocator.o
> ../../obj/XalanElemTextLiteralAllocator.o
> ../../obj/XalanElemValueOfAllocator.o ../../obj/XalanElemVariableAllocator.o
> ../../obj/XalanMatchPatternData.o ../../obj/XalanMatchPatternDataAllocator.o
> ../../obj/XalanNumberingResourceBundle.o
> ../../obj/XalanSourceTreeDocumentAllocator.o
> ../../obj/XalanSourceTreeDocumentFragmentAllocator.o
> ../../obj/XalanSpaceNodeTester.o ../../obj/FunctionDifference.o
> ../../obj/FunctionDistinct.o ../../obj/FunctionEvaluate.o
> ../../obj/FunctionHasSameNodes.o ../../obj/FunctionIntersection.o
> ../../obj/FunctionNodeSet.o ../../obj/XalanExtensions.o
> ../../obj/XalanCAPI.o ../../obj/XalanCompiledStylesheetDefault.o
> ../../obj/XalanDefaultDocumentBuilder.o ../../obj/XalanDefaultParsedSource.o
> ../../obj/XalanParsedSource.o ../../obj/XalanSourceTreeWrapperParsedSource.o
> ../../obj/XalanTransformer.o ../../obj/XalanTransformerOutputStream.o
> ../../obj/XalanTransformerProblemListener.o
> ../../obj/XercesDOMParsedSource.o ../../obj/XercesDOMWrapperParsedSource.o
> ../../obj/XalanEXSLTCommon.o ../../obj/XalanEXSLTDateTime.o
> ../../obj/XalanEXSLTDynamic.o ../../obj/XalanEXSLTMath.o
> ../../obj/XalanEXSLTSet.o ../../obj/XalanEXSLTString.o
> ../../obj/XalanDiagnosticMemoryManager.o ../../obj/XalanFileUtility.o
> ../../obj/XalanXMLFileReporter.o -o ../../lib/libxalan-c.110.0.dylib
> Undefined symbols:
>   "xercesc_2_8::MemBufInputSource::~MemBufInputSource()", referenced from:
>       _XalanEvaluateXPathAsBoolean in XPathCAPI.o
>       _XalanEvaluateXPathAsBoolean in XPathCAPI.o
>   "xercesc_2_8::XMLURL::buildFullText()", referenced from:
>      
> xalanc_1_10::XSLTEngineImpl::getStylesheetFromPIURL(xalanc_1_10::XalanDOMString
> const&, xalanc_1_10::XalanNode&, xalanc_1_10::XalanDOMString const&, bool,
> xalanc_1_10::StylesheetConstructionContext&)in XSLTEngineImpl.o
>      
> xalanc_1_10::XSLTProcessorEnvSupportDefault::parseXML(xercesc_2_8::MemoryManager&,
> xalanc_1_10::XalanDOMString const&, xalanc_1_10::XalanDOMString const&)in
> XSLTProcessorEnvSupportDefault.o
>   "xercesc_2_8::DTDEntityDecl::isSerializable() const", referenced from:
>       vtable for xercesc_2_8::DTDEntityDeclin XercesParserLiaison.o
>   "xercesc_2_8::XMemory::operator new(unsigned long,
> xercesc_2_8::MemoryManager*)", referenced from:
>       xalanc_1_10::URISupport::getURLFromString(unsigned short const*,
> xercesc_2_8::MemoryManager&)in URISupport.o
>       xalanc_1_10::XercesParserLiaison::createSAXParser()       in
> XercesParserLiaison.o
>       xalanc_1_10::XercesParserLiaison::createDOMParser()       in
> XercesParserLiaison.o
>       xalanc_1_10::XSLTInputSource::makeStream() const  in XSLTInputSource.o
>       xalanc_1_10::XalanTransformer::initialize(xercesc_2_8::MemoryManager&)        
> in XalanTransformer.o
>
> ... followed by more, mostly bad stuff. I've also tried building Xerces from
> source (initialising the config with the same options on runConfigure), but
> although it creates a library now I can't get the Samples to compile (more
> undefined symbols...) Any thoughts?
I suspect something is wrong with your toolchain. If the Xerces-C
samples won't build, then the library must not be built correct.

Also, it looks like your build fails linking the Xalan-C shared library,
which implies the MsgCreator binary was built and successfully linked
with the Xerces-C library. Given that, I don't understand why MsgCreator
would link and run, while the Xerces-C samples and the Xalan-C link
libraries doesn't.

Unfortunately, I don't have access to any Apple hardware, so I can't
diagnose this. I really wish Apple would license OS X on non-Apple hardware.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@...
For additional commands, e-mail: xalan-dev-help@...