ppremake compiles libraries into " / " directory

Hello everyone!
I just got a new Linux box, and I decided to try Fedora 18. As there is no Panda3d precompiled for that platform,
I’ve been trying to compile it from the source downloaded from this web page. I’m compiling version 1.8.0

I’ve made my Config.pp file, compiled ppremake. Now i issue the “make” command in the dtool folder and i get the following output:

[adria@stoneAngel dtool]$ make
cd ./src/dtoolbase && make all
make[1]: Entering directory `/home/adria/Downloads/panda3d-1.8.0/dtool/src/dtoolbase'
cc   -c -o /p3dtoolbase_lookup3 -I. -I/home/adria/Downloads/panda3d-1.8.0/dtool -I/usr/include/python2.7    -g -O2 -fPIC lookup3.c
Assembler messages:
Fatal error: can't create /p3dtoolbase_lookup3: Permission denied
make[1]: *** [/p3dtoolbase_lookup3] Error 1
make[1]: Leaving directory `/home/adria/Downloads/panda3d-1.8.0/dtool/src/dtoolbase'
make: *** [dtoolbase] Error 2

It seems to me like cmake is trying to save the library “p3dtoolbase_lookup3” in the Linux root directory ( / ), which isn’t what i want.

I tried compiling with root permissions (Sorry that was dumb) and the libraries could be compiled, but after a few steps the linker couldn’t find them, even when i added " / " to LD_LIBRARY_PATH:

[adria@stoneAngel dtool]$ sudo make
[sudo] password for adria: 
cd ./src/dtoolbase && make all
make[1]: Entering directory `/home/adria/Downloads/panda3d-1.8.0/dtool/src/dtoolbase'
cc   -c -o /p3dtoolbase_lookup3 -I. -I/home/adria/Downloads/panda3d-1.8.0/dtool -I/usr/include/python2.7    -g -O2 -fPIC lookup3.c
cc   -c -o /p3dtoolbase_indent -I. -I/home/adria/Downloads/panda3d-1.8.0/dtool -I/usr/include/python2.7    -g -O2 -fPIC indent.cxx
cc   -c -o /p3dtoolbase_p3dtoolbase_composite1 -I. -I/home/adria/Downloads/panda3d-1.8.0/dtool -I/usr/include/python2.7    -g -O2 -fPIC p3dtoolbase_composite1.cxx
In file included from memoryHook.cxx:55:0,
                 from p3dtoolbase_composite1.cxx:9:
dlmalloc.h:151:0: warning: "M_TRIM_THRESHOLD" redefined [enabled by default]
In file included from dtoolbase.h:138:0,
                 from addHash.h:18,
                 from addHash.cxx:15,
                 from p3dtoolbase_composite1.cxx:1:
/usr/include/malloc.h:133:0: note: this is the location of the previous definition
In file included from memoryHook.cxx:55:0,
                 from p3dtoolbase_composite1.cxx:9:
dlmalloc.h:153:0: warning: "M_MMAP_THRESHOLD" redefined [enabled by default]
In file included from dtoolbase.h:138:0,
                 from addHash.h:18,
                 from addHash.cxx:15,
                 from p3dtoolbase_composite1.cxx:1:
/usr/include/malloc.h:135:0: note: this is the location of the previous definition
In file included from memoryHook.cxx:56:0,
                 from p3dtoolbase_composite1.cxx:9:
dlmalloc_src.cxx:1183:0: warning: "assert" redefined [enabled by default]
In file included from deletedBufferChain.h:24:0,
                 from deletedBufferChain.cxx:15,
                 from p3dtoolbase_composite1.cxx:6:
/usr/include/assert.h:86:0: note: this is the location of the previous definition
cc   -c -o /p3dtoolbase_p3dtoolbase_composite2 -I. -I/home/adria/Downloads/panda3d-1.8.0/dtool -I/usr/include/python2.7    -g -O2 -fPIC p3dtoolbase_composite2.cxx
cc -shared  -o /libp3dtoolbase.so /p3dtoolbase_lookup3 /p3dtoolbase_indent /p3dtoolbase_p3dtoolbase_composite1 /p3dtoolbase_p3dtoolbase_composite2 -L/usr/local/panda/lib -L/usr/lib64 -lpython2.7
make[1]: Leaving directory `/home/adria/Downloads/panda3d-1.8.0/dtool/src/dtoolbase'
cd ./src/dtoolutil && make all
make[1]: Entering directory `/home/adria/Downloads/panda3d-1.8.0/dtool/src/dtoolutil'
cc   -c -o /p3dtoolutil_p3dtoolutil_composite1 -I. -I/home/adria/Downloads/panda3d-1.8.0/dtool -I../dtoolbase -I/usr/include/python2.7    -g -O2 -fPIC p3dtoolutil_composite1.cxx
cc   -c -o /p3dtoolutil_p3dtoolutil_composite2 -I. -I/home/adria/Downloads/panda3d-1.8.0/dtool -I../dtoolbase -I/usr/include/python2.7    -g -O2 -fPIC p3dtoolutil_composite2.cxx
cc -shared  -o /libp3dtoolutil.so /p3dtoolutil_p3dtoolutil_composite1 /p3dtoolutil_p3dtoolutil_composite2 -L../dtoolbase/ -L/usr/local/panda/lib -L/usr/lib64 -lp3dtoolbase -lpython2.7 -ldl
/bin/ld: cannot find -lp3dtoolbase
collect2: error: ld returned 1 exit status
make[1]: *** [/libp3dtoolutil.so] Error 1
make[1]: Leaving directory `/home/adria/Downloads/panda3d-1.8.0/dtool/src/dtoolutil'
make: *** [dtoolutil] Error 2

