Help on Panda3D compilation in Beagleboard

Hello,
I’m working on compiling Panda3D in beagleboard with ubuntu9.10 environment(128MB RAM, 1GB swap).

By issueing the ‘./makepanda/makepanda.py --everything’ command at the top of the source directory, the compilation started and it took about 32 hours for me to reach to the following status

[ 92%] Generating ‘pandac’ tree
Importing code library: libpandaexpress
Found extensions for class: Ramfile
[i]bla bla bla

Found extensions form class: OdeBody
[ 92%] Compressing built/models/misc/Dirlight.egg.pz
built/models/misc/Dirlight.egg.pz
getcontext failed!
Aborted
Storing dependency cache.

And the build terminated.

For your information, I installed the following packages manually with 'apt-get install' command
[i]  gcc, build-essential, bison, flex,
libavutil-dev, libswscale-dev, fftw-dev, 
libgl1-mesa-dev, libglu1-mesa-dev, libode-dev, 
libopenal-dev, libcv-dev, libtiff4-dev, 
libjpeg62-dev, pythod-dev, libxft-dev, 
libosmesa6-dev, libpng12-dev, libx11-dev,
libxxf86dga-dev, libxrandr-dev, libavcodec-dev,
libavformat-dev, libopenal-dev, libcvaux-dev[/i]

By googling the 'getcontext failed', I could find little information. :frowning:
Is there anybody having any idea what I should do?

Hi,

I don’t advise compiling Panda3D on the BeagleBoard itself. It’s a slow process and it doesn’t surprise me that you ran into weird errors. I went through the same process but eventually gave up - and you got a lot further than me.

It’s easier install a cross-compilation toolchain (I got one from CodeSourcery, I used the arm-none-linux-gnueabi one.), and compiling Panda3D on your development (Ubuntu amd64, in my case) machine.

I compiled Panda3D using the ppremake system, as makepanda currently doesn’t support building for EGL / OpenGL ES. I copied various thirdparty packages that I wanted from the beagle to my host system, and stored them in a “tparty” subdirectory in my source. (Be sure to remove /usr/lib, /lib, etc. from your library path before building.)

It will build a libpandagles and libpandagles2. The former is OpenGL ES 1, supports the fixed-function pipeline only. The latter only supports the programmable pipeline, meaning you have to use shaders for everything.
(You can specify which one to use by use of “load-display pandagles” in Config.prc.)

This is the Config.pp I used for the build, it won’t work plug’n’play in your case but it should give you some hints.

#define CC arm-none-linux-gnueabi-gcc
#define CXX arm-none-linux-gnueabi-g++
#define AR arm-none-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 INSTALL_DIR /home/pro-rsoft/Projects/panda3d-beagle/built
#define PYTHON_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include/python2.6

#define JPEG_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include/
#define JPEG_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib

#define STL_IPATH /usr/local/arm/arm-none-linux-gnueabi/include
#define STL_LPATH /usr/local/arm/arm-none-linux-gnueabi/lib

#define PNG_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include
#define PNG_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib

#define ZLIB_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include
#define ZLIB_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib

#define OPENAL_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include
#define OPENAL_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib

#define HAVE_POSIX_THREADS
#define HAVE_TINYDISPLAY 1

#define HAVE_GL
#define HAVE_GLU
#define HAVE_GLX

#define GLES_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include
#define GLES_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib
#defer GLES_LIBS GLES_CM
#define HAVE_GLES 1

#define GLES2_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include
#define GLES2_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib
#defer GLES2_LIBS GLESv2
#define HAVE_GLES2 1

#define EGL_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include
#define EGL_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib
#defer EGL_LIBS EGL
#define HAVE_EGL 1

#define X11_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include
#define X11_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib
#define X11_LIBS X11
#define HAVE_X11 1
#define HAVE_XF86DGA

#define HAVE_FFMPEG
#define HAVE_SWSCALE
#define HAVE_FREETYPE
#define HAVE_ODE
#define HAVE_FCOLLADA
#define HAVE_FMODEX
#define HAVE_CG
#define HAVE_FFTW
#define HAVE_TAR
#define HAVE_TIFF
#define HAVE_OPENSSL
#define HAVE_BDB
#define HAVE_SQUISH
#define HAVE_OPENCV
#define HAVE_ARTOOLKIT
#define HAVE_WX
#define HAVE_GTK

It’s been a while since I built for the BeagleBoard myself, so you may run into issues, but I’d be happy to guide you through those.

Alternatively, if all you want is a working Panda3D install that you don’t want to hack with or if you don’t want to go through the painful process of setting this up correctly, let me know and I can make and send you a build.

I should warn you that the process of correctly setting up a cross-compile environment is quite complicated - I’m about to dust off my own panda3d build for the beagle, if you want, I could roll out a build for you.

