Opened 15 years ago

Closed 14 years ago

#20979 closed defect (duplicate)

xercesc install fails on OS 10.6

Reported by: docfaraday@… Owned by: chris.ridd@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: snowleopard Cc: snc@…, n.a.hawes@…, fsteeg@…, ryandesign (Ryan Carsten Schmidt)
Port: xercesc

Description

xercesc install fails compiling MacOSPlatformUtils.cpp and MacCarbonFile.cpp with the following errors:

MacOSPlatformUtils.cpp: In static member function 'static long unsigned int xercesc_2_8::XMLPlatformUtils::getCurrentMillis()':
MacOSPlatformUtils.cpp:363: error: 'kUnresolvedCFragSymbolAddress' was not declared in this scope
MacOSPlatformUtils.cpp: In static member function 'static void* xercesc_2_8::XMLPlatformUtils::compareAndSwap(void**, const void*, const void*)':
MacOSPlatformUtils.cpp:466: error: cast from 'const void*' to 'UInt32' loses precision
MacOSPlatformUtils.cpp:467: error: cast from 'const void*' to 'UInt32' loses precision
MacOSPlatformUtils.cpp: In static member function 'static int xercesc_2_8::XMLPlatformUtils::atomicIncrement(int&)':
MacOSPlatformUtils.cpp:485: error: cannot convert 'long int*' to 'SInt32*' for argument '1' to 'SInt32 IncrementAtomic(SInt32*)'
MacOSPlatformUtils.cpp: In static member function 'static int xercesc_2_8::XMLPlatformUtils::atomicDecrement(int&)':
MacOSPlatformUtils.cpp:492: error: cannot convert 'long int*' to 'SInt32*' for argument '1' to 'SInt32 DecrementAtomic(SInt32*)'
MacOSPlatformUtils.cpp: In static member function 'static void xercesc_2_8::XMLPlatformUtils::platformInit()':
MacOSPlatformUtils.cpp:511: error: cannot convert 'long int*' to 'SInt32*' for argument '2' to 'OSErr Gestalt(OSType, SInt32*)'
MacOSPlatformUtils.cpp:516: error: cannot convert 'long int*' to 'SInt32*' for argument '2' to 'OSErr Gestalt(OSType, SInt32*)'
MacOSPlatformUtils.cpp:523: error: 'kUnresolvedCFragSymbolAddress' was not declared in this scope
MacOSPlatformUtils.cpp: In function 'bool xercesc_2_8::XMLParsePathToFSRef_X(const XMLCh*, FSRef&, xercesc_2_8::MemoryManager*)':
MacOSPlatformUtils.cpp:840: error: 'FSMakeFSSpec' was not declared in this scope
MacOSPlatformUtils.cpp:842: error: 'FSpMakeFSRef' was not declared in this scope
MacOSPlatformUtils.cpp: In function 'bool xercesc_2_8::XMLParsePathToFSRef_Classic(const XMLCh*, FSRef&, xercesc_2_8::MemoryManager*)':
MacOSPlatformUtils.cpp:930: error: 'FSMakeFSSpec' was not declared in this scope
MacOSPlatformUtils.cpp:932: error: 'FSpMakeFSRef' was not declared in this scope
MacOSPlatformUtils.cpp: In function 'bool xercesc_2_8::XMLParsePathToFSSpec_Classic(const XMLCh*, FSSpec&, xercesc_2_8::MemoryManager*)':
MacOSPlatformUtils.cpp:1065: error: 'XVolumeParam' was not declared in this scope
MacOSPlatformUtils.cpp:1065: error: expected `;' before 'xVolParam'
MacOSPlatformUtils.cpp:1067: error: 'xVolParam' was not declared in this scope
MacOSPlatformUtils.cpp:1071: error: 'PBXGetVolInfoSync' was not declared in this scope
MacOSPlatformUtils.cpp:1098: error: 'FSMakeFSSpec' was not declared in this scope
MacOSPlatformUtils.cpp:1109: error: 'FSMakeFSSpec' was not declared in this scope
MacOSPlatformUtils.cpp:1131: error: 'CInfoPBRec' was not declared in this scope
MacOSPlatformUtils.cpp:1131: error: expected `;' before 'catInfo'
MacOSPlatformUtils.cpp:1132: error: 'catInfo' was not declared in this scope
MacOSPlatformUtils.cpp:1133: error: 'struct FSSpec' has no member named 'vRefNum'
MacOSPlatformUtils.cpp:1135: error: 'struct FSSpec' has no member named 'parID'
MacOSPlatformUtils.cpp:1136: error: 'PBGetCatInfoSync' was not declared in this scope
MacOSPlatformUtils.cpp:1144: error: 'struct FSSpec' has no member named 'vRefNum'
MacOSPlatformUtils.cpp:1144: error: 'FSMakeFSSpec' was not declared in this scope
MacOSPlatformUtils.cpp:1165: error: 'struct FSSpec' has no member named 'name'
MacOSPlatformUtils.cpp:1184: error: 'struct FSSpec' has no member named 'vRefNum'
MacOSPlatformUtils.cpp:1184: error: 'struct FSSpec' has no member named 'parID'
MacOSPlatformUtils.cpp:1184: error: 'FSMakeFSSpec' was not declared in this scope
MacOSPlatformUtils.cpp: In function 'XMLCh* xercesc_2_8::XMLCreateFullPathFromFSSpec(const FSSpec&, xercesc_2_8::MemoryManager*)':
MacOSPlatformUtils.cpp:1358: error: 'FSpMakeFSRef' was not declared in this scope
MacOSPlatformUtils.cpp: In function 'XMLCh* xercesc_2_8::XMLCreateFullPathFromFSSpec_Classic(const FSSpec&, xercesc_2_8::MemoryManager*)':
MacOSPlatformUtils.cpp:1395: error: 'CInfoPBRec' was not declared in this scope
MacOSPlatformUtils.cpp:1395: error: expected `;' before 'catInfo'
MacOSPlatformUtils.cpp:1396: error: 'catInfo' was not declared in this scope
MacOSPlatformUtils.cpp:1396: error: 'struct FSSpec' has no member named 'name'
MacOSPlatformUtils.cpp:1397: error: 'struct FSSpec' has no member named 'vRefNum'
MacOSPlatformUtils.cpp:1399: error: 'struct FSSpec' has no member named 'parID'
MacOSPlatformUtils.cpp:1400: error: 'PBGetCatInfoSync' was not declared in this scope
MacOSPlatformUtils.cpp:1404: error: 'struct FSSpec' has no member named 'name'
MacOSPlatformUtils.cpp:1432: error: 'struct FSSpec' has no member named 'name'
MacOSPlatformUtils.cpp:1440: error: 'struct FSSpec' has no member named 'parID'
MacOSPlatformUtils.cpp:1443: error: 'struct FSSpec' has no member named 'parID'


MacCarbonFile.cpp: In member function 'virtual unsigned int xercesc_2_8::XMLMacCarbonFile::currPos()':
MacCarbonFile.cpp:64: error: 'GetFPos' was not declared in this scope
MacCarbonFile.cpp: In member function 'virtual void xercesc_2_8::XMLMacCarbonFile::close()':
MacCarbonFile.cpp:86: error: 'FSClose' was not declared in this scope
MacCarbonFile.cpp: In member function 'virtual unsigned int xercesc_2_8::XMLMacCarbonFile::size()':
MacCarbonFile.cpp:114: error: 'GetEOF' was not declared in this scope
MacCarbonFile.cpp: In member function 'bool xercesc_2_8::XMLMacCarbonFile::openWithPermission(const XMLCh*, int)':
MacCarbonFile.cpp:145: error: cannot convert 'short int*' to 'FSIORefNum*' for argument '5' to 'OSErr FSOpenFork(const FSRef*, UniCharCount, const UniChar*, SInt8, FSIORefNum*)'
MacCarbonFile.cpp:154: error: 'FSpOpenDF' was not declared in this scope
MacCarbonFile.cpp: In member function 'void xercesc_2_8::XMLMacCarbonFile::create(const XMLCh*)':
MacCarbonFile.cpp:212: error: 'FSpDelete' was not declared in this scope
MacCarbonFile.cpp:232: error: 'struct FSSpec' has no member named 'name'
MacCarbonFile.cpp:245: error: 'struct FSSpec' has no member named 'vRefNum'
MacCarbonFile.cpp:245: error: 'struct FSSpec' has no member named 'parID'
MacCarbonFile.cpp:245: error: 'FSMakeFSSpec' was not declared in this scope
MacCarbonFile.cpp:248: error: 'FSpCreate' was not declared in this scope
MacCarbonFile.cpp: In member function 'virtual unsigned int xercesc_2_8::XMLMacCarbonFile::read(unsigned int, XMLByte*)':
MacCarbonFile.cpp:311: error: 'FSRead' was not declared in this scope
MacCarbonFile.cpp: In member function 'virtual void xercesc_2_8::XMLMacCarbonFile::write(long int, const XMLByte*)':
MacCarbonFile.cpp:345: error: 'FSWrite' was not declared in this scope
MacCarbonFile.cpp: In member function 'virtual void xercesc_2_8::XMLMacCarbonFile::reset()':
MacCarbonFile.cpp:367: error: 'SetFPos' was not declared in this scope


Attachments (2)

Makefile.in.patch (476 bytes) - added by docfaraday@… 15 years ago.
patch for Platforms/MacOS/Makefile.in
MacOSPlatformUtils.cpp.patch (28.5 KB) - added by docfaraday@… 15 years ago.
Better patch (removed a lot of useless code)

Download all attachments as: .zip

Change History (18)

comment:1 Changed 15 years ago by docfaraday@…

(Looks like xercesc was using a bunch of deprecated stuff that got dropped in 10.6. Not sure if the xercesc project has caught up with this.)

comment:2 Changed 15 years ago by mf2k (Frank Schima)

Keywords: snowleopard added
Owner: changed from macports-tickets@… to chris.ridd@…
Port: xercesc added

comment:3 Changed 15 years ago by tobypeterson

Maybe fixed in 3.0.1? Unfortunately, doesn't look like it's compatible...

comment:4 in reply to:  3 Changed 15 years ago by docfaraday@…

Replying to toby@…:

Maybe fixed in 3.0.1? Unfortunately, doesn't look like it's compatible...

I assume you mean substituting the 3.0.1 version of the offending files? Maybe we can get a backport out of them...

comment:5 Changed 15 years ago by docfaraday@…

Ah, the files do not appear to exist in 3.0.1. And it doesn't look like the 3.0.1 stuff can be backported easily.

comment:6 Changed 15 years ago by tobypeterson

I meant updating the port to 3.0.1

comment:7 Changed 15 years ago by docfaraday@…

Ok, I am starting to get some traction on backporting strictly to OS X. The code would be completely broken on Mac OS < 10, but we don't care about that, do we? ;) Patches will follow, so others can test...

Changed 15 years ago by docfaraday@…

Attachment: Makefile.in.patch added

patch for Platforms/MacOS/Makefile.in

Changed 15 years ago by docfaraday@…

Better patch (removed a lot of useless code)

comment:8 Changed 15 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Gentlemen, is version 3.0.1 the xerscec3 port?

comment:9 Changed 15 years ago by docfaraday@…

Indeed it is! But, it would still be useful to be able to use the 2.8 port for the time-being, since the API is different.

comment:10 Changed 15 years ago by n.a.hawes@…

Cc: n.a.hawes@… added

Cc Me!

comment:11 Changed 15 years ago by fsteeg@…

Cc: fsteeg@… added

Cc Me!

comment:12 Changed 15 years ago by fsteeg@…

After applying the patches I get the same errors as described by someone else on the macports-users mailing list.

comment:13 Changed 15 years ago by docfaraday@…

Ahh, I was building my copy with the ICU transcoder because I needed source offsets, so I'm betting the MacOSUnicodeConverter wasn't being built in my case.

comment:14 in reply to:  13 ; Changed 14 years ago by israfel33@…

Replying to docfaraday@…:

Ahh, I was building my copy with the ICU transcoder because I needed source offsets, so I'm betting the MacOSUnicodeConverter wasn't being built in my case.

Seems that building xercesc only works in 64bit mode on Snow Leopard (with 64bit capable CPU). When I selected i386 as default build in macports.conf, xercesc object files were build with -arch i386 but when linking them together build system tried to create 64bit version and produced warning. Result is fairly useless library. Anyone else noticed such problem?

comment:15 in reply to:  14 Changed 14 years ago by jasny@…

Replying to israfel33@…:

Replying to docfaraday@…:

Ahh, I was building my copy with the ICU transcoder because I needed source offsets, so I'm betting the MacOSUnicodeConverter wasn't being built in my case.

Seems that building xercesc only works in 64bit mode on Snow Leopard (with 64bit capable CPU). When I selected i386 as default build in macports.conf, xercesc object files were build with -arch i386 but when linking them together build system tried to create 64bit version and produced warning. Result is fairly useless library. Anyone else noticed such problem?

When i compiled it by hand I exported LDFLAGS, too. export CFLAGS="-arch i386" export CXXFLAGS="-arch i386" export LDFLAGS="-arch i386"

I also had to substitute int32_t by SInt32 in XMLPlatformUtils::platformInit

Gregor

comment:16 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: duplicate
Status: newclosed

I'm going to mark this as a duplicate of #22287, because although this was filed earlier, that has a patch that works.

Note: See TracTickets for help on using tickets.