So my question is: how can i get rid of the slash before the name of the library so it compiles and finds libraries correctly? Thanks in advance :slight_smile:

This is not supposed to happen, and it either indicates a bug in ppremake or a typo in Config.pp. Or, you accidentally compiled ppremake with a prefix of / instead of /usr/local. Can you show me your custom Config.pp file?

By the way, if you want an easier time building Panda from source, I would suggest you try makepanda instead of ppremake. It’s easier to use, and can generate an .rpm file for you.

Wow, thanks for the fast reply.

I have already tried makepanda, but i’ve been having issues too and i decided to try ppremake. The other issues looked more difficult to me, but i guess having an rpm is a huge advantage. Makepanda complained about “not finding the ‘direct’ tree”, the error was located in jGenCode.py.
I’ll be happy to be able to compile panda from either of the two sources

I’ve compiled ppremake again, adding the option --prefix="/usr/local/panda" to ./configure. It said the config.h file hadn’t changed, so i guess it’s not that.

Anyways, here is my Config.pp. I modified the existing Config.Linux.pp file.

//
// Config.Linux.pp
//
// This file defines some custom config variables for the Linux
// platform.  It makes some initial guesses about compiler features,
// etc.
//

// *******************************************************************
// NOTE: you should not attempt to copy this file verbatim as your own
// personal Config.pp file.  Instead, you should start with an empty
// Config.pp file, and add lines to it when you wish to override
// settings given in here.  In the normal ppremake system, this file
// will always be read first, and then your personal Config.pp file
// will be read later, which gives you a chance to override the
// default settings found in this file.  However, if you start by
// copying the entire file, it will be difficult to tell which
// settings you have customized, and it will be difficult to upgrade
// to a subsequent version of Panda.
// *******************************************************************

#define IS_LINUX 1

// Compiler flags

// How to invoke the C and C++ compilers.
#if $[eq $[USE_COMPILER], GCC]
  #define CC gcc
  #define CXX g++
  #define AR ar

  // gcc might run into template limits on some parts of Panda.
  // I upped this from 25 to build on OS X (GCC 3.3) -- skyler.
  #define C++FLAGS_GEN -ftemplate-depth-30
#else
  #define CC cc
// HE CANVIAT AIXO
  #define CXX cc
  #define AR ar
#endif

// Linux doesn't (yet) have any funny architecture flags.
#defer ARCH_FLAGS 

// How to compile a C or C++ file into a .o file.  $[target] is the
// name of the .o file, $[source] is the name of the source file,
// $[ipath] is a space-separated list of directories to search for
// include files, and $[flags] is a list of additional flags to pass
// to the compiler.
#defer COMPILE_C $[CC] $[CFLAGS_GEN] $[ARCH_FLAGS] -c -o $[target] $[ipath:%=-I%] $[flags] $[source]
#defer COMPILE_C++ $[CXX] $[C++FLAGS_GEN] $[ARCH_FLAGS] -c -o $[target] $[ipath:%=-I%] $[flags] $[source]

// What flags should be passed to both C and C++ compilers to enable
// debug symbols?  This will be supplied when OPTIMIZE (above) is set
// to 1, 2, or 3.
#defer DEBUGFLAGS -g

// What flags should be passed to both C and C++ compilers to enable
// compiler optimizations?  This will be supplied when OPTIMIZE
// (above) is set to 2, 3, or 4.
#defer OPTFLAGS -O2

// By convention, any source file that contains the string _no_opt_ in
// its filename won't have the above compiler optimizations run for it.
#defer no_opt $[findstring _no_opt_,$[source]]

// What define variables should be passed to the compilers for each
// value of OPTIMIZE?  We separate this so we can pass these same
// options to interrogate, guaranteeing that the correct interfaces
// are generated.  Do not include -D here; that will be supplied
// automatically.
#defer CDEFINES_OPT1 $[EXTRA_CDEFS]
#defer CDEFINES_OPT2 $[EXTRA_CDEFS]
#defer CDEFINES_OPT3 $[EXTRA_CDEFS]
#defer CDEFINES_OPT4 $[EXTRA_CDEFS]

// What additional flags should be passed for each value of OPTIMIZE
// (above)?  We separate out the compiler-optimization flags, above,
// so we can compile certain files that give optimizers trouble (like
// the output of lex and yacc) without them, but with all the other
// relevant flags.
#defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] -Wall $[DEBUGFLAGS]
#defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] -Wall $[DEBUGFLAGS] $[if $[no_opt],,$[OPTFLAGS]]
#defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] $[DEBUGFLAGS] $[if $[no_opt],,$[OPTFLAGS]]
#defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%] $[if $[no_opt],,$[OPTFLAGS]]