Hello rdb,

Thank you for your reply. Since my time is running 9 hours ahead of GMT, I wrote the post last night and found your reply in this morning. Amazing. :slight_smile:

Yes, native compiling was very slow, as you mentioned. Since I’m quite new to Panda3D program, I just decided to follow the recommendation in the README file. It said makepanda script is a easier way for a beginner. :slight_smile:

Anyway, if you can provide me the .deb file for installation, it would be much helpful for me at this moment. I’m eager to see what it looks like in my beagle board. :slight_smile:

BTW, do I have to install the TI providing opengl driver in my beagle board prior to install your build(tarball, deb, whatever…)?

Yes, you do need to install the OpenGL ES drivers:
elinux.org/BeagleBoardUbuntu#SGX … celeration

I can’t give you a .deb file, but I can give you a working set of libraries. Give me a couple of days to get my build working again.

rdb,

Thank you for your kindness. Take your time and I will be waiting for your following up posting. :slight_smile:

Sorry for the delay, but I’ll get to it soon.

What kind of system are you on? I’m compiling for Ubuntu Lucid myself (as lucid boots quite fast on the beagle) but if you run a different system let me know.
Do you have any special requirements for the build? e.g. threading, OpenCV support, or something like that.

It’s all right. I don’t want to push you at all and I do appreciate your help. :slight_smile:

  1. O/S
    My current environment for the beagleboard is karmic. I built it up according to the wiki instruction. However, I’ve heard that lucid is faster than others before, too. So, I will move to lucid as you worked.

  2. Third party support
    Since I don’t have much experience with Panda3D at this moment, I guess threading and opengl support will be sufficient. However, I would like to run the sample projects in the sample directory after the build/installation. So, if you have some recommendations for the third party functionalities to run particular samples, I will follow your guide.

Thank you. :slight_smile:

I’m still fighting to the panda3d native compiling on beagleboard. :slight_smile:

  1. Background
  • I installed ubuntu 10.04 on my beagleboard and installed the following packages additively.
    : g++, libjpeg62-dev, libtiff4-dev, libpng12-dev, libopenal-dev, libx11-dev, x11proto-xf86dga-dev, libxxf86dga-dev, libode-dev, libopenal-dev, libfreetype6-dev, libxft-dev, python-dev, automake, libtar-dev, flex, bison
  • I installed IT SGX SDK package and confirmed that their demo works fine.
  • My Config.pp are as bellow
  1. ppremake compilation
  • I compiled ppremake with ‘./configure --prefix=/usr/local/panda3d’ configuration
  1. dtool compilation
  • I compiled dtool to generate the dtool_config.h file bellow and installed it.
  1. panda compilation
  • While I compile the panda source, I got the following error
cd ./src/gles2gsg && make all
make[1]: Entering directory `/workspace/devel/panda3d/panda3d-1.7.0/panda/src/gles2gsg'
g++ -ftemplate-depth-30  -c -o Opt3-Linux/gles2gsg_config_gles2gsg.o -I. -I/workspace/devel/panda3d/panda3d-1.7.0/panda -I../cull -I../display -I../downloader -I../effects -I../event -I../express -I../glstuff -I../gobj -I../gsgbase -I../lerp -I../linmath -I../mathutil -I../nativenet -I../net -I../pandabase -I../pgraph -I../pgraphnodes -I../pipeline -I../pnmimage -I../pstatclient -I../putil -I/usr/local/panda3d/include -I/usr/include/c++/4.4.3 -I/usr/include/python2.6 -I/workspace/devel/SGX/OGLES2/SDKPackage/Builds/OGLES2/Include -I/usr/include -I/usr/include/python2.6    -ggdb -O2 -fPIC config_gles2gsg.cxx
g++ -ftemplate-depth-30  -c -o Opt3-Linux/gles2gsg_gles2gsg.o -I. -I/workspace/devel/panda3d/panda3d-1.7.0/panda -I../cull -I../display -I../downloader -I../effects -I../event -I../express -I../glstuff -I../gobj -I../gsgbase -I../lerp -I../linmath -I../mathutil -I../nativenet -I../net -I../pandabase -I../pgraph -I../pgraphnodes -I../pipeline -I../pnmimage -I../pstatclient -I../putil -I/usr/local/panda3d/include -I/usr/include/c++/4.4.3 -I/usr/include/python2.6 -I/workspace/devel/SGX/OGLES2/SDKPackage/Builds/OGLES2/Include -I/usr/include -I/usr/include/python2.6    -ggdb -O2 -fPIC gles2gsg.cxx
In file included from ../glstuff/glstuff_src.cxx:27,
                 from gles2gsg.cxx:20:
../glstuff/glShaderContext_src.cxx: In member function ‘bool GLES2ShaderContext::glsl_compile_shader(GLES2GraphicsStateGuardian*)’:
../glstuff/glShaderContext_src.cxx:971: error: ‘class GLES2GraphicsStateGuardian’ has no member named ‘_glProgramParameteri’
../glstuff/glShaderContext_src.cxx:974: error: ‘class GLES2GraphicsStateGuardian’ has no member named ‘_glProgramParameteri’
In file included from ../glstuff/glstuff_src.cxx:29,
                 from gles2gsg.cxx:20:
../glstuff/glGraphicsBuffer_src.cxx: In member function ‘bool GLES2GraphicsBuffer::check_fbo()’:
../glstuff/glGraphicsBuffer_src.cxx:190: error: ‘GL_FRAMEBUFFER_INCOMPLETE_FORMATS’ was not declared in this scope
In file included from ../glstuff/glstuff_src.cxx:30,
                 from gles2gsg.cxx:20:
../glstuff/glGraphicsStateGuardian_src.cxx: In member function ‘virtual void GLES2GraphicsStateGuardian::reset()’:
../glstuff/glGraphicsStateGuardian_src.cxx:954: error: ‘_glProgramParameteri’ was not declared in this scope
make[1]: *** [Opt3-Linux/gles2gsg_gles2gsg.o] Error 1
make[1]: Leaving directory `/workspace/devel/panda3d/panda3d-1.7.0/panda/src/gles2gsg'
make: *** [gles2gsg] Error 2

