Compile runtime browser plugin with ppmake

Hi,
I’ve compiled Panda3D 1.7.0 on my Linux gentoo with ppmake. It’s seems work well, but I’m not able to find nppanda3d.so, needed for browser integration. What I’m missing?

Many thanks!

Nicholas

note: I tryied with makepanda, with no sucess:

[  7%] Building Interrogate database built/pandac/input/libexpress.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__i386__ -DFORCE_INLINING -oc built/tmp/libexpress_igate.cxx -od built/pandac/input/libexpress.in -fnames -string -refcount -assert -python-native -Sbuilt/include/parser-inc -Ipanda/src/express -S/usr/include/python2.6 -Sbuilt/tmp -Sbuilt/include -DMAKEPANDA= -DBUILDING_PANDAEXPRESS -module pandaexpress -library libexpress 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 express_composite.cxx 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_float.h pta_int.h pta_uchar.h ramfile.h referenceCount.h stringDecoder.h subStream.h subStreamBuf.h textEncoder.h threadSafePointerTo.h threadSafePointerToBase.h trueClock.h typedReferenceCount.h typedef.h unicodeLatinMap.h vector_float.h vector_uchar.h virtualFile.h virtualFileComposite.h virtualFileList.h virtualFileMount.h virtualFileMountMultifile.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 /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexPosixImpl.h near line 40, column 29:
                syntax error, unexpected '*', expecting '{' or ';' or ':' or '='
Error parsing file: 'buffer.h'
Interrogate failed, retrieving debug output...
Reading buffer.h
  Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/pandabase.h
    Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
      Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtool_config.h
      Reading /usr/include/python2.6/pyconfig.h
      Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolsymbols.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 104, column 2:
      Cannot find assert.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 118, column 2:
      Cannot find sys/types.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 122, column 2:
      Cannot find malloc.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 130, column 2:
      Cannot find alloca.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 134, column 2:
      Cannot find unistd.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 142, column 2:
      Cannot find locale.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 146, column 2:
      Cannot find string.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 150, column 2:
      Cannot find stdlib.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 154, column 2:
      Cannot find limits.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 162, column 2:
      Cannot find sys/time.h
      *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h near line 166, column 2:
      Cannot find stdtypedefs.h
      Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase_cc.h
        *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase_cc.h near line 24, column 2:
        Cannot find iostream
        *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase_cc.h near line 25, column 2:
        Cannot find string
        *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase_cc.h near line 29, column 1:
        Attempt to use undefined namespace: std
    Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/pandasymbols.h
  Reading typedef.h
    Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/pandabase.h
    Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/numeric_types.h
      Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
  Reading referenceCount.h
    Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/pandabase.h
    Reading weakReferenceList.h
      Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/pandabase.h
      Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/pset.h
        Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
        Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/pallocator.h
          *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/pallocator.h near line 18, column 2:
          Cannot find memory
          Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
          Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/memoryHook.h
            Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
            Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/numeric_types.h
            Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/atomicAdjust.h
              Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
              Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/selectThreadImpl.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
              Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/atomicAdjustDummyImpl.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/selectThreadImpl.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/numeric_types.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/atomicAdjustDummyImpl.I
            Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexImpl.h
              Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
              Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/selectThreadImpl.h
              Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexDummyImpl.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/selectThreadImpl.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexDummyImpl.I
              Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexPosixImpl.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/dtoolbase.h
                Reading /home/gordon/myusr/src/panda3d-1.7.0/built/include/selectThreadImpl.h
                *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexPosixImpl.h near line 23, column 2:
                Cannot find pthread.h
                *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexPosixImpl.h near line 24, column 2:
                Cannot find errno.h
                *** Warning in /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexPosixImpl.h near line 25, column 2:
                Cannot find assert.h
                *** Error in /home/gordon/myusr/src/panda3d-1.7.0/built/include/mutexPosixImpl.h near line 40, column 29:
                syntax error, unexpected '*', expecting '{' or ';' or ':' or '='
Error parsing file: 'buffer.h'
Storing dependency cache.
Elapsed Time: 9 sec

nppanda3d.so is part of the runtime build, which is not made by default. If you want to build the runtime in ppremake, you need to set the following in your Config.pp file:

#define HAVE_P3D_PLUGIN 1
#define NPAPI_IPATH ... something appropriate ...
#define NPAPI_LPATH ... something appropriate ...
#define NPAPI_LIBS ... something appropriate ...
#define HAVE_NPAPI 1
#define PANDA_PACKAGE_HOST_URL ... something appropriate ..

Note that you do have to set PANDA_PACKAGE_HOST_URL to an appropriate URL that hosts your Core API build (and you also have to build a Core API and host it there). You could point this to runtime.panda3d.org/ , which is the default PANDA_PACKAGE_HOST_URL, but presumably there’s a reason you’re making a custom nppanda3d.so build, and that same reason might compel you to have a custom Core API build as well. (If it doesn’t, then are you sure you need to make a custom nppanda3d.so build?)

I’m not sure about the makepanda issues, but it might be solved with the latest cvs tree. The same host issue applies to a makepanda build as well, of course.

David

Thanks a lot for your reply. I’m re-compiling panda with runtime enabled.

After your reply, I’m a little bit confused: I built panda3D SDK with ppmake because in order to make some games. And I’m building the runtime plug-in in order to play panda3d games only released through browser. I’m not using pre-built packages (deb, rpm) because of Gentoo (and ppmake instead of makepanda for the issue stated before).

I’m doing it wrong?

I’m also getting the last cvs version in order to try with pandamake.

Thank you!

Nicholas

Well, I don’t know whether you’re doing it wrong or not. You might be able to use a standard nppanda3d.so that is already provided at panda3d.org (you could unpack it from an rpm or deb file and just install it into ~/.mozilla/plugins; it might just work).

Whether or not you need to build your own runtime has nothing to do with the Panda3D version that you build for development.

David

Good idea. Thanks for your suggestions.

Regards,

Nicholas