You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by David Cargill <ca...@ca.ibm.com> on 2007/12/21 13:25:32 UTC

64 bit Xerces-C 2.8 on MacOSX

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()':
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*)':
MacOSPlatformUtils.cpp:1064: error: 'XVolumeParam' was not declared in this
scope
MacOSPlatformUtils.cpp:1064: error: expected `;' before 'xVolParam'
MacOSPlatformUtils.cpp:1066: error: 'xVolParam' was not declared in this
scope
MacOSPlatformUtils.cpp:1070: error: 'PBXGetVolInfoSync' was not declared in
this scope
MacOSPlatformUtils.cpp:1097: error: 'FSMakeFSSpec' was not declared in this
scope
MacOSPlatformUtils.cpp:1108: error: 'FSMakeFSSpec' was not declared in this
scope
MacOSPlatformUtils.cpp:1130: error: 'CInfoPBRec' was not declared in this
scope
MacOSPlatformUtils.cpp:1130: error: expected `;' before 'catInfo'
MacOSPlatformUtils.cpp:1131: error: 'catInfo' was not declared in this
scope
MacOSPlatformUtils.cpp:1132: error: 'struct FSSpec' has no member named
'vRefNum'
MacOSPlatformUtils.cpp:1134: error: 'struct FSSpec' has no member named
'parID'
MacOSPlatformUtils.cpp:1135: error: 'PBGetCatInfoSync' was not declared in
this scope
MacOSPlatformUtils.cpp:1143: error: 'struct FSSpec' has no member named
'vRefNum'
MacOSPlatformUtils.cpp:1143: error: 'FSMakeFSSpec' was not declared in this
scope
MacOSPlatformUtils.cpp:1164: error: 'struct FSSpec' has no member named
'name'
MacOSPlatformUtils.cpp:1183: error: 'struct FSSpec' has no member named
'vRefNum'
MacOSPlatformUtils.cpp:1183: error: 'struct FSSpec' has no member named
'parID'
MacOSPlatformUtils.cpp:1183: error: 'FSMakeFSSpec' was not declared in this
scope
MacOSPlatformUtils.cpp: In function 'XMLCh*
xercesc_2_6::XMLCreateFullPathFromFSSpec(const FSSpec&,
xercesc_2_6::MemoryManager*)':
MacOSPlatformUtils.cpp:1357: error: 'FSpMakeFSRef' was not declared in this
scope
MacOSPlatformUtils.cpp: In function 'XMLCh*
xercesc_2_6::XMLCreateFullPathFromFSSpec_Classic(const FSSpec&,
xercesc_2_6::MemoryManager*)':
MacOSPlatformUtils.cpp:1394: error: 'CInfoPBRec' was not declared in this
scope
MacOSPlatformUtils.cpp:1394: error: expected `;' before 'catInfo'
MacOSPlatformUtils.cpp:1395: error: 'catInfo' was not declared in this
scope
MacOSPlatformUtils.cpp:1395: error: 'struct FSSpec' has no member named
'name'
MacOSPlatformUtils.cpp:1396: error: 'struct FSSpec' has no member named
'vRefNum'
MacOSPlatformUtils.cpp:1398: error: 'struct FSSpec' has no member named
'parID'
MacOSPlatformUtils.cpp:1399: error: 'PBGetCatInfoSync' was not declared in
this scope
MacOSPlatformUtils.cpp:1403: error: 'struct FSSpec' has no member named
'name'
MacOSPlatformUtils.cpp:1431: error: 'struct FSSpec' has no member named
'name'
MacOSPlatformUtils.cpp:1439: error: 'struct FSSpec' has no member named
'parID'
MacOSPlatformUtils.cpp:1442: error: 'struct FSSpec' has no member named
'parID'
make[3]: *** [MacOSPlatformUtils.o] Error 1

Regards,
David A. Cargill
XML Parser Development
IBM Toronto Lab
(905) 413-2371, tie 969
cargilld@ca.ibm.com


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


Re: 64 bit Xerces-C 2.8 on MacOSX

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
David Bertoni <db...@apache.org> writes:

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

I was always wondering why we are using MacOS-specific APIs instead
of POSIX which is used by other UNIX/Linux configurations and is
apparently enough. Perhaps now (i.e., 3.0.0) is a good time to get
rid of this instead of forward-porting MacOS-dependant code to work
in the 64 bit mode? Any thoughts?

Boris

-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding

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


Re: 64 bit Xerces-C 2.8 on MacOSX

Posted by James Berry <jb...@apache.org>.
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: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>


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


Re: 64 bit Xerces-C 2.8 on MacOSX

Posted by David Bertoni <db...@apache.org>.
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:

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.

Dave

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