I searched the source code a little bit and found that ‘_glProgramParameteri’ shall be defined in case OPENGLES is not defined.
panda/src/glstuff/glGraphicsStateGuardian_src.h : line 628

#ifndef OPENGLES
  PFNGLPROGRAMPARAMETERIEXTPROC _glProgramParameteri;
  PFNGLDRAWARRAYSINSTANCEDPROC _glDrawArraysInstanced;
  PFNGLDRAWELEMENTSINSTANCEDPROC _glDrawElementsInstanced;
#endif  // OPENGLES

Shouldn’t I enable OPENGLES and OPENGLES2 simultaneously? Or did I configure something wrong in my Config.pp file?

My Config.pp

#define CC gcc
#define CXX g++
#define AR ar
#define C++FLAGS_GEN -ftemplate-depth-30
#defer DEBUGFLAGS -ggdb
#define SYSTEM_IGATE_FLAGS -D__ARM__ -D__const=const -Dvolatile -Dmutable
#defer STATIC_LIB_C $[AR] cru $[target] $[sources]
#defer STATIC_LIB_C++ $[AR] cru $[target] $[sources]

#define INSTALL_DIR /usr/local/panda3d
#define PYTHON_IPATH /usr/include/python2.6

#define JPEG_IPATH /usr/include/
#define JPEG_LPATH /usr/lib

#define STL_IPATH /usr/include/c++/4.4.3
#define STL_LPATH /usr/lib

#define PNG_IPATH /usr/include
#define PNG_LPATH /usr/lib

#define ZLIB_IPATH /usr/include
#define ZLIB_LPATH /usr/lib

#define OPENAL_IPATH /usr/include
#define OPENAL_LPATH /usr/lib

#define HAVE_POSIX_THREADS 1
#define HAVE_TINYDISPLAY 1

#define HAVE_GL
#define HAVE_GLU
#define HAVE_GLX

#define GLES_IPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/include
#define GLES_LPATH /home/pro-rsoft/Projects/panda3d-beagle/tparty/lib
#defer GLES_LIBS GLES_CM
#define HAVE_GLES 1

#define GLES2_IPATH /usr/include
#define GLES2_LPATH /usr/lib
#defer GLES2_LIBS GLESv2
#define HAVE_GLES2 1

#define EGL_IPATH /usr/include
#define EGL_LPATH /usr/lib
#defer EGL_LIBS EGL
#define HAVE_EGL 1

#define HAVE_X11 1
#define HAVE_XF86DGA 1

#define HAVE_OPENAL 1
#define HAVE_FFMPEG
#define HAVE_SWSCALE
#define HAVE_FREETYPE 1
#define HAVE_ODE
#define HAVE_FCOLLADA
#define HAVE_FMODEX
#define HAVE_CG
#define HAVE_FFTW
#define HAVE_TAR
#define HAVE_TIFF 1
#define HAVE_OPENSSL
#define HAVE_BDB
#define HAVE_SQUISH
#define HAVE_OPENCV
#define HAVE_ARTOOLKIT
#define HAVE_WX
#define HAVE_GTK

My dtool_config.h