// What additional flags should be passed to both compilers when
// building shared (relocatable) sources?  Some architectures require
// special support for this.
#defer CFLAGS_SHARED -fPIC

// How to generate a C or C++ executable from a collection of .o
// files.  $[target] is the name of the binary to generate, and
// $[sources] is the list of .o files.  $[libs] is a space-separated
// list of dependent libraries, and $[lpath] is a space-separated list
// of directories in which those libraries can be found.
#defer LINK_BIN_C $[cc_ld] $[ARCH_FLAGS] -o $[target] $[sources] $[flags] $[lpath:%=-L%] $[libs:%=-l%]\
 $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[bin_frameworks]]
#defer LINK_BIN_C++ $[cxx_ld] $[ARCH_FLAGS] \
 -o $[target] $[sources]\
 $[flags]\
 $[lpath:%=-L%] $[libs:%=-l%]\
 $[fpath:%=-Wl,-F%] $[patsubst %,-framework %, $[bin_frameworks]]

// How to generate a static C or C++ library.  $[target] is the
// name of the library to generate, and $[sources] is the list of .o
// files that will go into the library.
#defer STATIC_LIB_C $[AR] cru $[target] $[sources]
#defer STATIC_LIB_C++ $[AR] cru $[target] $[sources]

// How to run ranlib, if necessary, after generating a static library.
// $[target] is the name of the library.  Set this to the empty string
// if ranlib is not necessary on your platform.
#defer RANLIB ranlib $[target]

// Where to put the so_locations file, used by an Irix MIPSPro
// compiler, to generate a map of shared library memory locations.
#defer SO_LOCATIONS $[DTOOL_INSTALL]/etc/so_locations


// How to generate a shared C or C++ library.  $[source] and $[target]
// as above, and $[libs] is a space-separated list of dependent
// libraries, and $[lpath] is a space-separated list of directories in
// which those libraries can be found.
#defer SHARED_LIB_C $[cc_ld] -shared $[LFLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
#defer SHARED_LIB_C++ $[cxx_ld] -shared $[LFLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
#define BUNDLE_LIB_C++

// How to install a data file or executable file.  $[local] is the
// local name of the file to install, and $[dest] is the name of the
// directory to put it in.

// On Unix systems, we strongly prefer using the install program to
// install files.  This has nice features like automatically setting
// the permissions bits, and also is usually clever enough to install
// a running program without crashing the running instance.  However,
// it doesn't understanding installing a program from a subdirectory,
// so we have to cd into the source directory first.
#defer install_dash_p $[if $[KEEP_TIMESTAMPS],-p,]
#defer INSTALL $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_DATA] $[install_dash_p] $[notdir $[local]] $[dest]/
#defer INSTALL_PROG $[if $[ne $[dir $[local]], ./],cd ./$[dir $[local]] &&] install -m $[INSTALL_UMASK_PROG] $[install_dash_p] $[notdir $[local]] $[dest]/

// Variable definitions for building with the Irix MIPSPro compiler.
#if $[eq $[USE_COMPILER], MIPS]
  #define CC cc -n32 -mips3
  #define CXX CC -n32 -mips3

  // Turn off a few annoying warning messages.
  // 1174 - function 'blah' was declared but never used
  // 1201 - trailing comma is nonstandard.
  // 1209 - controlling expression is constant, e.g. if (0) { ... }
  // 1234 - access control not specified, 'public' by default
  // 1355 - extra ";" ignored
  // 1375 - destructor for base class is not virtual.
  //    this one actually is bad.  But we got alot of them from the classes
  //    that we've derived from STL collections.  Beware of this.
  // 3322 - omission of explicit type is nonstandard ("int" assumed)
  #define WOFF_LIST -woff 1174,1201,1209,1234,1355,1375,3322

  // Linker warnings
  // 85 - definition of SOMESYMBOL in SOMELIB preempts that of definition in
  //      SOMEOTHERLIB.
  #define WOFF_LIST $[WOFF_LIST] -Wl,-LD_MSG:off=85

  #defer OPTFLAGS -O2 -OPT:Olimit=2500

  #defer CFLAGS_OPT1 $[CDEFINES_OPT1:%=-D%] $[WOFF_LIST] -g
  #defer CFLAGS_OPT2 $[CDEFINES_OPT2:%=-D%] $[WOFF_LIST]
  #defer CFLAGS_OPT3 $[CDEFINES_OPT3:%=-D%] $[WOFF_LIST]
  #defer CFLAGS_OPT4 $[CDEFINES_OPT4:%=-D%] $[WOFF_LIST]

  #defer CFLAGS_SHARED

  #defer STATIC_LIB_C $[CC] -ar -o $[target] $[sources]
  #defer STATIC_LIB_C++ $[CXX] -ar -o $[target] $[sources]
  #defer RANLIB

  #defer SHARED_FLAGS -Wl,-none -Wl,-update_registry,$[SO_LOCATIONS]
  #defer SHARED_LIB_C $[cc_ld] -shared $[SHARED_FLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
  #defer SHARED_LIB_C++ $[cxx_ld] -shared $[SHARED_FLAGS] -o $[target] $[sources] $[lpath:%=-L%] $[libs:%=-l%]
#endif



