Cross compilation and paths


I’ve been able to cross compile Panda3D using a toolchain, but when I try to run it on the target, I’ve got issues with the installation path. On the host, I had to install in a sysrooted environment. On the target, the Config.prc is not found (I corrected that by defining the $PRC_DIR env-var), but now I’m stuck with the “pandagl” module that cannot be loaded (but it exists).

Is there a way to tell Panda3D where to find ?

FYI, i’ve used ppremake for building.


You need to set “plugin-path” in your Config.prc file to the appropriate location.

Awesome :smiley:

Thanks a million

Hello again,

I’ve got another issue :frowning: , I can’t load an egg (.pz) with pview/python, here’s the error log :

:loader: loading file type module: pandaegg
:egg2pg: Reading plane.egg.pz

Error in plane.egg.pz at line 1, column 20:
<CoordinateSystem> { Y-Up }
syntax error

It looks like a locale issue, what are your advices ?

Thank you

Are you using a CVS version of Panda? If so, this has already been fixed, update to latest CVS.

No, I use the 1.8.1 tarball, but I’ll try with the latest CVS version.
Do you remember where it has been fixed in the source code ?

Thank you.

Oh. In that case, I don’t know. The issue was only for a short while on CVS, as far as I remember, and it had to do with the -i flag not being passed to the “flex” utility, which means that it did not generate a case-insensitive lexer to lex the .egg files.

Thank you for this information, I had to remove this option !
Now, I must figure out why it caused a compilation crash…


No, the option has to be there, otherwise it won’t work. So in your case, the issue has to be something else.

Could you maybe upload your file so that others can try and see if they can run it?

Thank you for your time and kindness,

I’ve tweaked the build system, and it’s alright now. Strangely, the

#define LFLAGS -i

in the egg source directory (Source.pp) is passed to the g++ linker (and crash the link process, cause gcc doesn’t understand it), not to flex (??) so I commented out this line… Then, I modified the flex binary to

#defer FLEX flex -i

in my Config.pp, and it works. It’s a ugly hack, but I don’t know pass flags to flex with the ppremake system.


You can pass flags to flex with

#define FLEXFLAGS -i

in your Sources.pp for the ppremake system with the code from CVS since about 3 weeks.

If you really want to work with the Panda3D 1.8.1 release, you’d need to use an older version of the GCC compiler (4.2 works, 4.7.2 does not accept the invalid -i option anymore).

Cool, good to know :wink:

Right, the problem was that LFLAGS was actually used for two things: as linker flags and as flex flags. This mistake wasn’t spotted because earlier versions of gcc simply ignored the -i flag. To fix this ambiguity, drwr recently renamed the flex flags variable to FLEXFLAGS on CVS.