Help on Panda3D compilation in Beagleboard

rdb,

After coming back home, I just decided to see what is going on with the files.

I could successfully identify normal library files such as ‘libpandagles.so’ file;

hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ readelf -l libpandagles.so

Elf file type is DYN (Shared object file)
Entry point 0x1118
There are 7 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  EXIDX          0x0012dc 0x000012dc 0x000012dc 0x00020 0x00020 R   0x4
  LOAD           0x000000 0x00000000 0x00000000 0x01300 0x01300 R E 0x8000
  LOAD           0x001dd0 0x00009dd0 0x00009dd0 0x00298 0x002f4 RW  0x8000
  DYNAMIC        0x001de0 0x00009de0 0x00009de0 0x00220 0x00220 RW  0x4
  NOTE           0x000114 0x00000114 0x00000114 0x00024 0x00024 R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4
  GNU_RELRO      0x001dd0 0x00009dd0 0x00009dd0 0x00230 0x00230 R   0x1

 Section to Segment mapping:
  Segment Sections...
   00     .ARM.exidx 
   01     .note.gnu.build-id .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .ARM.extab .ARM.exidx .eh_frame 
   02     .init_array .fini_array .jcr .dynamic .got .data .bss 
   03     .dynamic 
   04     .note.gnu.build-id 
   05     
   06     .init_array .fini_array .jcr .dynamic 

However, those listed files were not recognized with the readelf tool.

hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ readelf -l libpanda.so 
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
readelf: Error: libpanda.so: Failed to read file header
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ 

While the normal elf file’s first part dump looks like this,

hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C libpandagles.so | head
00000000  7f 45 4c 46 01 01 01 00  00 00 00 00 00 00 00 00  |.ELF............|
00000010  03 00 28 00 01 00 00 00  18 11 00 00 34 00 00 00  |..(.........4...|
00000020  98 3d 14 00 02 00 00 05  34 00 20 00 07 00 28 00  |.=......4. ...(.|
00000030  26 00 23 00 01 00 00 70  dc 12 00 00 dc 12 00 00  |&.#....p........|
00000040  dc 12 00 00 20 00 00 00  20 00 00 00 04 00 00 00  |.... ... .......|
00000050  04 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  |................|
00000060  00 00 00 00 00 13 00 00  00 13 00 00 05 00 00 00  |................|
00000070  00 80 00 00 01 00 00 00  d0 1d 00 00 d0 9d 00 00  |................|
00000080  d0 9d 00 00 98 02 00 00  f4 02 00 00 06 00 00 00  |................|
00000090  00 80 00 00 02 00 00 00  e0 1d 00 00 e0 9d 00 00  |................|
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ 

those corrupted files look like this.

hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C libegg.so | head
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00200000  36 43 32 34 37 37 31 46  32 36 44 35 31 41 38 39  |6C24771F26D51A89|
00200010  30 37 38 36 44 41 35 31  36 44 42 43 32 44 31 36  |0786DA516DBC2D16|
00200020  31 36 38 30 42 31 33 34  46 31 37 31 35 42 33 32  |1680B134F1715B32|
00200030  46 37 33 34 45 36 36 37  36 35 30 33 39 38 45 43  |F734E667650398EC|
00200040  32 32 34 31 41 46 37 38  38 37 37 42 42 33 44 36  |2241AF78877BB3D6|
00200050  31 44 38 33 44 30 31 35  38 44 44 45 38 39 34 38  |1D83D0158DDE8948|
00200060  36 32 45 45 36 45 31 42  45 45 32 37 38 37 32 34  |62EE6E1BEE278724|
00200070  45 41 37 42 33 34 43 37  34 46 30 41 35 44 36 42  |EA7B34C74F0A5D6B|
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C libpnmimagetypes.so | head
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
001858d0
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C libdistort.so | head
00000000  70 79 73 75 70 70 6f 72  74 20 2d 0a 00 00 00 00  |pysupport -.....|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000  f2 9b 01 00 0c 00 01 02  2e 00 00 00 f1 9b 01 00  |................|
00001010  f4 0f 02 02 2e 2e 00 00  00 00 00 00 00 00 00 00  |................|
00001020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00002000  f3 9b 01 00 0c 00 01 02  2e 00 00 00 f1 9b 01 00  |................|
00002010  0c 00 02 02 2e 2e 00 00  f4 9b 01 00 10 00 07 02  |................|
00002020  6f 72 69 67 69 6e 73 00  f8 9b 01 00 10 00 08 01  |origins.........|
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C libeffects.so | head
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0002d0b0
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C libpanda.so | head
00000000  df 9e 01 00 0c 00 01 02  2e 00 00 00 f1 9b 01 00  |................|
00000010  0c 00 02 02 2e 2e 00 00  e1 9e 01 00 34 00 0a 01  |............4...|
00000020  73 73 68 5f 63 6f 6e 66  69 67 67 2d 6e 65 77 00  |ssh_configg-new.|
00000030  e1 9e 01 00 1c 00 13 01  73 73 68 5f 63 6f 6e 66  |........ssh_conf|
00000040  69 67 2e 64 70 6b 67 2d  6e 65 77 00 e0 9e 01 00  |ig.dpkg-new.....|
00000050  b4 0f 06 01 6d 6f 64 75  6c 69 00 00 00 00 00 00  |....moduli......|
00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000  23 20 54 69 6d 65 20 54  79 70 65 20 54 65 73 74  |# Time Type Test|
00001010  73 20 54 72 69 65 73 20  53 69 7a 65 20 47 65 6e  |s Tries Size Gen|
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C libp3openal_audio.so | head
00000000  67 6d 65 6e 75 63 61 63  68 65 20 6c 61 6e 67 75  |gmenucache langu|
00000010  61 67 65 2d 70 61 63 6b  2d 6b 6f 2d 62 61 73 65  |age-pack-ko-base|
00000020  0a 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
0012af20
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C librecorder.so | head
00000000  0c c8 06 00 0d c8 06 00  0e c8 06 00 0f c8 06 00  |................|
00000010  10 c8 06 00 11 c8 06 00  12 c8 06 00 13 c8 06 00  |................|
00000020  14 c8 06 00 15 c8 06 00  16 c8 06 00 17 c8 06 00  |................|
00000030  18 c8 06 00 19 c8 06 00  1a c8 06 00 1b c8 06 00  |................|
00000040  1c c8 06 00 1d c8 06 00  1e c8 06 00 1f c8 06 00  |................|
00000050  20 c8 06 00 21 c8 06 00  22 c8 06 00 23 c8 06 00  | ...!..."...#...|
00000060  24 c8 06 00 25 c8 06 00  26 c8 06 00 27 c8 06 00  |$...%...&...'...|
00000070  28 c8 06 00 29 c8 06 00  2a c8 06 00 2b c8 06 00  |(...)...*...+...|
00000080  2c c8 06 00 2d c8 06 00  2e c8 06 00 2f c8 06 00  |,...-......./...|
00000090  30 c8 06 00 31 c8 06 00  32 c8 06 00 33 c8 06 00  |0...1...2...3...|
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ hexdump -C libcftalk.so | head
00000000  6c 64 63 6f 6e 66 69 67  20 2d 0a 00 00 00 00 00  |ldconfig -......|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001000  2f 64 65 76 2f 72 6f 6f  74 20 2f 20 65 78 74 33  |/dev/root / ext3|
00001010  20 72 77 20 30 20 30 0a  70 72 6f 63 20 2f 70 72  | rw 0 0.proc /pr|
00001020  6f 63 20 70 72 6f 63 20  72 77 20 30 20 30 0a 6e  |oc proc rw 0 0.n|
00001030  6f 6e 65 20 2f 70 72 6f  63 2f 73 79 73 2f 66 73  |one /proc/sys/fs|
00001040  2f 62 69 6e 66 6d 74 5f  6d 69 73 63 20 62 69 6e  |/binfmt_misc bin|
00001050  66 6d 74 5f 6d 69 73 63  20 72 77 2c 6e 6f 65 78  |fmt_misc rw,noex|
00001060  65 63 2c 6e 6f 73 75 69  64 2c 6e 6f 64 65 76 20  |ec,nosuid,nodev |
hl1oap@hl1oap-ubuntu-10:/media/BEAGLE-EXT3/usr/local/panda3d/lib$ 

So, my guess is that those files were totally corrupted for some reason. And, I am very much suspicious if the filesystem on the SD card were corrupted. I could see sometimes kernel error messages complaining the I/O error when I turn the board on for a long time to compile.

=> I just re-compiled all the eight libraries individually(it took less time than I expected.) and they seem O.K. I could at least parse the file header with readelf tool, at this moment.
Now, I have to visit my friend’s lab again to test the result.

I will let you know the result. :wink:

rdb,

Today, I tested the compiled panda3d on the beagleboard with my friend.

  1. Config.prg
    When I run ‘pview’ at the prompt, it produced the following error message
zooliet@beagleboard:/workspace/devel/panda3d$ pview
Known pipe types:
(all display modules loaded.)
No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

I found that I don’t have any file named ‘Config.prg’ in my panda3d source directory. I surely finished compiling ppremake, dtool, panda and direct sequently except pandatool which I encountered compile error. At which stage is the ‘Config.prc’ file generated?

  1. Graphics pipe
    Since I preserved the panda3d source code sets I compiled with ‘makepanda’ before, I searched the build directory and found the ‘Confauto.prc’ file and Config.prc’ file as followings
###########################################################
###                                                     ###
### Panda3D Configuration File -  User-Editable Portion ###
###                                                     ###
###########################################################

# Uncomment one of the following lines to choose whether you should
# run using OpenGL, DirectX or TinyPanda (software) rendering.
# There can only be one load-display line, but you can use
# multiple aux-display lines to specify fallback modules.
# When the module indicated by load-display fails, it will fall
# back to the next display module indicated by aux-display,
# when that fails, the next aux-display line, and so on.

load-display pandagl
#load-display pandadx9
#load-display pandadx8
#load-display tinydisplay

# These control the placement and size of the default rendering window.

win-origin 50 50
win-size 800 600

# Uncomment this line if you want to run Panda fullscreen instead of
# in a window.

fullscreen #f

# The framebuffer-hardware flag forces it to use an accelerated driver.
# The framebuffer-software flag forces it to use a software renderer.
# If you don't set either, it will use whatever's available.

framebuffer-hardware #t
framebuffer-software #f

# These set the minimum requirements for the framebuffer.
# A value of 1 means: get as many bits as possible,
# consistent with the other framebuffer requirements.

depth-bits 1
color-bits 1
alpha-bits 0
stencil-bits 0
multisamples 0

# These control the amount of output Panda gives for some various
# categories.  The severity levels, in order, are "spam", "debug",
# "info", "warning", and "error"; the default is "info".  Uncomment
# one (or define a new one for the particular category you wish to
# change) to control this output.

notify-level warning
default-directnotify-level warning

# These specify where model files may be loaded from.  You probably
# want to set this to a sensible path for yourself.  $THIS_PRC_DIR is
# a special variable that indicates the same directory as this
# particular Config.prc file.

model-path    $MAIN_DIR
model-path    $THIS_PRC_DIR/..
model-path    $THIS_PRC_DIR/../models

# This enable the automatic creation of a TK window when running
# Direct.

want-directtools  #f
want-tk           #f

# Enable/disable performance profiling tool and frame-rate meter

want-pstats            #f
show-frame-rate-meter  #f

# Enable audio using the FMOD audio library by default:

audio-library-name p3openal_audio

# Enable the use of the new movietexture class.

use-movietexture #t

# The new version of panda supports hardware vertex animation, but it's not quite ready

hardware-animated-vertices #f

# Enable the model-cache, but only for models, not textures.

model-cache-dir $USER_APPDATA/.panda3d/cache
model-cache-textures #f

# This option specifies the default profiles for Cg shaders.
# Setting it to #t makes them arbvp1 and arbfp1, since these
# seem to be most reliable. Setting it to #f makes Panda use
# the latest profile available.
# This default profile can be overriden by any profile setting
# from within the application.

basic-shaders-only #t
###########################################################
###                                                     ###
### Panda3D Configuration File - Auto-Generated Portion ###
###                                                     ###
### Editing this file is not recommended. Most of these ###
### directives can be overriden in Config.prc           ###
###                                                     ###
###########################################################

# The egg loader is handy to have available by default.  This allows
# clients to load egg files.  (The bam loader is built-in so bam files
# are always loadable).

# By qualifying with the extension "egg", we indicate the egg loader
# should be made available only if you explicitly name a file with an
# .egg extension.

# Also see ptloader, which is built as part of pandatool; it allows
# files of more exotic types (like .flt, .mb, .lwo, and .dxf) to be
# loaded directly into Panda.

load-file-type egg pandaegg

# The following lines define some handy object types to use within the
# egg syntax.  This remaps <ObjectType> { name } into whatever egg
# syntax is given by egg-object-type-name, which makes a handy
# abbreviation for modeling packages (like Maya) to insert
# sophisticated egg syntax into the generated egg file, using a single
# object type string.

egg-object-type-portal          <Scalar> portal { 1 }
egg-object-type-polylight       <Scalar> polylight { 1 }
egg-object-type-seq24           <Switch> { 1 } <Scalar> fps { 24 }
egg-object-type-seq12           <Switch> { 1 } <Scalar> fps { 12 }
egg-object-type-indexed         <Scalar> indexed { 1 }
egg-object-type-seq10           <Switch> { 1 } <Scalar> fps { 10 }
egg-object-type-seq8            <Switch> { 1 } <Scalar> fps { 8 }
egg-object-type-seq6            <Switch> { 1 } <Scalar>  fps { 6 }
egg-object-type-seq4            <Switch> { 1 } <Scalar>  fps { 4 }
egg-object-type-seq2            <Switch> { 1 } <Scalar>  fps { 2 }

egg-object-type-binary          <Scalar> alpha { binary }
egg-object-type-dual            <Scalar> alpha { dual }
egg-object-type-glass           <Scalar> alpha { blend_no_occlude }

# These are just shortcuts to define the Model and DCS flags, which
# indicate nodes that should not be flattened out of the hierarchy
# during the conversion process.  DCS goes one step further and
# indicates that the node's transform is important and should be
# preserved (DCS stands for Dynamic Coordinate System).  Notouch is
# even stronger, and means not to do any flattening below the node at
# all.
egg-object-type-model           <Model> { 1 }
egg-object-type-dcs             <DCS> { 1 }
egg-object-type-notouch         <DCS> { no_touch }

# The following define various kinds of collision geometry.  These
# mark the geometry at this level and below as invisible collision
# polygons, which can be used by Panda's collision system to detect
# collisions more optimally than regular visible polygons.
egg-object-type-barrier         <Collide> { Polyset descend }
egg-object-type-sphere          <Collide> { Sphere descend }
egg-object-type-invsphere       <Collide> { InvSphere descend }
egg-object-type-tube            <Collide> { Tube descend }

# As above, but these are flagged to be "intangible", so that they
# will trigger an event but not stop an object from passing through.
egg-object-type-trigger         <Collide> { Polyset descend intangible }
egg-object-type-trigger-sphere  <Collide> { Sphere descend intangible }

# "floor" and "dupefloor" define the nodes in question as floor
# polygons.  dupefloor means to duplicate the geometry first so that
# the same polygons serve both as visible geometry and as collision
# polygons.
egg-object-type-floor           <Collide> { Polyset descend level }
egg-object-type-dupefloor       <Collide> { Polyset keep descend level }

# "bubble" puts an invisible bubble around an object, but does not
# otherwise remove the geometry.
egg-object-type-bubble          <Collide> { Sphere keep descend }

# "ghost" turns off the normal collide bit that is set on visible
# geometry by default, so that if you are using visible geometry for
# collisions, this particular geometry will not be part of those
# collisions--it is ghostlike.
egg-object-type-ghost           <Scalar> collide-mask { 0 }

# "glow" is useful for halo effects and things of that ilk.  It
# renders the object in add mode instead of the normal opaque mode.
egg-object-type-glow            <Scalar> blend { add }

# This module allows direct loading of formats like .flt, .mb, or .dxf

load-file-type p3ptloader

# Define a new egg object type.  See the comments in _panda.prc about this.

egg-object-type-direct-widget   <Scalar> collide-mask { 0x80000000 } <Collide> { Polyset descend }

# Define a new cull bin that will render on top of everything else.

cull-bin gui-popup 60 unsorted

# The following two lines are a fix for flaky hardware clocks.

lock-to-one-cpu #t
paranoid-clock 1

# This default only comes into play if you try to load a model
# and don't specify an extension.

default-model-extension .egg

However, I get the same error message when I run the ‘pview’ command even when I have placed the two files to the /etc directory. Do you have any idea what is wrong with my current setting above?

  1. First of all, it’s prc, not prg.
    There are some configuration files generated in (dtool,panda,pandatool,direct)/src/configfiles and stored in /usr/local/panda/etc, but they only cover some basic things.
    The Config.prc and Confauto.prc that you used are generated from makepanda/(config.in,confauto.in), which is only used in the case of the makepanda build.
    I’m not sure if /etc is read in the case of the ppremake build, better put them in /usr/local/panda/etc to be sure.

  2. You’ll need to add the OpenGL ES graphics pipe - set load-display to “pandagles”. You can also set it to “pandagles2” for OpenGL ES 2.0 support - but as GLES2 does not have a fixed-function pipeline, it will require you to write a shader for every object, or they will show up red.

rdb,

Today, I tried your suggestion and still did not get luck.

I placed my Config.prc file to ‘/usr/local/panda3d/etc’ and the first part of the file is as following;

load-display pandagles
#load-display pandagl
#load-display pandadx9
#load-display pandadx8
#load-display tinydisplay
aux-display pandagles2
aux-display tinydisplay

However, I still get the following error message when I run pview

zooliet@beagleboard:/usr/local/panda3d/lib$ pview
:display(warning): Unable to load: No error.
:display(warning): Unable to load: No error.
:display(warning): Unable to load: No error.
Known pipe types:
(all display modules loaded.)
No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

At this moment, what I am sure is that the pview reads Config.prc correctly becuase when I delete ‘aux-display tinydisplay’ line from the prc file, I get the following error message;

zooliet@beagleboard:/usr/local/panda3d/lib$ pview
:display(warning): Unable to load: No error.
:display(warning): Unable to load: No error.
Known pipe types:
(all display modules loaded.)
No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

You can see that the number of ‘display(warning): Unable to read: No error’ mesage changed from three to two.

So, I assume that the problem is related to the locations of certain library files.
In my Config.pp file, I assigned the path for glxx stuffs as following;

#define GLES_IPATH /workspace/devel/SGX/OGLES/SDKPackage/Builds/OGLES/Include
#define GLES_LPATH /usr/lib
#defer GLES_LIBS GLES_CM
#define HAVE_GLES 1

#define GLES2_IPATH /workspace/devel/SGX/OGLES2/SDKPackage/Builds/OGLES2/Include
#define GLES2_LPATH /usr/lib
#defer GLES2_LIBS GLESv2
#define HAVE_GLES2 1

#define EGL_IPATH /workspace/devel/SGX/OGLES2/SDKPackage/Builds/OGLES2/Include
#define EGL_LPATH /usr/lib
#defer EGL_LIBS EGL
#define HAVE_EGL 1

Since I didn’t know exactly which library was for which, in the TI provided tool(SGX) directory structure, I just set the path like that and copied all the following shared object files to /usr/lib

zooliet@beagleboard:/workspace/devel/SGX$ find . -name '*.so'
./OGLES/SDKPackage/Utilities/PVRVFrame/OGLES-2.0/Linux/libEGL.so
./OGLES/SDKPackage/Utilities/PVRVFrame/OGLES-2.0/Linux/libGLESv2.so
./OGLES/SDKPackage/Utilities/PVRVFrame/OGLES-1.1/Linux/libGLES_CM.so
./OGLES/SDKPackage/Utilities/PVRVFrame/OGLES-1.1/Linux/libGLES_CL.so
./OGLES/SDKPackage/Utilities/PVRVFrame/OGLES-1.1/Linux/libEGL.so
./OGLES/SDKPackage/Utilities/PVRGeoPOD/Maya/LinuxPC/PVRGeoPOD_v7.so
./OGLES/SDKPackage/Utilities/PVRGeoPOD/Maya/LinuxPC/PVRGeoPOD_v8.so
./OGLES/SDKPackage/Utilities/PVRGeoPOD/Maya/LinuxPC/PVRGeoPOD_v2008.so
./OGLES/SDKPackage/Utilities/PVRGeoPOD/Maya/LinuxPC/PVRGeoPOD_v8.5.so
./OGLES2/SDKPackage/Utilities/PVRVFrame/OGLES-2.0/Linux/libEGL.so
./OGLES2/SDKPackage/Utilities/PVRVFrame/OGLES-2.0/Linux/libGLESv2.so
./OGLES2/SDKPackage/Utilities/PVRVFrame/OGLES-1.1/Linux/libGLES_CM.so
./OGLES2/SDKPackage/Utilities/PVRVFrame/OGLES-1.1/Linux/libGLES_CL.so
./OGLES2/SDKPackage/Utilities/PVRVFrame/OGLES-1.1/Linux/libEGL.so
./OGLES2/SDKPackage/Utilities/PVRGeoPOD/Maya/LinuxPC/PVRGeoPOD_v7.so
./OGLES2/SDKPackage/Utilities/PVRGeoPOD/Maya/LinuxPC/PVRGeoPOD_v8.so
./OGLES2/SDKPackage/Utilities/PVRGeoPOD/Maya/LinuxPC/PVRGeoPOD_v2008.so
./OGLES2/SDKPackage/Utilities/PVRGeoPOD/Maya/LinuxPC/PVRGeoPOD_v8.5.so
zooliet@beagleboard:/workspace/devel/SGX$ 

I also tried after copying all the .so files in ‘/usr/local/panda3d/lib’ directory to ‘/usr/lib’ and tried to get the same result.

I’m pretty sure that I am very close to the end. Do you have any idea what I should try next?

:display(warning): Unable to load: No error.
:display(warning): Unable to load: No error.
:display(warning): Unable to load: No error.

That means it failed to load any of the three provided display modules. I think this means that it just failed to find them.

You may just need to set the plugin-path. Add this to a configuration file:

plugin-path /usr/local/panda/lib

rdb,

Thank you for your guide. I can run pview and move the triangle now. I love you man. :slight_smile:

BTW, I still have problem with running python environment.

When I go to the ‘Roaming-Ralph’ directory in the samples and run ‘python Tut-Roaming-Ralph.py’, I got the window pops up and disappear immediately with the following error message.

zooliet@beagleboard:/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100513/samples/Roaming-Ralph$ python ./Tut-Roaming-Ralph.py 
DirectStart: Starting the game.
:display(warning): Unable to load: libGLES_CM.so: cannot open shared object file: No such file or directory
:display(warning): Unable to load: libGLESv2.so: cannot open shared object file: No such file or directory
Known pipe types:
  TinyXGraphicsPipe
  TinyOffscreenGraphicsPipe
(all display modules loaded.)
:loader(error): Cannot load models/world without filename extension.  Loading of model filenames with an implicit extension is deprecated in Panda3D.  Please correct the filename reference.  If necessary, you may put the line "default-model-extension .bam" or "default-model-extension .egg" in your Config.prc to globally assume a particular model filename extension.
Traceback (most recent call last):
  File "./Tut-Roaming-Ralph.py", line 259, in <module>
    w = World()
  File "./Tut-Roaming-Ralph.py", line 63, in __init__
    self.environ = loader.loadModel("models/world")      
  File "/usr/local/panda3d/lib/direct/showbase/Loader.py", line 169, in loadModel
    raise IOError, message
IOError: Could not load model file(s): ['models/world']

I can find two problems here,

  1. The ‘plugin-path’ I configured in the Config.prc file did not work for this python execution environment. I still can see that the program cannot find right shared library files which are actually in the location. (/usr/local/panda3d/lib)

  2. It is complaining about the file format. The message recommened me to put a line in the Config.prc file as “default-model-extension .bam” or “default-model-extension .egg”. So, I added ‘default-model-extension .egg’ in the Config.prc file and get the following error message at my next execution.

zooliet@beagleboard:/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100513/samples/Roaming-Ralph$ python ./Tut-Roaming-Ralph.py 
DirectStart: Starting the game.
:display(warning): Unable to load: libGLES_CM.so: cannot open shared object file: No such file or directory
:display(warning): Unable to load: libGLESv2.so: cannot open shared object file: No such file or directory
Known pipe types:
  TinyXGraphicsPipe
  TinyOffscreenGraphicsPipe
(all display modules loaded.)
:loader(error): Extension of file models/world.egg is unrecognized; cannot load.
Currently known scene file types are:
  Bam                             .bam
Traceback (most recent call last):
  File "./Tut-Roaming-Ralph.py", line 259, in <module>
    w = World()
  File "./Tut-Roaming-Ralph.py", line 63, in __init__
    self.environ = loader.loadModel("models/world")      
  File "/usr/local/panda3d/lib/direct/showbase/Loader.py", line 169, in loadModel
    raise IOError, message
IOError: Could not load model file(s): ['models/world']

What do you think about the two problems?

Heh heh. Glad to be of help. :wink:

  1. The plugin-path did work, you’re simply hitting the next problem. Which is, you should put the path to libGLES_CM.so in /etc/ld.so.conf.d/somefile and run “sudo ldconfig”. Alternatively, put it in LD_LIBRARY_PATH or manually move that file to /usr/local/lib or so.

What now happens is that you’re using the software renderer. That is probably what you’re seeing in pview as well, actually - because it fails to load both pandagles and pandagles2, it falls back to tinydisplay.

  1. Add these two to Config.prc (assuming you built the libpandaegg egg loader):
load-file-type egg pandaegg
default-model-extension .egg
model-path $MAIN_DIR

I’m kind of surprised why you it is missing the load-file-type line, though. It is supposed to be in the 20_panda.prc which should be generated by ppremake.

rdb,

At last, I can make Ralph roaming around on the green field!
Thank you so much!!!

The library issue was a bit silly.
I thought the libraries I linked were native ARM binaries. But they were not.

zooliet@beagleboard:/workspace/devel/SGX/OGLES/SDKPackage/Utilities/PVRVFrame/OGLES-1.1/Linux$ readelf -h libGLES_CM.so 
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x6fbb0
  Start of program headers:          52 (bytes into file)
  Start of section headers:          1764592 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         5
  Size of section headers:           40 (bytes)
  Number of section headers:         29
  Section header string table index: 26

I guess those libraries are for cross building in PC environment.

In 'OMAP35x_Graphics_SDK_setuplinux_3_01_00_02, there are four directories containing libraries as ‘gfx_dbg_ex2.x’, ‘gfx_dbg_ex3.x’, ‘gfx_rel_ex2.x’ and ‘gfx_rel_ex3.x’.
So, I tried to find right libraries and used libraries in ‘gfx_rel_es2.x’ directory.

zooliet@beagleboard:/workspace/devel/SGX/tmp/gfx_rel_es2.x$ readelf -h libGLES_CM.so 
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              DYN (Shared object file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x4800
  Start of program headers:          52 (bytes into file)
  Start of section headers:          2743356 (bytes into file)
  Flags:                             0x5000002, has entry point, Version5 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         5
  Size of section headers:           40 (bytes)
  Number of section headers:         39
  Section header string table index: 36

I need to figure out which libraries are for what purpose exactly in those directories.

Regarding the configurations in prc files, you were right. I found that my 20_panda.prc file was corrupted for some reason. So, I deleted the ‘etc’ directory and installed files again. The re-installed prc file has all the setting properly. It seems that the SD card based filesystem of beagleboard is not much stable. :frowning:

I have one more question, BTW.
When I finish the python program, I get the following message.

zooliet@beagleboard:/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100513/samples/Roaming-Ralph$ python ./Tut-Roaming-Ralph.py 
DirectStart: Starting the game.
Known pipe types:
  eglGraphicsPipe
(2 aux display modules not yet loaded.)
:display(warning): FrameBufferProperties available less than requested.

What does the last line mean and what shall I do to fix it?

Anyway, thank you so much, again.

I gotta talk to somebody in the beagleboard mailing list to organize and properly document my experiences soon so that other people interested in running panda3d on beagleboard would save some time. :slight_smile:

I’ve just only the libraries in the gfx_rel_es*.x directories, they work fine for me.

rdb@rdblaptop:~/OMAP35x_Graphics_SDK_3_01_00_06
$ file ./gfx_rel_es5.x/libGLES_CM.so
./gfx_rel_es5.x/libGLES_CM.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped

$ readelf -h ./gfx_rel_es5.x/libGLES_CM.so | grep Machine
  Machine:                           ARM

Oh, and as soon as launchpad opens up armel support in PPAs to the public, this all will be a lot easier.

As for the warning, it means you requested a framebuffer configuration that the GPU does not support, and it has to fall back to a different configuration. Can you try to figure out which settings exactly make it fail?

I’ve personally found that I had to set “framebuffer-alpha #f” because alpha framebuffers were rejected by the SGX.

Hello,

I also tried to compile panda for a embedded device. It is the tao3530. The board is very similar to the beagleboard. I used the toolchain from openembedded and “borrowed” the config from the beagleboad. That worked fine. The OpenGL ES driver is working. I tested it with the provided samples from TI. They look good :slight_smile:.

Cross compiling panda3d took a bit of time. But thanks to the posts here I could manage to build it. Thanks to all of you! I used the latest version of panda from the cvs. The panda3d-1.7.1.tar.gz source package seemed to have no OpenGL ES support, yet.

But I have one question left. Now I have now a directory on my host with panda3d compiled for the beagle. Where should I put the files on the device?

And what is the correct location for the Config.prc on the device?

My host dir is:
/home/philipp/Projekte/panda3d-tao/built

When i simply put the built directory from the host in the home folder of the board and try to start pview I get the following error:

root@taoboard:/home/root/built# ./pview 
Known pipe types:
(all display modules loaded.)
No graphics pipe is available!
Your Config.prc file must name at least one valid panda display

I would be thankful for any help.

Here is the Config.pp I used:

#define CC /home/philipp/Projekte/blank_tao3530/tmp/sysroots/i686-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-gcc
#define CXX /home/philipp/Projekte/blank_tao3530/tmp/sysroots/i686-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-g++
#define AR /home/philipp/Projekte/blank_tao3530/tmp/sysroots/i686-linux/usr/armv7a/bin/arm-angstrom-linux-gnueabi-ar
#define C++FLAGS_GEN -ftemplate-depth-30 
#defer DEBUGFLAGS -ggdb 
#define SYSTEM_IGATE_FLAGS -D__i386__ -D__const=const -Dvolatile -Dmutable 
#defer STATIC_LIB_C $[AR] cru $[target] $[sources] 
#defer STATIC_LIB_C++ $[AR] cru $[target] $[sources] 

#define BUILT_TYPE unix 

#define INSTALL_DIR /home/philipp/Projekte/panda3d-tao/built

#define PYTHON_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include/python2.6
#define PYTHON_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib
 
#define JPEG_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define JPEG_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib
 
#define STL_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define STL_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib
 
#define PNG_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define PNG_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib
 
#define ZLIB_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define ZLIB_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib

#define HAVE_TINYDISPLAY 1 

#define HAVE_GL 
#define HAVE_GLU 
#define HAVE_GLX 

#define GLES_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define GLES_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib
#defer GLES_LIBS GLES_CM 
#define HAVE_GLES 1 

#define EGL_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define EGL_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib
#defer EGL_LIBS EGL 
#define HAVE_EGL 1 

#define X11_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define X11_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib
#define X11_LIBS X11 
#define HAVE_X11 1 

#define XRANDR_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define XRANDR_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib

#define XCURSOR_IPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include
#define XCURSOR_LPATH /home/philipp/Projekte/blank_tao3530/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/lib


#define HAVE_IOSTREAM
#define HAVE_FFMPEG
#define HAVE_SWSCALE
#define HAVE_WX
#define HAVE_OPENCV
#define HAVE_FREETYPE
#define HAVE_OPENSSL
#define REPORT_OPENSSL_ERRORS
#define HAVE_TIFF

#define HAVE_NET
#define HAVE_AUDIO
#define HAVE_NSPR
#define SIMULATE_NETWORK_DELAY
#define WANT_NATIVE_NET

#define HAVE_ODE 
#define HAVE_FCOLLADA 
#define HAVE_FMODEX 
#define HAVE_CG 
#define HAVE_FFTW 
#define HAVE_TAR 
#define HAVE_BDB 
#define HAVE_SQUISH 
#define HAVE_ARTOOLKIT 
#define HAVE_GTK

Congratulations! To install, I’d do the following steps:

(1) Copy your $INSTALL_DIR to the target system, naming it /usr/local/panda .

(2) Add /usr/local/panda/bin to the $PATH in /etc/environment .

(3) Create /etc/ld.so.conf.d/panda.conf containing:

/usr/local/panda/lib

(4) Create /usr/lib/python2.6/dist-packages/panda.pth containing:

/usr/local/panda/lib

(5) Create /usr/local/panda/etc/Config.prc containing any custom configuration of Panda3D, like:

plugin-path /usr/local/panda/lib
load-display pandagles
aux-display tinydisplay
#load-display pandagles2
model-path $MAIN_DIR

Thank you rdb!

You are awesome! How do you know so much about panda? Every time I look in the forum I see your name somewhere…

I would like to share my experiences on cross compiling panda. Is there a way to contribute to the doku? Or is there some wiki, where I can post my experiences.

I’d like to see panda on more embedded devices. I’m looking forward to my pandora. It is also very similar to the beagleboard.

Greez[/url]

That’s just because I’m the one who ported Panda to the beagle board for the first time.

You can contribute to the manual by registering here:
panda3d.org/wikiedit
When logging in, you’ll get an error message, but it logs you in anyway (you can ignore the error and proceed to the manual).

Just be sure to read these before editing!
panda3d.org/manual/index.php/Talk:Main_Page