// What additional flags should we pass to interrogate?
#if $[eq $[shell uname -m], x86_64] // if Linux is 64bit
  #define SYSTEM_IGATE_FLAGS -D_LP64 -D__const=const -Dvolatile -Dmutable
#else
  #define SYSTEM_IGATE_FLAGS -D__i386__ -D__const=const -Dvolatile -Dmutable
#endif

// Is the platform big-endian (like an SGI workstation) or
// little-endian (like a PC)?  Define this to the empty string to
// indicate little-endian, or nonempty to indicate big-endian.
#define WORDS_BIGENDIAN

// Does the C++ compiler support namespaces?
#define HAVE_NAMESPACE 1

// Does the C++ compiler support ios::binary?
#define HAVE_IOS_BINARY 1

// How about the typename keyword?
#define HAVE_TYPENAME 1

// Will the compiler avoid inserting extra bytes in structs between a
// base struct and its derived structs?  It is safe to define this
// false if you don't know, but if you know that you can get away with
// this you may gain a tiny performance gain by defining this true.
// If you define this true incorrectly, you will get lots of
// assertion failures on execution.
#define SIMPLE_STRUCT_POINTERS

// Do we have a gettimeofday() function?
#define HAVE_GETTIMEOFDAY 1

// Does gettimeofday() take only one parameter?
#define GETTIMEOFDAY_ONE_PARAM

// Do we have getopt() and/or getopt_long_only() built into the
// system?
#define HAVE_GETOPT 1
#define HAVE_GETOPT_LONG_ONLY 1

// Are the above getopt() functions defined in getopt.h, or somewhere else?
#define PHAVE_GETOPT_H 1

// Can we determine the terminal width by making an ioctl(TIOCGWINSZ) call?
#define IOCTL_TERMINAL_WIDTH 1

// Do the system headers define a "streamsize" typedef?  How about the
// ios::binary enumerated value?  And other ios typedef symbols like
// ios::openmode and ios::fmtflags?
#define HAVE_STREAMSIZE 1
#define HAVE_IOS_BINARY 1
#define HAVE_IOS_TYPEDEFS 1

// Can we safely call getenv() at static init time?
#define STATIC_INIT_GETENV 1

// Can we read the files /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

// 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?
#define HAVE_GLOBAL_ARGV
#define PROTOTYPE_GLOBAL_ARGV
#define GLOBAL_ARGV
#define GLOBAL_ARGC

// Should we include <iostream> or <iostream.h>?  Define PHAVE_IOSTREAM
// to nonempty if we should use <iostream>, or empty if we should use
// <iostream.h>.
#define PHAVE_IOSTREAM 1

// Do we have a true stringstream class defined in <sstream>?
#define PHAVE_SSTREAM 1

// Does fstream::open() require a third parameter, specifying the
// umask?  Versions of gcc prior to 3.2 had this.
#define HAVE_OPEN_MASK

// Do the compiler or system libraries define wchar_t for you?
#define HAVE_WCHAR_T 1

// Does <string> define the typedef wstring?  Most do, but for some
// reason, versions of gcc before 3.0 didn't do this.
#define HAVE_WSTRING 1

// Do we have <new>?
#define PHAVE_NEW 1

// Do we have <io.h>?
#define PHAVE_IO_H

// Do we have <malloc.h>?
#define PHAVE_MALLOC_H 1

// Do we have <alloca.h>?
#define PHAVE_ALLOCA_H 1

// Do we have <locale.h>?
#define PHAVE_LOCALE_H 1

// Do we have <string.h>?
#define PHAVE_STRING_H 1

// Do we have <stdlib.h>?
#define PHAVE_STDLIB_H 1

// Do we have <limits.h>?
#define PHAVE_LIMITS_H 1

// Do we have <minmax.h>?
#define PHAVE_MINMAX_H

// Do we have <sys/types.h>?
#define PHAVE_SYS_TYPES_H 1
#define PHAVE_SYS_TIME_H 1

// Do we have <unistd.h>?
#define PHAVE_UNISTD_H 1

// Do we have <utime.h>?
#define PHAVE_UTIME_H 1

// Do we have <dirent.h>?
#define PHAVE_DIRENT_H 1

// Do we have <glob.h> (and do we want to use it instead of dirent.h)?
#define PHAVE_GLOB_H 1

// 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 <stdint.h>?
#define PHAVE_STDINT_H 1

// We need 64-bit file i/o
#define __USE_LARGEFILE64 1

// The dynamic library file extension (usually .so .dll or .dylib):
#define DYNAMIC_LIB_EXT .so
#define STATIC_LIB_EXT .a
#define BUNDLE_EXT


// Les meves
#define OPTIMIZE 3
#define PYTHON_IPATH /usr/include/python2.7/
#define PYTHON_LPATH /usr/lib64/
#define PYTHON_LIBS python2.7
#define PYTHON_FPATH
#define PYTHON_FRAMEWORK
#define HAVE_PYTHON 1

#define WANT_NATIVE_NET
#define NATIVE_NET_IPATH
#define NATIVE_NET_LPATH
#define NATIVE_NET_LIBS
#define HAVE_NET

#define HAVE_OPENSSL 1
#define OPENSSL_IPATH /usr/include/openssl/
#define OPENSSL_LPATH /usr/lib/
#define OPENSSL_LIBS ssl

