Got it, thanks. I changed to 4.2 (gcc) and it compiles now. Current file is:
// This file is included after including all of $DTOOL/Config.pp and
// the user's personal Config.pp file. It makes decisions necessary
// following the user's Config settings.
#if $[and $[OSX_PLATFORM],$[BUILD_IPHONE]]
//#define IPH_PLATFORM iPhoneSimulator
#define IPH_PLATFORM $[BUILD_IPHONE]
#define IPH_VERSION 4.3
#define dev /Developer/Platforms/$[IPH_PLATFORM].platform/Developer
#if $[eq $[IPH_PLATFORM], iPhoneOS]
#define ARCH_FLAGS -arch armv6 -mcpu=arm1176jzf-s
#define osflags -fpascal-strings -miphoneos-version-min=4.3
#define DEBUGFLAGS -gdwarf-2
//#define DEBUGFLAGS
#elif $[eq $[IPH_PLATFORM], iPhoneSimulator]
#define ARCH_FLAGS -arch i386
#define osflags -fpascal-strings -fasm-blocks -mmacosx-version-min=10.6
#define DEBUGFLAGS -gdwarf-2
#else
#error Inappropriate value for BUILD_IPHONE.
#endif
#define env env MACOSX_DEPLOYMENT_TARGET=10.6 PATH="$[dev]/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
#define CC $[env] $[dev]/usr/bin/gcc-4.2
#define CXX $[env] $[dev]/usr/bin/g++-4.2
#define OSX_CDEFS __IPHONE_OS_VERSION_MIN_REQUIRED=30200
#define OSX_CFLAGS -isysroot $[dev]/SDKs/$[IPH_PLATFORM]$[IPH_VERSION].sdk $[osflags]
#defer ODIR_SUFFIX -$[IPH_PLATFORM]
#endif
I’m on to the actual panda src tree now. First error is:
/bin/sh: /Users/colinn/Projects/panda3d/built/bin/interrogate: Bad CPU type in executable
Which makes sense since this was compiled in dtool with the iphone compiler. Am I supposed to compile dtool for Mac OSX without any of the iPhone stuff in Config.pp and then turn it on afterwards? I’ll give this a try and update with my results.
EDIT:
Rebuilt for Mac OSX and now I get:
interrogate -od Opt1-OSX/libp3express.in -oc Opt1-OSX/libp3express_igate.cxx -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__FLT_EVAL_METHOD__=0 -D__const=const -Dvolatile -Dmutable -D__LITTLE_ENDIAN__ -D__inline__=inline -D__GNUC__ -D__i386__ -S/Users/gongpei/Projects/panda3d/built/include/parser-inc -I/Users/gongpei/Projects/panda3d/panda -I../pandabase -I/Users/gongpei/Projects/panda3d/built/include -I/usr/include/python2.6 -fnames -string -refcount -assert -python-native -spam -module "pandaexpress" -library "libp3express" buffer.h ca_bundle_data_src.c checksumHashGenerator.h circBuffer.h compress_string.h config_express.h copy_stream.h datagram.h datagramGenerator.h datagramIterator.h datagramSink.h dcast.h encrypt_string.h error_utils.h export_dtool.h fileReference.h hashGeneratorBase.h hashVal.h indirectLess.h memoryInfo.h memoryUsage.h memoryUsagePointerCounts.h memoryUsagePointers.h multifile.h namable.h nodePointerTo.h nodePointerToBase.h nodeReferenceCount.h openSSLWrapper.h ordered_vector.h pStatCollectorForwardBase.h password_hash.h patchfile.h pointerTo.h pointerToArray.h pointerToArrayBase.h pointerToBase.h pointerToVoid.h profileTimer.h pta_int.h pta_uchar.h pta_double.h pta_float.h pta_stdfloat.h ramfile.h referenceCount.h subStream.h subStreamBuf.h subfileInfo.h temporaryFile.h threadSafePointerTo.h threadSafePointerToBase.h trueClock.h typedReferenceCount.h typedef.h vector_uchar.h vector_double.h vector_float.h vector_stdfloat.h virtualFileList.h virtualFileMount.h virtualFileComposite.h virtualFile.h virtualFileMountMultifile.h virtualFileMountRamdisk.h virtualFileMountSystem.h virtualFileSimple.h virtualFileSystem.h weakPointerCallback.h weakPointerTo.h weakPointerToBase.h weakPointerToVoid.h weakReferenceList.h windowsRegistry.h zStream.h zStreamBuf.h p3express_composite1.cxx p3express_composite2.cxxdyld: Library not loaded: libp3interrogatedb.dylib
Referenced from: /Users/gongpei/Projects/panda3d/panda/../built/bin/interrogate
Reason: image not found
Trace/BPT trap
Maybe I will just turn off python integration for now