Hey Dave(s),

On Dec 21, 2007, at 8:19 AM, David Bertoni wrote:

David Cargill wrote:
Hi,
Has anyone tried building Xerces-C 2.8 (or earlier) on MacOSX in 64 bits? I tried building Xerces-2.6 on MacOSX and the build worked fine in 32 bits but with 64 bits I got lots of errors which seem to be related to system functions. Any advice as to how to fix them would be greatly appreciated.
Thanks.
I modified runConfigure to specify -m64 for the compile and link steps and
did a build and got the following compiler errors for compiling
MacOSPlatformUtils.cpp:
MacOSPlatformUtils.cpp: In static member function 'static long unsigned int
xercesc_2_6::XMLPlatformUtils::getCurrentMillis()':
MacOSPlatformUtils.cpp:362: error: 'kUnresolvedCFragSymbolAddress' was not
declared in this scope
MacOSPlatformUtils.cpp: In static member function 'static void*
xercesc_2_6::XMLPlatformUtils::compareAndSwap(void**, const void*, const
void*)':
MacOSPlatformUtils.cpp:465: error: cast from 'const void*' to 'UInt32'
loses precision
MacOSPlatformUtils.cpp:466: error: cast from 'const void*' to 'UInt32'
loses precision
MacOSPlatformUtils.cpp: In static member function 'static int
xercesc_2_6::XMLPlatformUtils::atomicIncrement(int&)':
MacOSPlatformUtils.cpp:484: error: cannot convert 'long int*' to 'SInt32*'
for argument '1' to 'SInt32 IncrementAtomic(SInt32*)'
MacOSPlatformUtils.cpp: In static member function 'static int
xercesc_2_6::XMLPlatformUtils::atomicDecrement(int&)':
MacOSPlatformUtils.cpp:522: error: 'kUnresolvedCFragSymbolAddress' was not
declared in this scopeInt32 DecrementAtomic(SInt32*)'
MacOSPlatformUtils.cpp:552: error: cast from 'Boolean (*)()' to 'UInt32'
loses precisionls::platformInit()':
Hi Dave,

The casts just look like bad code to me. CompareAndSwap() takes long parameters:

Yes, this is probably a matter of changing the casts around a bit, and/ or working around the impedance mismatch with the the Xerces routines.

http://developer.apple.com/documentation/Hardware/DeviceManagers/pci_srvcs/pci_cards_drivers/PCI_BOOK.1a3.html

MacOSPlatformUtils.cpp: In function 'bool
xercesc_2_6::XMLParsePathToFSRef_X(constrXMLCh*, FSRef&,
xercesc_2_6::MemoryManager*)':)'
MacOSPlatformUtils.cpp:839: error: 'FSMakeFSSpec' was not declared in this
scope
MacOSPlatformUtils.cpp:841: error: 'FSpMakeFSRef' was not declared in this
scope
MacOSPlatformUtils.cpp: In function 'bool
xercesc_2_6::XMLParsePathToFSRef_Classic(const XMLCh*, FSRef&,
xercesc_2_6::MemoryManager*)':
MacOSPlatformUtils.cpp:929: error: 'FSMakeFSSpec' was not declared in this
scope
MacOSPlatformUtils.cpp:931: error: 'FSpMakeFSRef' was not declared in this
scope
MacOSPlatformUtils.cpp: In function 'bool
xercesc_2_6::XMLParsePathToFSSpec_Classic(const XMLCh*, FSSpec&,
xercesc_2_6::MemoryManager*)':

It looks like some files functions are deprecated and aren't available for 64-bit:

http://developer.apple.com/documentation/Carbon/Reference/File_Manager/Reference/reference.html

http://developer.apple.com/documentation/Carbon/Reference/File_Manager/DeprecationAppendix/AppendixADeprecatedAPI.html#/ /apple_ref/c/func/FSMakeFSSpec

You may need to do some fancy ifdefs to make this work for both 32- bit and 64-bit builds.

This may be a bit more work on the code path to eliminate those routines that are not available for 64 bit. It should be possible with some effort however.

James

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to