Skip to Content.
Sympa Menu

shibboleth-dev - Re: Minor error(s) in MacPort Shibboleth 2.0

Subject: Shibboleth Developers

List archive

Re: Minor error(s) in MacPort Shibboleth 2.0


Chronological Thread 
  • From: Kaspar Brand <>
  • To:
  • Subject: Re: Minor error(s) in MacPort Shibboleth 2.0
  • Date: Mon, 31 Mar 2008 10:20:02 +0200

>> The process has forked and you cannot use this CoreFoundation
>> functionality safely. You MUST exec().
>
> I'm confused. I thought this had been tested by somebody running an Intel
> Mac. If we build Xerces with no CF calls, and it's still not working, then
> I
> think we're unable to support Leopard unless Apple fixes this bug.
>
> But what code is left that's calling these APIs? Did you build Xerces using
> my portfile?

Even if using ICU for transcoding, there's still some stuff in Xerces
(MacOSPlatformUtils.cpp) which in the end pulls in things from CF - e.g.
file related calls.

Attached is a hackish patch for Xerces 2.8.0 which makes it use the
FreeBSDPlatformUtils.cpp stuff when compiling for OS X. It should be
considered a proof of concept, but at least it allows to compile a
version of libxerces-c.28.0.dylib without any dependency on
CoreServices/CoreFoundation. Of course, the usual "use at your own risk"
disclaimer applies to anybody compiling Xerces with this patch
(runConfigure needs to be called with "-p macosx -n socket -t icu").

Kaspar
diff -rup xerces-c-src_2_8_0.orig/src/xercesc/Makefile.incl
xerces-c-src_2_8_0/src/xercesc/Makefile.incl
--- xerces-c-src_2_8_0.orig/src/xercesc/Makefile.incl 2007-08-30
14:10:20.000000000 +0200
+++ xerces-c-src_2_8_0/src/xercesc/Makefile.incl 2008-03-31
08:33:25.000000000 +0100
@@ -878,7 +878,7 @@ endif

#=============== MacOS SPECIFIC OPTIONS =========================
ifeq (${PLATFORM}, MACOSX)
- PLATFORM_LIBRARIES = -framework CoreServices
+ #PLATFORM_LIBRARIES = -framework CoreServices
PLATFORM_COMPILE_OPTIONS = -D${PLATFORM}

ifneq (${THREADS},none)
diff -rup
xerces-c-src_2_8_0.orig/src/xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp
xerces-c-src_2_8_0/src/xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp
---
xerces-c-src_2_8_0.orig/src/xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp
2007-08-28 20:44:11.000000000 +0200
+++ xerces-c-src_2_8_0/src/xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp
2008-03-28 16:10:44.000000000 +0100
@@ -21,9 +21,18 @@


//
---------------------------------------------------------------------------
-// FreeBSD runs in little endian mode
+// Detect endian mode (cf.
http://issues.apache.org/jira/browse/XERCESC-1502)
//
---------------------------------------------------------------------------
-#define ENDIANMODE_LITTLE
+#include <machine/endian.h>
+#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
+ #define ENDIANMODE_LITTLE
+#else
+ #if __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
+ #define ENDIANMODE_BIG
+ #else
+ #error: unknown byte order!
+ #endif
+#endif
typedef void* FileHandle;

#ifndef FREEBSD
diff -rup xerces-c-src_2_8_0.orig/src/xercesc/util/Platforms/Makefile.in
xerces-c-src_2_8_0/src/xercesc/util/Platforms/Makefile.in
--- xerces-c-src_2_8_0.orig/src/xercesc/util/Platforms/Makefile.in
2007-08-28 20:44:12.000000000 +0200
+++ xerces-c-src_2_8_0/src/xercesc/util/Platforms/Makefile.in 2008-03-31
08:33:25.000000000 +0100
@@ -180,7 +180,7 @@ ifeq (${PLATFORM}, TRU64)
SUBMODULE = Tru64
endif
ifeq (${PLATFORM}, MACOSX)
- SUBMODULE = MacOS
+ SUBMODULE = FreeBSD
endif
ifeq (${PLATFORM}, CYGWIN)
SUBMODULE = Cygwin
diff -rup xerces-c-src_2_8_0.orig/src/xercesc/util/XercesDefs.hpp
xerces-c-src_2_8_0/src/xercesc/util/XercesDefs.hpp
--- xerces-c-src_2_8_0.orig/src/xercesc/util/XercesDefs.hpp 2007-08-28
20:44:52.000000000 +0200
+++ xerces-c-src_2_8_0/src/xercesc/util/XercesDefs.hpp 2008-03-31
08:33:25.000000000 +0100
@@ -107,7 +107,7 @@
#endif

#if defined(XML_MACOS)
-#include <xercesc/util/Platforms/MacOS/MacOSDefs.hpp>
+#include <xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp>
#endif

#if defined(XML_AS400)



Archive powered by MHonArc 2.6.16.

Top of Page