[SOLVED]Build runtime on linux

Hi
I just run this command to make runtime plugin:

python3 makepanda/makepanda.py --threads 2 --distributor cmu --runtime --installer

And the output is:

WARNING: Could not locate pkg-config package mozilla-plugin, excluding from build
Storing dependency cache.
Elapsed Time: 0 sec
Runtime must be compiled with OpenSSL, ZLib, NPAPI, JPEG and PNG support (missing NPAPI)
Build terminated.

Refering to [url][solved] Problem when building the runtime manually], i downloaded xulrunner sdk from here: http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/latest/sdk/
But it is a compressed folder with no installer, so how can i tell makepanda.py to use this xulrunner-sdk folder to build browser plugin? Does this plugin will work on google-chrome too?
Thanks.

Which Linux distribution are you on? There’s probably a better way to install it given a particular distribution.

All you actually need is the npapi SDK, which comes as part of many packages, including the xulrunner SDK.

code.google.com/p/npapi-sdk/

I’m on linux mageia 4, so you mean instead of “cmu” i should use “mageia” ?
I’ll try to download and compile npapi first.

You should be able to do something like this to find out which package provides npapi.h:

urpmf npapi.h

Greate tip, npapi.h was in firefox-devel package.
Now i get error about tinyxml:

$ python3 makepanda/makepanda.py --threads 2 --distributor mageia --runtime --installer
Generating dependencies...
[T1] Building C++ object built_mageia_rt/tmp/p3downloader_composite2.o
[T2] Building C++ object built_mageia_rt/tmp/tinyxml_composite1.o
In file included from panda/src/dxml/tinyxml.cpp:35:0,
                 from panda/src/dxml/tinyxml_composite1.cxx:1:
panda/src/dxml/tinyxml.h:99:20: error: variable ‘EXPCL_PANDA TiXmlCursor’ has initializer but incomplete type
 struct EXPCL_PANDA TiXmlCursor
                    ^
panda/src/dxml/tinyxml.h:99:20: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
panda/src/dxml/tinyxml.h:101:25: error: expected ‘}’ before ‘{’ token
     TiXmlCursor()       { Clear(); }
                         ^
panda/src/dxml/tinyxml.h:101:25: error: expected ‘,’ or ‘;’ before ‘{’ token
panda/src/dxml/tinyxml.h: In function ‘void Clear()’:
panda/src/dxml/tinyxml.h:102:27: error: ‘row’ was not declared in this scope
     void Clear()        { row = col = -1; }
                           ^
panda/src/dxml/tinyxml.h:102:33: error: ‘col’ was not declared in this scope
     void Clear()        { row = col = -1; }
                                 ^
panda/src/dxml/tinyxml.h: At global scope:
panda/src/dxml/tinyxml.h:106:1: error: expected declaration before ‘}’ token
 };
 ^
The following command returned a non-zero value: g++ -ftemplate-depth-50 -fPIC -c -o built_mageia_rt/tmp/tinyxml_composite1.o -Ibuilt_mageia_rt/tmp -Ibuilt_mageia_rt/include -DLINK_ALL_STATIC= -DTIXML_USE_STL= -Ipanda/src/dxml -pthread -fno-exceptions -fno-rtti -ffast-math -O3 -DNDEBUG panda/src/dxml/tinyxml_composite1.cxx
Storing dependency cache.
Elapsed Time: 4 sec
Build process aborting.
Build terminated.

This was a regression in Git, I’ve just pushed a fix.

Though you must specify “–distributor cmu”. The --distributor setting has nothing to do with your Linux distribution. You must also specify a host URL that it will use to get the Panda binaries from, such as

--distributor cmu --host https://runtime.panda3d.org/

Ok, with your help and fix and a little changes in makepandacore.py for adapting it with python3, finally i built plugin. :slight_smile:
Then i copy “bin/panda3d” into /usr/bin and “plugin/nppanda3d.so” into /usr/lib64 and put a link of it into /usr/lib64/mozilla/plugins.
In firefox i opened http://www.panda3d.org/gallery/demo.php?app=ball-in-maze, but after panda binary was downloaded nothing happened! just white box and no demo :frowning:
I downloaded ball-in-maze.p3d and run it via command line:

panda3d ball-in-maze

which works great.
I guess browser plugin can not find panda3d in /usr/bin. i don’t know what else i should do.

Hmm, someone reported this problem yesterday as well. Can you attach the relevant log files from ~/.panda3d/log ? Be sure that you don’t accidentally get the log files from when you were running it outside the browser.

Here you are:
p3dcore.log (5.11 KB)
p3dplugin.log (5.62 KB)

I’m on Mageia 4 x64 with firefox 31.5.0.
By the way is there any chance to make this plugin works with google-chrome too? on Windows chrome realizes the plugin but on linux even after i copy nppanda3d.so in /opt/google/chrome nothing’s happend.

Update: I’ve determined that the cause of the issue is that some Linux distributions ship an incompatible version of libpng, which causes a hang somewhere in the PNG library.

I think I should be able to hotfix this today; I’m rolling out builds right now. I’ll let you know when the issue has been resolved.

As for Google Chrome, I don’t think there should be any issues. Do you see the plug-in listed in chrome:///plugins ? If not, you may have placed it in the wrong directory, or you’re using a 32-bit plug-in with a 64-bit version of Chrome or vice versa.

Hotfix for 64-bit Linux is live, and it seems to work now. Please try it. The plug-in should automatically download and apply the update, no need to rebuild anything.

A hotfix for 32-bit linux will follow shortly.

Nice!! now it’s working. :smiley:
Thanks for your great support.
For Chrome i made an issue here to see what’s wrong:
https://productforums.google.com/forum/#!category-topic/chrome/report-a-problem-and-get-troubleshooting-help/linux/older-versions/DKr0ceDsotA

Since i want my app works on both Linux and Windows, i’m gonna run some tests on Windows too. so maybe i start another topic for Windows :wink: . i hope you don’t mind.

Great! Glad the issue got resolved. :slight_smile: Thanks for your help.

I just rolled out the hotfix for 32-bit Linux as well.

Feel free to create another topic for Windows. The same issue shouldn’t apply, though, but if it does, I can see if I can publish a hotfix for Windows as well.