#define NSPR_IPATH /usr/include/nspr4/
#define NSPR_LPATH /usr/lib/
#define NSPR_LIBS nspr4

#define HAVE_PNG 1
#define PNG_IPATH /usr/include/libpng15/
#define PNG_LPATH /usr/lib/
#define PNG_LIBS png

#define HAVE_JPEG 1
#define JPEG_IPATH /usr/include/
#define JPEG_LPATH /usr/lib
#define JPEG_LIBS jpeg

#define HAVE_TIFF 1
#define TIFF_IPATH /usr/include/
#define TIFF_LPATH /usr/lib
#define TIFF_LIBS libtiff.so.5

#define HAVE_TAR 1
#define TAR_IPATH /usr/include/
#define TAR_LPATH 
#define TAR_LIBS 

#define HAVE_FFTW
#define FFTW_IPATH
#define FFTW_LPATH
#define FFTW_LIBS

#define HAVE_SQUISH
#define SQUISH_IPATH
#define SQUISH_LPATH
#define SQUISH_LIBS


#define HAVE_BDB
#define BDB_IPATH
#define BDB_LPATH
#define BDB_LIBS

#define HAVE_CG 1
#define CG_IPATH /usr/include/Cg/
#define CG_LPATH /usr/lib64/
#define CG_LIBS libCg.so

#define HAVE_CGGL 1
#define CGGL_IPATH /usr/include/Cg/
#define CGGL_LPATH /usr/lib64/
#define CGGL_LIBS libCgGL.so

#define HAVE_CGDX8
#define CGDX8_IPATH
#define CGDX8_LPATH
#define CGDX8_LIBS

#define HAVE_DX8
#define DX8_IPATH
#define DX8_LPATH
#define DX8_LIBS

#define HAVE_CGDX9
#define CGDX9_IPATH
#define CGDX9_LPATH
#define CGDX9_LIBS

#define HAVE_DX9
#define DX9_IPATH
#define DX9_LPATH
#define DX9_LIBS

#define HAVE_CGDX10
#define CGDX10_IPATH
#define CGDX10_LPATH
#define CGDX10_LIBS

#define HAVE_DX10
#define DX10_IPATH
#define DX10_LPATH
#define DX10_LIBS

#define HAVE_VRPN
#define VRPN_IPATH
#define VRPN_LPATH
#define VRPN_LIBS

#define HAVE_HELIX
#define HELIX_IPATH
#define HELIX_LPATH
#define HELIX_LIBS

#define HAVE_ZLIB 1
#define ZLIB_IPATH /usr/include/
#define ZLIB_LPATH /usr/lib/
#define ZLIB_LIBS libz.so.1

#define HAVE_FREETYPE 1
#define FREETYPE_IPATH /usr/include/freetype2/freetype/config
#define FREETYPE_LPATH /usr/lib/
#define FREETYPE_LIBS libfreetype.so.6

#define HAVE_GL 1
#define GL_IPATH /usr/include/GL/
#define GL_LPATH /usr/lib
#define GL_LIBS libGL.so

#define HAVE_GLX 1
#define GLX_IPATH /usr/include/GL/
#define GLX_LPATH
#define GLX_LIBS 

#define HAVE_GLES2 1
#define GLES2_IPATH
#define GLES2_LPATH /usr/lib/
#define GLES2_LIBS libGLESv2.so.2

#define HAVE_GLES
#define GLES_IPATH
#define GLES_LPATH
#define GLES_LIBS

#define HAVE_EGL
#define EGL_IPATH
#define EGL_LPATH
#define EGL_LIBS

#define HAVE_WGL
#define WGL_IPATH
#define WGL_LPATH
#define WGL_LIBS

#define HAVE_MESA 1
#define MESA_IPATH
#define MESA_LPATH
#define MESA_LIBS
#define MESA_MGL

#define HAVE_OPENCV
#define OPENCV_IPATH
#define OPENCV_LPATH
#define OPENCV_LIBS

#define HAVE_FFMPEG 1
#define FFMPEG_IPATH
#define FFMPEG_LPATH
#define FFMPEG_LIBS

#define HAVE_ODE 1
#define ODE_IPATH
#define ODE_LPATH
#define ODE_LIBS

#define HAVE_AWESOMIUM
#define AWESOMIUM_IPATH
#define AWESOMIUM_LPATH
#define AWESOMIUM_LIBS
#define AWESOMIUM_FRAMEWORK

#define HAVE_NPAPI
#define NPAPI_IPATH
#define NPAPI_LPATH
#define NPAPI_LIBS

#define HAVE_THREADS 1
#define DEBUG_THREADS
#define MUTEX_SPINLOCK 1
#define DO_PSTATS 1

#define HAVE_RAD_MSS
#define RAD_MSS_IPATH
#define RAD_MSS_LPATH
#define RAD_MSS_LIBS

#define HAVE_FMODEX
#define FMODEX_IPATH
#define FMODEX_LPATH
#define FMODEX_LIBS

#define HAVE_OPENAL 1
#define OPENAL_IPATH /usr/include/
#define OPENAL_LPATH /usr/lib/
#define OPENAL_LIBS libopenal.so.1
#define OPENAL_FRAMEWORK

