Building C++ object built/tmp/pode_composite1.o

Hello,

I had the following problem:

And as changing python installation is not really an option, I decided to try and recompile panda for the epd python installation I’m using, as adviced here panda3d.org/manual/index.php … D_in_Linux . Because epd is based on python 2.7, I went ahead and tried to compile panda3d 1.8.0

After a lot of messing around, I got this compile script:

export PATH=/opt/epd-7.2-2/bin:$PATH
export LD_LIBRARY_PATH=/opt/epd-7.2-2/lib:/mnt/snn_gluster/panda4/panda3d-1.8.0/thirdparty/src
makepanda/makepanda.py --installer --nothing --verbose --no-openssl --use-python --use-ode

But now, I get this error:

[ 18%] Building Interrogate database built/pandac/input/libp3express.in
built/bin/interrogate -srcdir panda/src/express -Ipanda/src/express -Dvolatile -Dmutable -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D_LP64 -oc built/tmp/libp3express_igate.cxx -od built/pandac/input/libp3express.in -fnames -string -refcount -assert -python-native -Sbuilt/include/parser-inc -Ipanda/src/express -Sbuilt/tmp -Sbuilt/include -S/opt/epd-7.2-2/include/python2.7 -DMAKEPANDA= -DBUILDING_PANDAEXPRESS -module pandaexpress -library libp3express buffer.h 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 p3express_composite1.cxx p3express_composite2.cxx pStatCollectorForwardBase.h password_hash.h patchfile.h pointerTo.h pointerToArray.h pointerToArrayBase.h pointerToBase.h pointerToVoid.h profileTimer.h pta_double.h pta_float.h pta_int.h pta_stdfloat.h pta_uchar.h ramfile.h referenceCount.h subStream.h subStreamBuf.h subfileInfo.h temporaryFile.h threadSafePointerTo.h threadSafePointerToBase.h trueClock.h typedReferenceCount.h typedef.h vector_double.h vector_float.h vector_stdfloat.h vector_uchar.h virtualFile.h virtualFileComposite.h virtualFileList.h virtualFileMount.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
                *** Error in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/atomicAdjustPosixImpl.h near line 57, column 2:
                syntax error, unexpected IDENTIFIER, expecting '{' or ';' or ':' or '='
Error parsing file: 'buffer.h'
Process exited with exit status 1 and signal code 0
Interrogate failed, retrieving debug output...
Reading buffer.h
  Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/pandabase.h
    Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h
      Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtool_config.h
      Reading /opt/epd-7.2-2/include/python2.7/pyconfig.h
      Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolsymbols.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 120, column 2:
      Cannot find assert.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 134, column 2:
      Cannot find sys/types.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 138, column 2:
      Cannot find malloc.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 146, column 2:
      Cannot find alloca.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 150, column 2:
      Cannot find unistd.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 158, column 2:
      Cannot find locale.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 162, column 2:
      Cannot find string.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 166, column 2:
      Cannot find stdlib.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 170, column 2:
      Cannot find limits.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 178, column 2:
      Cannot find sys/time.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 182, column 2:
      Cannot find stdint.h
      *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h near line 186, column 2:
      Cannot find stdtypedefs.h
      Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase_cc.h
        *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase_cc.h near line 29, column 2:
        Cannot find iostream
        *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase_cc.h near line 30, column 2:
        Cannot find string
        *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase_cc.h near line 34, column 1:
        Attempt to use undefined namespace: std
    Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/pandasymbols.h
  Reading typedef.h
    Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/pandabase.h
    Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/numeric_types.h
      Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h
  Reading referenceCount.h
    Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/pandabase.h
    Reading weakReferenceList.h
      Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/pandabase.h
      Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/pset.h
        Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h
        Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/pallocator.h
          *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/pallocator.h near line 18, column 2:
          Cannot find memory
          Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h
          Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/memoryHook.h
            Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h
            Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/numeric_types.h
            Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/atomicAdjust.h
              Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h
              Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/selectThreadImpl.h
                Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h
              Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/atomicAdjustPosixImpl.h
                Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/dtoolbase.h
                Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/selectThreadImpl.h
                Reading /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/numeric_types.h
                *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/atomicAdjustPosixImpl.h near line 25, column 2:
                Cannot find pthread.h
                *** Error in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/atomicAdjustPosixImpl.h near line 57, column 2:
                syntax error, unexpected IDENTIFIER, expecting '{' or ';' or ':' or '='