/* dtool_config.h.  Generated automatically by ppremake from Sources.pp. */
/* Debug / non-debug symbols.  OPTIMIZE = 3 */
#undef _DEBUG
#undef NDEBUG
/* Define if we have Python installed.  */
#define HAVE_PYTHON /usr/include/python2.6
#undef USE_DEBUG_PYTHON
/* Define if we have Python as a framework (Mac OS X).  */
#undef PYTHON_FRAMEWORK
/* Define if we have RAD game tools, Miles Sound System installed.  */
#undef HAVE_RAD_MSS
/* Define if we have FMODex installed. */
#undef HAVE_FMODEX
/* Define if we have OpenAL installed. */
#define HAVE_OPENAL 1
/* Define if we have Ageia PhysX SDK installed. */
#undef HAVE_PHYSX
/* Define if we have Freetype 2.0 or better available. */
#define HAVE_FREETYPE 1
/* Define if we want to compile in a default font. */
#define COMPILE_IN_DEFAULT_FONT 1
/* Define if we have Maya available. */
#undef HAVE_MAYA
#undef MAYA_PRE_5_0
/* Define if we have SoftImage available. */
#undef HAVE_SOFTIMAGE
/* Define if we have FCollada available. */
#undef HAVE_FCOLLADA
/* Define if we have ARToolKit available. */
#undef HAVE_ARTOOLKIT
/* Define if we have OpenSSL installed.  */
#undef HAVE_OPENSSL
#define OPENSSL_097 1
#define REPORT_OPENSSL_ERRORS 1
/* Define if we have libjpeg installed.  */
#define HAVE_JPEG /usr/lib/libjpeg.a
/* Define if we have libpng installed.  */
#define HAVE_PNG /usr/lib/libpng.a
/* Define if we have libtiff installed.  */
#define HAVE_TIFF 1
/* Define if we want to build these other image file formats. */
#define HAVE_SGI_RGB 1
#define HAVE_TGA 1
#define HAVE_IMG 1
#define HAVE_SOFTIMAGE_PIC 1
#define HAVE_BMP 1
#define HAVE_PNM 1
/* Define if we have libtar installed.  */
#define HAVE_TAR 1
/* Define if we have libfftw installed.  */
#undef HAVE_FFTW
/* Define if we have libsquish installed.  */
#undef HAVE_SQUISH
/* Define if we have Berkeley DB installed.  */
#undef HAVE_BDB
/* Define if we have VRPN installed.  */
#undef HAVE_VRPN
/* Define if we have HELIX installed.  */
#undef HAVE_HELIX
/* Define if we have CG installed.  */
#undef HAVE_CG
/* Define if we have CGGL installed.  */
#undef HAVE_CGGL
/* Define if we have CGDX8 installed.  */
#undef HAVE_CGDX8
/* Define if we have CGDX9 installed.  */
#undef HAVE_CGDX9
/* Define if we have CGDX10 installed.  */
#undef HAVE_CGDX10
/* Define if we have zlib installed.  */
#define HAVE_ZLIB /usr/lib/libz.a
/* Define if we have OpenGL installed and want to build for GL.  */
#undef HAVE_GL
#undef HAVE_GLU
# define MIN_GL_VERSION_MAJOR 1
# define MIN_GL_VERSION_MINOR 1
/* Define if we have OpenGL ES installed and want to build for GLES. */
#define HAVE_GLES 1
/* Define if we have OpenGL ES installed and want to build for GLES2. */
#define HAVE_GLES2 1
/* Define if we have OpenCV installed and want to build for OpenCV.  */
#undef HAVE_OPENCV
/* Define if we have FFMPEG installed and want to build for FFMPEG.  */
#undef HAVE_FFMPEG
#undef HAVE_SWSCALE
/* Define if we have ODE installed and want to build for ODE.  */
#undef HAVE_ODE
/* Define if we have AWESOMIUM installed and want to build for AWESOMIUM.  */
#undef HAVE_AWESOMIUM
/* Define if we have Mesa installed and want to build mesadisplay.  */
#undef HAVE_MESA
#undef MESA_MGL
# define MIN_MESA_VERSION_MAJOR 1
# define MIN_MESA_VERSION_MINOR 1
/* Define if we have GLX installed and want to build for GLX.  */
#undef HAVE_GLX
/* Define if we have EGL installed and want to build for EGL.  */
#define HAVE_EGL 1
/* Define if we have Windows-GL installed and want to build for Wgl.  */
#undef HAVE_WGL
/* Define if we have DirectX installed and want to build for DX.  */
#undef HAVE_DX8
/* Define if we have DirectX installed and want to build for DX.  */
#undef HAVE_DX9
/* Define if we want to build tinydisplay. */
#define HAVE_TINYDISPLAY 1
/* Define if we have the SDL library. */
#undef HAVE_SDL
/* Define if we have X11. */
#define HAVE_X11 1
/* Define if we have the XFree86-DGA extension. */
#define HAVE_XF86DGA 1
/* Define if we have the XRandR extension. */
#undef HAVE_XRANDR
/* Define if we want to compile the threading code.  */
#undef HAVE_THREADS
/* Define if we want to use fast, user-space simulated threads.  */
#undef SIMPLE_THREADS
/* Define to enable deadlock detection, mutex recursion checks, etc. */
#undef DEBUG_THREADS
/* Define to implement mutexes and condition variables via a user-space spinlock. */
#undef MUTEX_SPINLOCK
/* Define to enable the PandaFileStream implementation of pfstream etc. */
#define USE_PANDAFILESTREAM 1
/* Define if we want to compile the net code.  */
#define HAVE_NET 1
/* Define if we want to compile the egg code.  */
#define HAVE_EGG 1
/* Define if we want to compile the audio code.  */
#define HAVE_AUDIO 1
/* Define if we have bison and flex available. */
#define HAVE_BISON /usr/bin/bison
/* Define if we want to use PStats.  */
#define DO_PSTATS 1
/* Define if we want to type-check downcasts.  */
#undef DO_DCAST
/* Define if we want to provide collision system recording and
   visualization tools. */