#define HAVE_PHYSX
#define PHYSX_IPATH
#define PHYSX_LPATH
#define PHYSX_LIBS

#define HAVE_SPEEDTREE
#define SPEEDTREE_IPATH
#define SPEEDTREE_LPATH
#define SPEEDTREE_LIBS

#define PKG_CONFIG 1
#define HAVE_GTK 1
#define FREETYPE_CONFIG
#define FREETYPE_CFLAGS
#define WX_CONFIG
#define HAVE_WX 1
#define WX_CFLAGS
#define WX_IPATH
#define WX_LPATH
#define WX_LIBS

#define FLTK_CONFIG
#define HAVE_FLTK
#define FLTK_CFLAGS
#define FLTK_IPATH
#define FLTK_LPATH
#define FLTK_LIBS

#define HAVE_MAYA
#define MAYA_LOCATION
#define HAVE_SOFTIMAGE
#define SOFTIMAGE_LOCATION


#define HAVE_FCOLLADA
#define FCOLLADA_IPATH
#define FCOLLADA_LPATH
#define FCOLLADA_LIBS

#define HAVE_COLLADA14DOM
#define COLLADA14DOM_IPATH
#define COLLADA14DOM_LPATH
#define COLLADA14DOM_LIBS

#define HAVE_COLLADA15DOM
#define COLLADA15DOM_IPATH
#define COLLADA15DOM_LPATH
#define COLLADA15DOM_LIBS

#define HAVE_ASSIMP
#define ASSIMP_IPATH
#define ASSIMP_LPATH
#define ASSIMP_LIBS

#define HAVE_ARTOOLKIT
#define ARTOOLKIT_IPATH
#define ARTOOLKIT_LPATH
#define ARTOOLKIT_LIBS

#define HAVE_ROCKET 1
#define HAVE_ROCKET_PYTHON 1
#define ROCKET_IPATH /usr/local/lib/librocket/include/
#define ROCKET_LPATH /usr/local/lib/librocket/lib/
#define ROCKET_LIBS libRocketCore.so.1.2.1

#define HAVE_SDL 1
#define HAVE_X11 1

#define HAVE_XF86DGA 1
#define XF86DGA_IPATH /usr/include/X11/extensions/
#define XF86DGA_LPATH /usr/lib64/
#define XF86DGA_LIBS libXxf86dga-1.1.3
#define HAVE_XRANDR 1


#define INTERROGATE_PYTHON_INTERFACE 1

#define EIGEN_IPATH
#define HAVE_EIGEN 
#define LINK_IN_PHYSX 1

#define SIMPLE_THREADS 1
#define OS_SIMPLE_THREADS 1
#define USE_PANDAFILESTREAM 1
#define HAVE_EGG 1
#define HAVE_AUDIO 1
#define HAVE_BISON 1
#define DO_DCAST 1
#define DO_COLLISION_RECORDING 1
#define DO_MEMORY_USAGE 1
#define USE_MEMORY_PTMALLOC2 1
#define USE_MEMORY_DLMALLOC 1

The last defines that are commented have been added from complaints from ppremake, such as “XX is not defined”. Also, some library names have to be changed (I noticed you don’t have to add the ‘lib’ prefix or the ‘.so’ suffix, but i’ll fix these when the compiler complains)

You’re not supposed to copy Config.Linux.pp into your own file. You should not mess with that file at all. Instead, you should define your own Config.pp and in there you should define any settings from dtool/Config.pp that you wish to override. Then, point PPREMAKE_CONFIG at the location of our custom Config.pp file.

In any case, the original dtool/Config.pp and dtool/Config.Linux.pp files should remain intact, and your custom Config.pp file should only contain the variables that you wish to override.

I’m not sure what kind of trouble you were having with makepanda, but I’m guessing that it had something to do with not building with --everything or that you hadn’t installed python-devel and therefore it couldn’t find Python. (Usually, makepanda will first output a list of packages that it finds missing and will therefore not build for.)

Thank you very much!

After re-unpacking the source and solving a few more issues, like a random “-i” option being appended to g++ in the panda/egg Makefile, having to disable ffmpeg or changing “push_back” for “this->push_back” in baseincomingset.i (Python style :smiley:) i was finally able to compile the dtool, the panda libraries, direct and most of pandatool.

What i haven’t been still able to compile is pstats. First it complained about not finding “gtk/gtk.h”, which was because it wasn’t in the include path, but in /usr/include/gtk-2.0/. This happened with a few more gtk-related libraries, but when I symlinked all of them so they could be found, the following error appears (this is just the final part of it, it’s very long. I can link a log file if you are interested in the whole file)