Error parsing file: 'buffer.h'
Storing dependency cache.
Elapsed Time: 19 sec
The following command returned a non-zero value: built/bin/interrogate -srcdir panda/src/express -Ipanda/src/express -Dvolatile -Dmutable -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D_LP64 -oc built/tmp/libp3express_igate.cxx -od built/pandac/input/libp3express.in -fnames -string -refcount -assert -python-native -Sbuilt/include/parser-inc -Ipanda/src/express -Sbuilt/tmp -Sbuilt/include -S/opt/epd-7.2-2/include/python2.7 -DMAKEPANDA= -DBUILDING_PANDAEXPRESS -module pandaexpress -library libp3express buffer.h 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 p3express_composite1.cxx p3express_composite2.cxx pStatCollectorForwardBase.h password_hash.h patchfile.h pointerTo.h pointerToArray.h pointerToArrayBase.h pointerToBase.h pointerToVoid.h profileTimer.h pta_double.h pta_float.h pta_int.h pta_stdfloat.h pta_uchar.h ramfile.h referenceCount.h subStream.h subStreamBuf.h subfileInfo.h temporaryFile.h threadSafePointerTo.h threadSafePointerToBase.h trueClock.h typedReferenceCount.h typedef.h vector_double.h vector_float.h vector_stdfloat.h vector_uchar.h virtualFile.h virtualFileComposite.h virtualFileList.h virtualFileMount.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
Build terminated.

Frankly, I have no idea how to solve this. Is it possible to compile using ode in the thirdparty-directory? Does ode need to be installed on the system (which is kind of a problem since I can’t sudo on this cluster)? Is there something else going awry here?
[/quote]

The issue seems to be caused by:

                *** Warning in /mnt/snn_gluster/panda4/panda3d-1.8.0/built/include/atomicAdjustPosixImpl.h near line 25, column 2: 
                Cannot find pthread.h 

which is worrisome. pthread.h should be shipped with the standard C library, I think. Where is it on your system?

jdgrave@clsnn001:/mnt/snn_gluster/panda4/panda3d-1.8.0$ locate pthread.h
/usr/include/pthread.h
/usr/include/panda3d/parser-inc/pthread.h
/usr/include/panda3d/parser-inc/netinet/pthread.h
/usr/include/panda3d/parser-inc/openssl/pthread.h
/usr/src/modules/openafs/include/rx/rx_pthread.h
/usr/src/modules/openafs/src/rx/rx_pthread.h

Hmm. I don’t understand why this is happening then, but I suspect it’s got something to do with your rather peculiar choice of build options. Are you sure you’re only interested in the pandaode wrappers? And if so, why not use something like pyode if you don’t need any of Panda’s other features?

Another theory that just came to mind is that your built/include/parser-inc directory has gotten corrupt, which can happen if makepanda was Ctrl^C’ed out of - makepanda doesn’t automatically update that directory, a bug in 1.8.0 which will be fixed in 1.8.1.
To make sure the directory is intact, do “rm -rf built/include/parser-inc”. Sounds counterintuitive, but makepanda will currently only remake that directory if it’s missing.

Yes, this is because the software usually needs to have visualisation, but now a cluster of computers came available which could speed up the simulation (and since they don’t have graphics, nothing fancy is needed) Therefore the software has already been written with panda3d, not pyode. But I can’t install anything on the cluster, so I removed as much unnecessary fancyness as possible, so I only have a minimum of work setting everything up for tools I don’t need.

Yes, that did the trick :stuck_out_tongue:

Now it compiles onto this error. Apparently I need to add #define dDouble somewhere (ODE was compiled with double precision), but where?

Generating dependencies...
[ 95%] Building C++ object built/tmp/p3ode_composite1.o
g++ -ftemplate-depth-30 -fPIC -c -o built/tmp/p3ode_composite1.o -Ibuilt/tmp -Ibuilt/include -I/opt/epd-7.2-2/include/python2$
In file included from /usr/local/include/ode/ode.h:30,
                 from panda/src/ode/ode_includes.h:39,
                 from panda/src/ode/odeWorld.h:21,
                 from panda/src/ode/config_ode.cxx:16,
                 from panda/src/ode/p3ode_composite1.cxx:2:
/usr/local/include/ode/common.h:102:2: error: #error You must #define dSINGLE or dDOUBLE
/usr/local/include/ode/common.h:208:2: error: #error You must #define dSINGLE or dDOUBLE
In file included from /usr/local/include/ode/ode.h:30,
                 from panda/src/ode/ode_includes.h:39,
                 from panda/src/ode/odeWorld.h:21,
                 from panda/src/ode/config_ode.cxx:16,
                 from panda/src/ode/p3ode_composite1.cxx:2:
/usr/local/include/ode/common.h:130: error: ‘dReal’ does not name a type
/usr/local/include/ode/common.h:131: error: ‘dReal’ does not name a type
/usr/local/include/ode/common.h:132: error: ‘dReal’ does not name a type
/usr/local/include/ode/common.h:133: error: ‘dReal’ does not name a type
/usr/local/include/ode/common.h:134: error: ‘dReal’ does not name a type
/usr/local/include/ode/common.h:135: error: ‘dReal’ does not name a type
/usr/local/include/ode/common.h:362: error: ‘dVector3’ does not name a type
(600 similar lines omitted)

These are supposed to be defined in ode/odeconfig.h of your ODE build. Does yours not contain a definition of dSINGLE or dDOUBLE? The version of ODE that we ship as part of the thirdparty packages archive contains the following in ode/odeconfig.h:

#ifndef ODECONFIG_H
#define ODECONFIG_H

#ifndef dDOUBLE
#ifndef dSINGLE
#define dSINGLE
#endif
#endif

The fact that this file wasn’t included or doesn’t contain the definitions means that something else is wrong. Does your ode/ode.h file include ode/odeconfig.h?

Yes, I do have the file ode/odeconfig.h, but apparently it doesn’t contain the line #define dDouble. Should I add it manually, or should I use the include-files as they are shipped with the windows version of panda3d?

I have been experimenting all morning and managed to point makepanda to another directory containing an ode/lib and ode/include/ode which I can edit. After that I tried adding the line #define dDouble on various places in the ode which I compiled myself, but so far I didn’t manage to get past the error.

OK, I think/hope I solved the previous error. Now I have an error at the same location in the compilation process:

[ 95%] Building C++ object built/tmp/p3ode_composite1.o
g++ -ftemplate-depth-30 -fPIC -c -o built/tmp/p3ode_composite1.o -Ibuilt/tmp -Ibuilt/include -I/opt/epd-7.2-2/include/python2.7 -I/mnt/snn_gluster/panda4/panda3d-1.8.0/thirdparty/linux-libs-x64/ode/include -DMAKEPANDA= -Ipanda/src/ode -pthread -O2 -DBUILDING_PANDAODE panda/src/ode/p3ode_composite1.cxx
In file included from panda/src/ode/odeWorld.h:139,
                 from panda/src/ode/config_ode.cxx:16,
                 from panda/src/ode/p3ode_composite1.cxx:1:
panda/src/ode/odeWorld.I: In member function ‘void OdeWorld::step_fast1(dReal, int)’:
panda/src/ode/odeWorld.I:150: error: ‘dWorldStepFast1’ was not declared in this scope
panda/src/ode/odeWorld.I: In member function ‘void OdeWorld::set_auto_enable_depth_sf1(int)’:
panda/src/ode/odeWorld.I:155: error: ‘dWorldSetAutoEnableDepthSF1’ was not declared in this scope
panda/src/ode/odeWorld.I: In member function ‘int OdeWorld::get_auto_enable_depth_sf1() const’:
panda/src/ode/odeWorld.I:160: error: ‘dWorldGetAutoEnableDepthSF1’ was not declared in this scope

For clarity, should I rather use the ode-files included in the windows distribution which does contain the thirdparty folder?

I’m not sure. Either the ODE installation is broken, or we are relying on features that have been removed in newer versions of ODE.

I haven’t tried to build with an updated ODE build in quite a while now, particularly now that interest seems to have been shifted toward Bullet. The ODE build we ship as part of the thirdparty package is a few versions old.

I can confirm that building with ode-0.12.tar.bz2 will give the the undefined symbol error but ode-0.11.1.tar.bz2 won’t.

I’m in a similar situation to 317070.

I couldn’t use any of the supported platforms because they didn’t play nicely with my graphics card (supid Nvidia optimus/acer).

Panda1.8 seems to be working properly now on Mint 14. The only libraries I compiled by hand were libjpeg.so.9 and libode.so.1 (version as stated above).