interrogate compile error - Mac OSX

Well…I haven’t given up on trying to compile this thing for Mac. I have run into a few snags, but I’ve gotten dtool to fully compile and install and now I’m working on the panda step.

Here is the error I am getting

interrogate -od Opt3-osx/ -oc Opt3-osx/libexpress_igate.cxx -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const -S/usr/local/panda/include/parser-inc -S/usr/include -I/Users/pope/Desktop/panda3d-2004-07-27/panda -I../pandabase -I/usr/local/panda/include -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3   -fnames -string -refcount -assert -python    -module "pandaexpress" -library "libexpress" atomicAdjustDummyImpl.h atomicAdjust.h atomicAdjustImpl.h atomicAdjustNsprImpl.h bigEndian.h buffer.h checksumHashGenerator.h circBuffer.h clockObject.h conditionVarDummyImpl.h conditionVar.h conditionVarImpl.h conditionVarNsprImpl.h config_express.h datagram.h datagramGenerator.h datagramIterator.h datagramSink.h dcast.h error_utils.h get_config_path.h hashGeneratorBase.h hashVal.h indent.h indirectLess.h littleEndian.h memoryInfo.h memoryUsage.h memoryUsagePointerCounts.h memoryUsagePointers.h multifile.h mutexDummyImpl.h pmutex.h mutexHolder.h mutexImpl.h mutexNsprImpl.h namable.h nativeNumericData.h numeric_types.h ordered_vector.h patchfile.h pointerTo.h pointerToArray.h profileTimer.h pta_uchar.h ramfile.h referenceCount.h register_type.h reversedNumericData.h selectThreadImpl.h streamReader.h streamWriter.h stringDecoder.h subStream.h subStreamBuf.h textEncoder.h threadDummyImpl.h thread.h threadImpl.h threadNsprImpl.h threadPriority.h tokenBoard.h trueClock.h typeHandle.h typedObject.h typedReferenceCount.h typedef.h typeRegistry.h typeRegistryNode.h unicodeLatinMap.h vector_uchar.h virtualFileComposite.h virtualFile.h virtualFileList.h virtualFileMount.h virtualFileMountMultifile.h virtualFileMountSystem.h virtualFileSimple.h virtualFileSystem.h windowsRegistry.h zStream.h zStreamBuf.h express_composite1.cxx express_composite2.cxx
                    *** Error in /usr/include/libkern/machine/OSByteOrder.h near line 44, column 14:
                    parse error, expecting `')''
Error parsing file: 'atomicAdjustDummyImpl.h'
make: *** [Opt3-osx/libexpress_igate.cxx] Error 1

Does anyone know how to possibly fix this?

I forgot to mention…/usr/include/libkern/machine/OSByteOrder.h works fine. Someone did a test program that used that header and it worked.

The problem is that OSByteOrder.h relies on some symbols that are no doubt defined for the OSX native compiler, but are not part of ANSI C. This means that interrogate, which is a pure C++ parser and knows nothing about crazy OSX stuff, cannot parse the file. There are two solutions.

One is to figure out what those symbols are, and #define them to something that interrogate can parse. That is the purpose of SYSTEM_IGATE_FLAGS in Config.Linux.pp and Config.Win32.pp.

Another solution is to prevent interrogate from trying to read this particular file at all. You can do that by adding it to the list of header files in dtool/src/parser-inc (and add it to the list in the Sources.pp file as well). But you may just then run into the same problem with the next system header file.

A third answer, while not an immediate solution, is to put this particular problem aside for now by defining HAVE_PYTHON to the empty string in your Config.pp file. That will prevent interrogate from running at all. Of course, you won’t be generating the Python interfaces either, but, depending on your philosophy, maybe the first step is to get Panda compiled and running in C++, and then deal with solving the Python problem later.