#define DO_COLLISION_RECORDING 1
/* Define if we want to enable track-memory-usage.  */
#define DO_MEMORY_USAGE 1
/* Define if we want to enable min-lag and max-lag.  */
#define SIMULATE_NETWORK_DELAY 1
/* Define if we want to allow immediate mode OpenGL rendering.  */
#define SUPPORT_IMMEDIATE_MODE 1
/* Define if we want to compile in support for pipelining.  */
#undef DO_PIPELINING
/* Define if we want to keep Notify debug messages around, or undefine
   to compile them out.  */
#define NOTIFY_DEBUG 1
/* Define if we want to export template classes from the DLL.  Only
   makes sense to MSVC++. */
#define EXPORT_TEMPLATES yes
/* Define if we are linking PANDAPHYSX in with PANDA. */
#undef LINK_IN_PHYSX
/* The compiled-in character(s) to expect to separate different
   components of a path list (e.g. $PRC_PATH). */
# define DEFAULT_PATHSEP ":"
/* Many of the prc variables are exported by
   dtool/src/prc/prc_parameters.h.pp, instead of here.  Only those prc
   variables that must be visible outside of the prc directory are
   exported here. */
/* The filename that specifies the public keys to import into
   config. */
# define PRC_PUBLIC_KEYS_FILENAME ""
/* Define if you want to save the descriptions for ConfigVariables. */
#define PRC_SAVE_DESCRIPTIONS 1
/* Define if your processor stores words with the most significant
   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
#undef WORDS_BIGENDIAN
/* Define if the C++ compiler uses namespaces.  */
#define HAVE_NAMESPACE 1
/* Define if fstream::open() accepts a third parameter for umask. */
#undef HAVE_OPEN_MASK
/* Define if some header file defines wchar_t. */
#define HAVE_WCHAR_T 1
/* Define if the <string> header file defines wstring. */
#define HAVE_WSTRING 1
/* Define if the C++ compiler supports the typename keyword.  */
#define HAVE_TYPENAME 1
/* Define if we can trust the compiler not to insert extra bytes in
   structs between base structs and derived structs. */
#undef SIMPLE_STRUCT_POINTERS
/* Define if we have Dinkumware STL installed.  */
#undef HAVE_DINKUM
/* Define if we have STL hash_map etc. available  */
#undef HAVE_STL_HASH
/* Define if we have a gettimeofday() function. */
#define HAVE_GETTIMEOFDAY 1
/* Define if gettimeofday() takes only one parameter. */
#undef GETTIMEOFDAY_ONE_PARAM
/* Define if you have the getopt function.  */
#define HAVE_GETOPT 1
/* Define if you have the getopt_long_only function.  */
#define HAVE_GETOPT_LONG_ONLY 1
/* Define if getopt appears in getopt.h.  */
#define PHAVE_GETOPT_H 1
/* Define if you have ioctl(TIOCGWINSZ) to determine terminal width. */
#define IOCTL_TERMINAL_WIDTH 1
/* Do the system headers define a "streamsize" typedef? */
#define HAVE_STREAMSIZE 1
/* Do the system headers define key ios typedefs like ios::openmode
   and ios::fmtflags? */
#define HAVE_IOS_TYPEDEFS 1
/* Define if the C++ iostream library defines ios::binary.  */
#define HAVE_IOS_BINARY 1
/* Can we safely call getenv() at static init time? */
#define STATIC_INIT_GETENV 1
/* Can we read the file /proc/self/[*] to determine our
   environment variables at static init time? */
#define HAVE_PROC_SELF_EXE 1
#define HAVE_PROC_SELF_MAPS 1
#define HAVE_PROC_SELF_ENVIRON 1
#define HAVE_PROC_SELF_CMDLINE 1
#undef HAVE_PROC_CURPROC_FILE
#undef HAVE_PROC_CURPROC_MAP
#undef HAVE_PROC_CURPROC_CMDLINE
/* Do we have a global pair of argc/argv variables that we can read at
   static init time?  Should we prototype them?  What are they called? */