/usr/include/gtk/deprecated/gtktable.h:121:29: error: ‘widget’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:122:19: error: expected primary-expression before ‘left_attach’
/usr/include/gtk/deprecated/gtktable.h:123:19: error: expected primary-expression before ‘right_attach’
/usr/include/gtk/deprecated/gtktable.h:124:19: error: expected primary-expression before ‘top_attach’
/usr/include/gtk/deprecated/gtktable.h:125:19: error: expected primary-expression before ‘bottom_attach’
/usr/include/gtk/deprecated/gtktable.h:127:37: error: variable or field ‘gtk_table_set_row_spacing’ declared void
/usr/include/gtk/deprecated/gtktable.h:127:37: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:127:54: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:128:19: error: expected primary-expression before ‘row’
/usr/include/gtk/deprecated/gtktable.h:129:19: error: expected primary-expression before ‘spacing’
/usr/include/gtk/deprecated/gtktable.h:131:40: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:131:57: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:132:29: error: expected primary-expression before ‘row’
/usr/include/gtk/deprecated/gtktable.h:132:32: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/include/gtk/deprecated/gtktable.h:134:37: error: variable or field ‘gtk_table_set_col_spacing’ declared void
/usr/include/gtk/deprecated/gtktable.h:134:37: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:134:54: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:135:19: error: expected primary-expression before ‘column’
/usr/include/gtk/deprecated/gtktable.h:136:19: error: expected primary-expression before ‘spacing’
/usr/include/gtk/deprecated/gtktable.h:138:40: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:138:57: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:139:29: error: expected primary-expression before ‘column’
/usr/include/gtk/deprecated/gtktable.h:139:35: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/include/gtk/deprecated/gtktable.h:141:37: error: variable or field ‘gtk_table_set_row_spacings’ declared void
/usr/include/gtk/deprecated/gtktable.h:141:37: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:141:54: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:142:19: error: expected primary-expression before ‘spacing’
/usr/include/gtk/deprecated/gtktable.h:144:47: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:144:64: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:146:37: error: variable or field ‘gtk_table_set_col_spacings’ declared void
/usr/include/gtk/deprecated/gtktable.h:146:37: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:146:54: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:147:19: error: expected primary-expression before ‘spacing’
/usr/include/gtk/deprecated/gtktable.h:149:47: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:149:64: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:151:37: error: variable or field ‘gtk_table_set_homogeneous’ declared void
/usr/include/gtk/deprecated/gtktable.h:151:37: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:151:54: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:152:22: error: expected primary-expression before ‘homogeneous’
/usr/include/gtk/deprecated/gtktable.h:154:40: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:154:57: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:156:40: error: variable or field ‘gtk_table_get_size’ declared void
/usr/include/gtk/deprecated/gtktable.h:156:40: error: ‘GtkTable’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:156:57: error: ‘table’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:157:56: error: expected primary-expression before ‘*’ token
/usr/include/gtk/deprecated/gtktable.h:157:57: error: ‘rows’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:158:56: error: expected primary-expression before ‘*’ token
/usr/include/gtk/deprecated/gtktable.h:158:57: error: ‘columns’ was not declared in this scope
/usr/include/gtk/deprecated/gtktable.h:160:1: error: ‘G_END_DECLS’ does not name a type
In file included from /usr/include/gtk/gtk.h:243:0,
                 from gtkStats.h:20,
                 from gtkStats.cxx:16:
/usr/include/gtk/deprecated/gtktearoffmenuitem.h:50:3: error: ‘GtkMenuItem’ does not name a type
/usr/include/gtk/deprecated/gtktearoffmenuitem.h:68:1: error: ‘GType’ does not name a type
/usr/include/gtk/deprecated/gtktearoffmenuitem.h:72:1: error: ‘G_END_DECLS’ does not name a type
In file included from /usr/include/gtk/gtk.h:244:0,
                 from gtkStats.h:20,
                 from gtkStats.cxx:16:
/usr/include/gtk/deprecated/gtkvbbox.h:49:3: error: ‘GtkButtonBox’ does not name a type
/usr/include/gtk/deprecated/gtkvbbox.h:58:1: error: ‘GType’ does not name a type
/usr/include/gtk/deprecated/gtkvbbox.h:62:1: error: ‘G_END_DECLS’ does not name a type
In file included from /usr/include/gtk/gtk.h:245:0,
                 from gtkStats.h:20,
                 from gtkStats.cxx:16:
/usr/include/gtk/deprecated/gtkvbox.h:49:3: error: ‘GtkBox’ does not name a type
/usr/include/gtk/deprecated/gtkvbox.h:58:1: error: ‘GType’ does not name a type
/usr/include/gtk/deprecated/gtkvbox.h:63:1: error: ‘G_END_DECLS’ does not name a type
In file included from /usr/include/gtk/gtk.h:246:0,
                 from gtkStats.h:20,
                 from gtkStats.cxx:16:
/usr/include/gtk/deprecated/gtkvpaned.h:49:3: error: ‘GtkPaned’ does not name a type
/usr/include/gtk/deprecated/gtkvpaned.h:58:1: error: ‘GType’ does not name a type
/usr/include/gtk/deprecated/gtkvpaned.h:62:1: error: ‘G_END_DECLS’ does not name a type
In file included from /usr/include/gtk/gtk.h:247:0,
                 from gtkStats.h:20,
                 from gtkStats.cxx:16:
/usr/include/gtk/deprecated/gtkvscale.h:55:3: error: ‘GtkScale’ does not name a type
/usr/include/gtk/deprecated/gtkvscale.h:64:1: error: ‘GType’ does not name a type
/usr/include/gtk/deprecated/gtkvscale.h:66:39: error: ‘GtkAdjustment’ was not declared in this scope
/usr/include/gtk/deprecated/gtkvscale.h:66:54: error: ‘adjustment’ was not declared in this scope
/usr/include/gtk/deprecated/gtkvscale.h:72:1: error: ‘G_END_DECLS’ does not name a type
In file included from /usr/include/gtk/gtk.h:248:0,
                 from gtkStats.h:20,
                 from gtkStats.cxx:16:
/usr/include/gtk/deprecated/gtkvscrollbar.h:55:3: error: ‘GtkScrollbar’ does not name a type
/usr/include/gtk/deprecated/gtkvscrollbar.h:64:1: error: ‘GType’ does not name a type
/usr/include/gtk/deprecated/gtkvscrollbar.h:66:37: error: ‘GtkAdjustment’ was not declared in this scope
/usr/include/gtk/deprecated/gtkvscrollbar.h:66:52: error: ‘adjustment’ was not declared in this scope
/usr/include/gtk/deprecated/gtkvscrollbar.h:68:1: error: ‘G_END_DECLS’ does not name a type
In file included from /usr/include/gtk/gtk.h:249:0,
                 from gtkStats.h:20,
                 from gtkStats.cxx:16:
/usr/include/gtk/deprecated/gtkvseparator.h:55:3: error: ‘GtkSeparator’ does not name a type
/usr/include/gtk/deprecated/gtkvseparator.h:64:1: error: ‘GType’ does not name a type
/usr/include/gtk/deprecated/gtkvseparator.h:68:1: error: ‘G_END_DECLS’ does not name a type
gtkStats.cxx: In function ‘int main(int, char**)’:
gtkStats.cxx:64:24: error: ‘gtk_window_get_type’ was not declared in this scope
gtkStats.cxx:68:3: error: ‘GObject’ was not declared in this scope
gtkStats.cxx:68:3: error: expected primary-expression before ‘)’ token
gtkStats.cxx:68:3: error: expected ‘)’ before ‘g_type_check_instance_cast’
gtkStats.cxx:69:37: error: expected ‘)’ before ‘;’ token
gtkStats.cxx:69:37: error: expected ‘)’ before ‘;’ token
gtkStats.cxx:69:37: error: expected ‘)’ before ‘;’ token
gtkStats.cxx:71:3: error: expected primary-expression before ‘)’ token
gtkStats.cxx:71:3: error: expected ‘)’ before ‘g_type_check_instance_cast’
gtkStats.cxx:72:32: error: expected ‘)’ before ‘;’ token
gtkStats.cxx:72:32: error: expected ‘)’ before ‘;’ token
gtkStats.cxx:72:32: error: expected ‘)’ before ‘;’ token
gtkStats.cxx:78:21: error: ‘GtkContainer’ was not declared in this scope
gtkStats.cxx:78:21: error: expected primary-expression before ‘)’ token
gtkStats.cxx:78:21: error: expected ‘)’ before ‘g_type_check_instance_cast’
gtkStats.cxx:78:55: error: expected ‘)’ before ‘;’ token
gtkStats.cxx:78:55: error: expected ‘)’ before ‘;’ token
gtkStats.cxx:93:9: error: ‘GTK_DIALOG_DESTROY_WITH_PARENT’ was not declared in this scope
gtkStats.cxx:97:20: error: ‘gtk_dialog_get_type’ was not declared in this scope
make[1]: *** [Opt3-Linux/pstats_gtkStats.o] Error 1
make[1]: Leaving directory `/home/adria/panda3d/pandatool/src/gtk-stats'

Could you please help me in fixing this? pstats is not really necessary for me until a long time from now, but I’d really appreciate some help.

I was also able to build panda with makepanda, but it couldn’t find all the libraries I wanted, and in the rpm package it claimed the /usr/bin, /usr/include, /etc… as its own, so yum wouldn’t let me install it. That, i think, should be fixed.

Again, thank you so much for the help :slight_smile:

I’m not sure that symlinking was the right solution to that problem. In general, if /usr/include/gtk-2.0 should be added to the include path, then you have to put “#define GTK_IPATH /usr/include/gtk-2.0” in your Config.pp file. (That said, the GTK ipath should be autodetected using pkg-config, so if you have the development package for gtk2 installed on your system, it should not be giving any trouble.)

I’m a bit confused why you’re getting all these problems in the first place, though, since I’ve never seen any like them on Linux. (I have plans to build on Fedora myself, but I had trouble with installation into a chroot.)

The fact that you’re getting problems like the “-i” option in the first place almost makes me suspect there’s something fundamental that’s wrong about your system or your configuration, though, such as symlinks to fundamental header files in /usr/include (which is an all-around bad idea).

Also, which version of Panda3D are you trying to build? I would advise you to use the latest CVS version as there are many fixes in there for more recent Linux versions.

I think you’re right. My system is a mess indeed. And i thought that maybe symlinking was a bad idea, but if it fixed the problem (it did not…)

Anyways. I’m building 1.8.0. And I’m building it in my laptop now. The -i issue has multiplicated, but I’ve been able to go through everything pretty smoothly. Even pstats has built correctly: i used gtk-1.2.

Thank you very much for the help, I’ll get and make the CVS version when I arrive home.


This is a change of topic, but now that i’m done with following the steps in INSTALL-PP, what does the dmodel tree do?