Any one up for OSX work.


#8

Well hmm I do not have a good place to park this for public consumption. The “rumorâ€


#9

I almost got it all to compile, but then I get this wonky syntax error while compiling panda:

interrogate -od Opt2-osx/libpnmimage.in -oc Opt2-osx/libpnmimage_igate.cxx -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__ppc__ -D__const=const -Dvolatile -D__BIG_ENDIAN__ -D__inline__=inline -D__GNUC__ -S/usr/local/panda/include/parser-inc -S/usr/include -I/usr/local/panda/panda -I../express -I../linmath -I../pandabase -I../pipeline -I../putil -I/usr/local/panda/include -I/Library/Frameworks/Python.framework/Headers -D_DEBUG  -fnames -string -refcount -assert -python-native  -track-interpreter  -module "panda" -library "libpnmimage" config_pnmimage.h pnmbitio.h pnmFileType.h pnmFileTypeRegistry.h pnmImage.h pnmImageHeader.h pnmReader.h pnmWriter.h pnmimage_base.h ppmcmap.h pnmimage_composite1.cxx pnmimage_composite2.cxx
      *** Error in /usr/include/stdarg.h near line 49, column 2:
      parse error, expecting `'{'' or `';'' or `':'' or `'=''
Error parsing file: 'pnmimage_composite2.cxx'
make[1]: *** [Opt2-osx/libpnmimage_igate.cxx] Error 1
make: *** [install-pnmimage] Error 2

any ideas?

Thanks,
-RC


#10

Going to need a little bit more info. I have basically the exact same line for my /panda/src/pnmimage interigate iyet it seems to get past this problem ? . I looked at my /usr/include/stdarg.h
An it only has a handful of lines…

/* This file is public domain. /
/
GCC uses its own copy of this header */
#if defined(GNUC)
#include_next <stdarg.h>
#elif defined(MWERKS)
#include “mw_stdarg.h”
#else
#error “This header only supports MWERKS.”
#endif

I did find another stdargs on the machine but it is under the 3.3 compiler directories ?
If I can get you to look at you my /usr/include/stdarg.h… mayby this is a versioning issue.

Here are a cpuple of version dumps …
$ gcc –v

Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)

uname -a
Darwin -power-mac-g4-agp-graphics.local 8.5.0 Darwin Kernel Version 8.5.0: Sun Jan 22 10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC Power Macintosh powerpc

Not sure where to go from here… Any ideas ?

Roger

#11

Hi I have followed your (Roger) instructions on my OSX 10.4.6 (PPC) install. And I have dtools compiled, but I’m having problems with panda.

Any suggestions on how to get by this, I did exactly as you’re post outlined.

In the bash_profile you set a DTOOL variable but don’t export it, is that right? (I haven’t exported it on mine but I was just wondering about it).

Also I’m assuming with the panda phase the cvs co is of the ‘panda’ module rather than the dtool module (again) :wink:

Thanks in advance for any help anyone can offer.


#12

Paul,

I’ve seen something similar while I was attempting to build on OS X under makepanda.

It may help to look at this forum post on the makepanda side: https://discourse.panda3d.org/viewtopic.php?t=295&start=30. The basic issue is that interrogate isn’t generalized enough to parse the system header files whilst building the python wrappers; to prevent interrogate from traversing up the tree, you can put stub files in one of the source directories to stop interrogate from finding the system headers.

Best of luck,
Mark


#13

Weird. There seems to be different version of the .h files running around not sure the exact problem here. Only reference I can find to this value is in float.h under /usr/include/gcc/darwin/3.3 I did use gcc 4.0 not 3.3 so not sure of the 3.3 behavior But looking at the floats.h it will not parse without the symbol present.

… But lets focus on a simple solution. For symbols that are hard defined in a compiler ( GCC) You can just transfer them to the interrogate preprocessor. Something like this .

  1. From the command line

gcc -E -dM - < /dev/null | grep “__FLT_EVAL”
#define FLT_EVAL_METHOD 0

  1. Then we need to let interrogate know what the compiler thinks this symbol. A simple answer is to modify the SYSTEM_IGATE_FLAGS in Config.osx.

#define SYSTEM_IGATE_FLAGS -D__ppc__ -D__const=const -Dvolatile -D__BIG_ENDIAN__ -D__inline__=inline -D__GNUC__ -D FLT_EVAL_METHOD=0

Again I am curious what compiler version you are using

Seeing a “cpp –v “ would be great … Here is mine.

cpp -v
Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^+.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ --build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.0/cc1 -E -traditional-cpp -mconstant-cfstrings -quiet -v -I/usr/include -D__DYNAMIC__ -D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1040 - -fPIC
ignoring nonexistent directory “/usr/local/include”
ignoring nonexistent directory “/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/…/…/…/…/powerpc-apple-darwin8/include”
ignoring duplicate directory “/usr/include”
as it is a non-system directory that duplicates a system directory
#include “…” search starts here:
#include <…> search starts here:
/usr/include/malloc/
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include
/usr/include
/System/Library/Frameworks
/Library/Frameworks
End of search list.

Roger


#14

That’s my cpp -v

I haven’t tried any of those solutions yet, but will do in a couple of hours.


#15

My version = gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
Yours = gcc version 4.0.1 (Apple Computer, Inc. build 5250)

hmm yup you are on a newer version than me ;(. I guess I need to get a new version.

Paul.

You did get the gist of the previous post. The gcc compiler has some hard coded “sort of ‘ preprocessor #defines and some of there .h files must have them to parse properly. The easiest way I know to get by this is to just.

  1. Query what the compiler has hard coded.
    a. For gcc use “gcc -E -dM - < /dev/nullâ€

#16

Well what you suggested worked Roger, but then I hit another problem after about an hour of building (I’m building this on a laptop).

Any suggestions regarding this?


#17

Well. This to is a problem. Man I really appreciate you jumping threw these hoops. At some point me and Josh owe you all a prebuilt running environment. Or at least a clean build tree for osx.

Three things seem to be actively changing in panda. One is a threaded renderer/ cull engine. The second is the way the graphic state guardian interacts and communicates with the lower level objects. The third is some people are mucking with some new GL features like shaders and looks like glquerry object interface. The issue here is that panda has a local glut definition file that is working agenst the apple glut file and Opengl.h . Odviously the “HACKSâ€


#18

That’s fine Roger - I’m really keen on getting panda working.

Found it: panda_glext.h
I’ll do those changes and give it a try :slight_smile:

Thanks for your continual help.


#19

Erm… I think it worked… I think

Make install completed… hrm - I don’t seem to have a ppython in my /usr/local/panda/bin directory

Any advice?


#20

Cool. You have made it threw the hard part. Try pview. And see if you get basic functionality. There are some more complex samples in the model tree if you loaded that.

Pview mysample.egg

I am not even sure what ppython is. Maybe someone else can help here I just use the real python2.4 binary. Get python and panda in you path(s) and load a library you just generated and call sum functions….:slight_smile:. They are the *.so in the /usr/local/panda/lib directory.

Something like

python
import libpandaexpress
dir(libpandaexpress)

To go to the next step you will need direct and to successfully run the genpycode. Direct is small but is the glue to most of the python environment and a base repository as a kick start for a lot of peoples code.

Roger

PS.
Alter the line in your Config.pp file to read something like this

#define GENPYCODE_LIBS libpandaexpress libpanda libpandaphysics libdirect libpandafx


#21

If I recall correctly, ppython is a Windows wrapper EXE that sets up your path correctly to find the Panda libraries and then executes the Python installed with Panda. I noticed when I built Linux that it didn’t come out of the build process (at least, not on a path where I could find it), so I wouldn’t be surprised if the same were true of OSX. You can probably just ignore it and instead set your PYTHONPATH and LD_LIBRARY_PATH variables correctly (or write your own ppython shell script that does this).

Best of luck,
Mark


#22

ppython is generated by the makepanda build tool, but not by the ppremake build tool. The ppremake tool just uses whatever your system version of Python is (or whatever version you point it at in your Config.pp file).

David


#23

Where, and how do I get direct? I don’t have a ‘libdirect.*’ in my /usr/local/panda/lib/ directory.

Do I have to do a seperate check out and build for direct?

pview is working fine - I downloaded a rabbit egg and loaded it into pview just fine.

Thanks for the help everyone.


#24

Yes, direct is a separate checkout; it’s a peer of the panda tree.

David


#25

Has anonymous permission to cvs been removed? :frowning:

I can’t ‘login’ as anonymous, nor can I ‘Browse CVS’ in source forge (Returns a ‘not found’).

Is there another way to get ‘direct’ ?


#26

Sounds like a SourceForge issue. SourceForge wouldn’t let us remove anonymous access even if we wanted to; that’s the whole point of SourceForge’s existance. But the cvs server does occasionally hiccup.

David


#27

Well I managed to checkout direct.
and I ran ‘ppremake’ in it, then ran ‘make install’.
And it built a few things but then had a link error:

Any advice on this?