#undef HAVE_GLOBAL_ARGV
#undef PROTOTYPE_GLOBAL_ARGV
#undef GLOBAL_ARGV
#undef GLOBAL_ARGC
/* Define if you have the <io.h> header file.  */
#undef PHAVE_IO_H
/* Define if you have the <iostream> header file.  */
#define PHAVE_IOSTREAM 1
/* Define if you have the <malloc.h> header file.  */
#define PHAVE_MALLOC_H 1
/* Define if you have the <sys/malloc.h> header file.  */
#undef PHAVE_SYS_MALLOC_H
/* Define if you have the <alloca.h> header file.  */
#define PHAVE_ALLOCA_H 1
/* Define if you have the <locale.h> header file.  */
#define PHAVE_LOCALE_H 1
/* Define if you have the <string.h> header file.  */
#define PHAVE_STRING_H 1
/* Define if you have the <stdlib.h> header file.  */
#define PHAVE_STDLIB_H 1
/* Define if you have the <limits.h> header file.  */
#define PHAVE_LIMITS_H 1
/* Define if you have the <minmax.h> header file.  */
#undef PHAVE_MINMAX_H
/* Define if you have the <sstream> header file.  */
#define PHAVE_SSTREAM 1
/* Define if you have the <new> header file.  */
#define PHAVE_NEW 1
/* Define if you have the <sys/types.h> header file.  */
#define PHAVE_SYS_TYPES_H 1
/* Define if you have the <sys/time.h> header file.  */
#define PHAVE_SYS_TIME_H 1
/* Define if you have the <unistd.h> header file.  */
#define PHAVE_UNISTD_H 1
/* Define if you have the <utime.h> header file.  */
#define PHAVE_UTIME_H 1
/* Define if you have the <glob.h> header file.  */
#define PHAVE_GLOB_H 1
/* Define if you have the <dirent.h> header file.  */
#define PHAVE_DIRENT_H 1
/* Define if you have the <drfftw.h> header file.  */
#undef PHAVE_DRFFTW_H
/* Do we have <sys/soundcard.h> (and presumably a Linux-style audio
   interface)? */
#define PHAVE_SYS_SOUNDCARD_H 1
/* Do we have <ucontext.h> (and therefore makecontext() /
   swapcontext())? */
#define PHAVE_UCONTEXT_H 1
/* Do we have <linux/input.h> ? This enables us to use raw mouse input. */
#define PHAVE_LINUX_INPUT_H 1
/* Do we have RTTI (and <typeinfo>)? */
#define HAVE_RTTI 1
/* Do we have Posix threads? */
#define HAVE_POSIX_THREADS 1
/* Is the code being compiled with the Tau profiler's instrumentor? */
#undef USE_TAU
/* Define if needed to have 64-bit file i/o */
#define __USE_LARGEFILE64 1
/* Which memory allocation scheme should we use? */
#undef USE_MEMORY_DLMALLOC
#undef USE_MEMORY_PTMALLOC2
#define USE_MEMORY_MALLOC 1
#undef USE_MEMORY_NOWRAPPERS
#define USE_DELETED_CHAIN 1
#define WANT_NATIVE_NET 1
/* Turn off warnings for using scanf and such */
/* Can we define a modern-style STL allocator? */
#define USE_STL_ALLOCATOR 1
/* Static linkage instead of the normal dynamic linkage? */
#undef LINK_ALL_STATIC
/* Define to compile the plugin code. */
#undef HAVE_P3D_PLUGIN
/* Platform-identifying defines. */
#undef IS_OSX
#define IS_LINUX 1
#undef IS_FREEBSD
#undef BUILD_IPHONE
#undef UNIVERSAL_BINARIES

Yeah, sorry that I didn’t manage to get my cross-compilation to work yet - even though I got pretty far. I actually just happened to be trying to compile it this morning, but I ran into glibc incompatibility issues with Ubuntu Lucid’s libpng.
I may set up an automated qemu script soon - but hey, if you can get it working before I do, more power to you. :slight_smile:

Did you get the latest CVS version of Panda3D? I think I checked in fixes for the issues you’ve mentioned already.

For the record, OPENGLES is defined in the case of both OpenGL ES 1.x and 2.x. There are individual OPENGLES_1 and OPENGLES_2 macros for those.

rdb,

It’s all right. I appreciate your comments a lot, already. I just hope both your and my work helps somebody interested. :slight_smile:

I assumed that panda would support OPENGLES and OPENGLES2 simultaneously. That’s why I got curious on the compile error and the header file condition.

So, do you think the error might resolved if I compile the latest CVS version of Panda3D?
I would do it tonight, then.

It doesn’t support both at the same time - it compiles the same module twice, once with OPENGLES_1 and once with OPENGLES_2 defined.

Yeah - I had these exact same problems when I tried building Panda3D on the beagle board, and then checked fixes to them. So these should be resolved if you make a CVS checkout of the Panda3D sources.

rdb,

I checked out the latest CVS of panda3d the day before yesterday and compiled.
This time, the previous error did not showed up but I got similar one as follow.

make[1]: Entering directory `/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100511/panda/src/gles2gsg'
g++ -ftemplate-depth-30  -c -o Opt3-Linux/gles2gsg_gles2gsg.o -I. -I/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100511/panda -I../cull -I../display -I../downloader -I../effects -I../event -I../express -I../glstuff -I../gobj -I../gsgbase -I../lerp -I../linmath -I../mathutil -I../nativenet -I../net -I../pandabase -I../pgraph -I../pgraphnodes -I../pipeline -I../pnmimage -I../pstatclient -I../putil -I/usr/local/panda3d/include -I/usr/include/c++/4.4.3 -I/usr/include/python2.6 -I/workspace/devel/SGX/OGLES2/SDKPackage/Builds/OGLES2/Include -I/usr/include -I/usr/include/python2.6    -ggdb -O2 -fPIC gles2gsg.cxx
In file included from ../glstuff/glstuff_src.cxx:30,
                 from gles2gsg.cxx:20:
../glstuff/glGraphicsStateGuardian_src.cxx: In member function ‘bool GLES2GraphicsStateGuardian::upload_texture_image(GLES2TextureContext*, bool, int, GLenum, GLenum, GLint, GLint, GLenum, bool, int, Texture::CompressionMode)’:
../glstuff/glGraphicsStateGuardian_src.cxx:8855: error: ‘GL_TEXTURE_2D_ARRAY_EXT’ was not declared in this scope
make[1]: *** [Opt3-Linux/gles2gsg_gles2gsg.o] Error 1
make[1]: Leaving directory `/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100511/panda/src/gles2gsg'
make: *** [gles2gsg] Error 2

I tracked down the code a little bit, but could not catch up in the middle of many 'ifdef’s and 'ifndef’s. :frowning:
What should I do next?

Yeah, the ifdefs around that part are a bit confusing. I just checked in a fix - if you call ‘cvs up’ on glGraphicsStateGuardian_src.cxx, it should work fine.

rdb,

I jumped on the gles stuff huddle thanks to your help. :slight_smile: I appreciate it.

However, here’s another one I don’t have a clue. :frowning:

make[1]: Leaving directory `/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100513/panda/src/glesgsg'
cd ./src/egldisplay && make all
make[1]: Entering directory `/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100513/panda/src/egldisplay'
g++ -shared  -o Opt3-Linux/libegldisplay.so Opt3-Linux/egldisplay_config_egldisplay.o Opt3-Linux/egldisplay_eglGraphicsBuffer.o Opt3-Linux/egldisplay_eglGraphicsPipe.o Opt3-Linux/egldisplay_eglGraphicsPixmap.o Opt3-Linux/egldisplay_eglGraphicsWindow.o Opt3-Linux/egldisplay_eglGraphicsStateGuardian.o -L../cull/Opt3-Linux -L../display/Opt3-Linux -L../downloader/Opt3-Linux -L../effects/Opt3-Linux -L../event/Opt3-Linux -L../express/Opt3-Linux -L../glesgsg/Opt3-Linux -L../glstuff/Opt3-Linux -L../gobj/Opt3-Linux -L../gsgbase/Opt3-Linux -L../lerp/Opt3-Linux -L../linmath/Opt3-Linux -L../mathutil/Opt3-Linux -L../nativenet/Opt3-Linux -L../net/Opt3-Linux -L../pandabase/Opt3-Linux -L../pgraph/Opt3-Linux -L../pgraphnodes/Opt3-Linux -L../pipeline/Opt3-Linux -L../pnmimage/Opt3-Linux -L../pstatclient/Opt3-Linux -L../putil/Opt3-Linux -L../x11display/Opt3-Linux -L/usr/local/panda3d/lib -L/usr/local/panda3d/lib -L/usr/lib -L/usr/lib -L/usr/lib -L/usr/lib -L/usr/lib -lglesgsg -lx11display -lglstuff -lgsgbase -lgobj -ldisplay -lputil -llinmath -lmathutil -lpnmimage -lpgraph -lpgraphnodes -lcull -lpstatclient -llerp -levent -ldownloader -lexpress -lpandabase -lpipeline -lnet -lnativenet -leffects -linterrogatedb -ldconfig -ldtoolutil -ldtoolbase -lGLES_CM -lEGL -lX11 -lXxf86dga -lz -ltar
/usr/bin/ld: cannot find -lx11display
collect2: ld returned 1 exit status
make[1]: *** [Opt3-Linux/libegldisplay.so] Error 1
make[1]: Leaving directory `/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100513/panda/src/egldisplay'
make: *** [egldisplay] Error 2

I know I have libx11-dev package installed.

zooliet@beagleboard:/usr/lib$ sudo apt-get install libx11-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libx11-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I have two questions at this stage.

  1. Can you tell me what package am I missing?
  2. In case I have to change anything in the Config.pp file, do I have to build up ‘ppremake -> dtool -> panda’ process sequence from the beginning or I just start from dtool and panda build up (‘ppremake; make; make install’ at ‘panda3d/dtool’ directory and ‘ppremake; make; make install’ at ‘panda3d/panda’)?

Either ppremake is messed up and it is building the egldisplay tree before the x11display tree, or you have HAVE_EGL defined but not HAVE_X11, so the x11display tree is not compiled in the first place.

Can you verify that HAVE_X11 is correctly set, and that the ppremake call in dtool detects it?
Also, can you cd into panda/src/x11display and type “ppremake && make clean && make” it, and see if it builds anything? If so, the egldisplay compilation should be able to detect libx11display.

rdb,

Yes, I defined both HAVE_EGL and HAVE_X11. (You can see my Config.pp file in my previous post.) And, I could build the panda/src/x11display directory locally as you instructed. After building up the library, I went back to panda directory and could successfully finish the compilation. Thank you. :slight_smile:

Maybe, there must be some disorder in compilation sequence in ppremake…

I could compile even ‘direct’. However, I got the following error at the ‘pandatool’ compilation.

cd ./src/converter && make all
make[1]: Entering directory `/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100513/pandatool/src/converter'
g++ -shared  -o Opt3-Linux/libconverter.so Opt3-Linux/converter_somethingToEggConverter.o  -L../pandatoolbase/Opt3-Linux -L/usr/local/panda3d/lib -L/usr/local/panda3d/lib -L/usr/local/panda3d/lib -L/usr/lib -lpandatoolbase -legg -lpipeline -levent -lmathutil -llinmath -lputil -lexpress -lpandabase -linterrogatedb -lprc -ldconfig -ldtoolutil -ldtoolbase -lm
/usr/local/panda3d/lib/libegg.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[1]: *** [Opt3-Linux/libconverter.so] Error 1
make[1]: Leaving directory `/workspace/devel/panda3d/panda3d-1.7.0_CVS_20100513/pandatool/src/converter'
make: *** [converter] Error 2

Do you have any idea on this?
Also, is it O.K. with me to run the samples without this file conversion tool? Since I don’t have a proper LCD monitor at this moment, I could not confirm it for myself. :slight_smile: It would take several days to visit my friend’s lab to check it out.

You could easily compile Panda3D without pandatool, no problem. Pandatool is just a collection of model conversion and processing tools, you could just do model conversion on a different machine.

The libegg.so error is a bit disturbing, though. It would seem that it was compiled for a different architecture. Is this on the beagle board, or on your development machine? If the latter, are you sure you’re using a cross-compiling linker?

Oh, and FYI, before I got my HDMI monitor I just used an ordinary TV screen with an s-video to SCART cable. Worked just fine for testing.

rdb,

I just couldn’t wait until weekend and visited my friend’s lab in the evening. :slight_smile:

  1. Compilation environment
    I do the compilation in the beagleboard. So, it is completely native.

  2. Another error while adding ‘panda3d/lib’ to library path
    When I add the lib directory of panda3d using ldconfig, I got the following error.

zooliet@beagleboard:/etc/ld.so.conf.d$ sudo ldconfig
/sbin/ldconfig.real: /usr/local/panda3d/lib/libegg.so is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/local/panda3d/lib/libpnmimagetypes.so is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/local/panda3d/lib/libdistort.so is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/local/panda3d/lib/libeffects.so is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/local/panda3d/lib/libpanda.so is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/local/panda3d/lib/libp3openal_audio.so is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/local/panda3d/lib/librecorder.so is not an ELF file - it has the wrong magic bytes at the start.

/sbin/ldconfig.real: /usr/local/panda3d/lib/libcftalk.so is not an ELF file - it has the wrong magic bytes at the start.

Considering the two symptoms above and the compile error message during the pandatool compilation, I am a bit suspicious if there is;

  1. Any hardcoded parts in the files above that specifing the file format as X86 based one
  2. Any compilation options that do similar.

Of course, when I run ‘pview’, it won’t run and complains that it cannot find ‘libpnmimagetypes.so’ file.

Do you have any idea?

Hm, that’s really curious. I wonder if either one of those libraries is linked incorrectly, or if ldconfig is just expecting the wrong kind of libraries.