Any one up for OSX work.

Toontown was released for mac? Interesting. Does this mean that panda3d-OSX is now stable and reliable?

If so, maybe it’s time to put a little more effort into releasing a mac distro.

Yep, the head of the CVS tree is nice and robust on OSX, at least insofar as we build it here at the VR Studio.

Toontown has been released for well over a month on OSX, and the only real difficulties we had were in writing a new web launcher.

David

I have 2 questions.

1st As mentioned in the other osx build thread, networking seems to be missing in the build.

2nd I have been trying to use a directentry. Which does not seem to accept inputs on osx (works well on windows). Can this be verified by anyone else?

Thanks

Hello again,

Im wondering if anybody had a running Config.pp which he could post here? Im trying to compile on OSX but yet had no luck doing so… (As most setups should be the same on a intel mac this would definately help me a lot)

Thanks in advance

For me, it builds out of the box with an empty Config.pp. What sort of problems are you having?

David

I have just tried with a empty Config.pp (havent tought about doing that before :slight_smile:.

However starting ppremake in dtool woudnt use libjpeg, libpng, libtiff, NVidia Shading, CG OpenGL API, FMOD. With a customomized Config.pp (mostly like discourse.panda3d.org/viewtopic.php?start=90&t=1193 (post from kaweh)) it would would include these, but a “make” in panda gives the following error:

g++ -undefined dynamic_lookup -dynamic -dynamiclib -o Opt2-OSX/libgobj.dylib -install_name libgobj.dylib Opt2-OSX/gobj_gobj_composite1.o Opt2-OSX/gobj_gobj_composite2.o Opt2-OSX/libgobj_igate.o -L…/event/Opt2-OSX -L…/express/Opt2-OSX -L…/gsgbase/Opt2-OSX -L…/linmath/Opt2-OSX -L…/mathutil/Opt2-OSX -L…/nativenet/Opt2-OSX -L…/net/Opt2-OSX -L…/pandabase/Opt2-OSX -L…/pipeline/Opt2-OSX -L…/pnmimage/Opt2-OSX -L…/pstatclient/Opt2-OSX -L…/putil/Opt2-OSX -L/usr/local/panda//lib -L/usr/local/panda//lib -L/Library/Frameworks/Python.framework/Versions/2.4/lib -L/System/Library/Frameworks/Cg.framework/Versions/1.0 -L/opt/local/lib -lpstatclient -levent -llinmath -lmathutil -lpnmimage -lgsgbase -lputil -lnet -lexpress -lpandabase -lpipeline -lnativenet -linterrogatedb -ldconfig -ldtoolutil -ldtoolbase -lprc -lCg -lz -framework Python
/usr/bin/libtool: can’t locate file for: -lCg
/usr/bin/libtool: file: -lCg is not an object file (not allowed in a library)
make[1]: *** [Opt2-OSX/libgobj.dylib] Error 1
make: *** [gobj] Error 2

Edit:
Im using the current CVS version.

I haven’t tried getting Cg to work under OSX yet. Try removing references to that from your Config.pp.

It shouldn’t be hard to use Cg under OSX, since NVidia now provides a Cg framework, but you’d have to figure out the appropriate lines to add to Config.pp. It might be best if you first got Panda building properly without this monkey wrench.

David

1st: I have now successfully compiled most of the things, however mouse-movement is not recognized and other events also do not seem to work correctly (“escape” press is not recognized). I remember reading a post about some mouse issues, however i could not find it again.

2nd: I also cant compile the pandaapp’s. It tells me about missing dynamic library’s. But actually they are where they should (/usr/local/panda/lib):


g++  -o Opt3-OSX/httpbackup Opt3-OSX/httpbackup_backupCatalog.o Opt3-OSX/httpbackup_httpBackup.o    -L../pandaap
pbase/Opt3-OSX -L/usr/local/panda/lib -L/usr/local/panda/lib -L/usr/local/panda/lib -L/usr/local/panda/lib -L/Li
brary/Frameworks/Python.framework/Versions/2.4/lib -lpandaappbase -lprogbase -lpandatoolbase -lexpress -ldownloa
der -lpystub
/usr/bin/ld: warning can't open dynamic library: libpipeline.dylib referenced from: /usr/local/panda/lib/libprog
base.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)

my current Config.pp is:

#define HAVE_PYTHON 1
#define PYTHON_FRAMEWORK Python
#define PYTHON_IPATH /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
#define PYTHON_LPATH /Library/Frameworks/Python.framework/Versions/2.4/lib

#define HAVE_NET 1
#define NET_IPATH /opt/local/include/nspr
#define NET_LPATH /opt/local/lib

#define ZLIB_IPATH /opt/local/include
#define ZLIB_LPATH /opt/local/lib

#define JPEG_IPATH /opt/local/include
#define JPEG_LPATH /opt/local/lib

#define PNG_IPATH /opt/local/include
#define PNG_LPATH /opt/local/lib

#define HAVE_TAR 1
#define TAR_IPATH /opt/local/include
#define TAR_LPATH /opt/local/lib

#define TIFF_IPATH /opt/local/include
#define TIFF_LPATH /opt/local/lib

3th: I also tried to import the QueuedConnectionManager which cant be found (import direct.interval.IntervalGlobal.QuueuedConnectionManager). I actually think all the network stuff is missing…

  1. Strange. I assume you’re compiling against the CVS trunk, and not the 1.3.2 source. Have you tried messenger.toggleVerbose() to see what event is generated when you press the escape key? Precisely what do you mean by “mouse movement is not recognized”?

  2. Don’t attempt to compile the pandaapp directory. We don’t really use it, and forget about it often. We never attempted to build it under OSX, so I doubt it will build. (OSX is really fussy about forcing us to explicitly name all of the required libraries, even those it should be able to find by itself.) There’s nothing useful in pandaapp anyway.

  3. That’s not the way to import QueuedConnectionManager. This symbol, like all C++ symbols, is defined in PandaModules; import it from there: from pandac.PandaModules import QueuedConnectionManager

David

  1. Yes i checked out the latest CVS version and im using it. Reading trought the previous messages i already decided trying out messenger.toggleVerbose():
  • Pressing Escape returns me only the release events:
:04-18-2007 19:44:05 Messenger(debug): sent event: escape-up sentArgs: []
:04-18-2007 19:44:05 Messenger(debug): sent event: time-escape-up sentArgs: [7.5023310000000007]
:04-18-2007 19:44:05 Messenger(debug): sent event: escape-up sentArgs: []
:04-18-2007 19:44:05 Messenger(debug): sent event: time-escape-up sentArgs: [7.7499400000000005]
  • Regarding the mouse problem i have found out that i relied on functions that does not work the same as before. base.win.getPointer(0).getX() does not return the pixel-position of the mouse. Using the base.mouseWatcherNode.getMouse().getX() works fine.
  • However resetting the mouse position using
base.win.movePointer(0, base.win.getXSize()/2, base.win.getYSize()/2) 

makes the mouse reading unusable, its had to explain how it behaves. I’ll try to upload an example.

  1. Didnt know about this :slight_smile:

  2. Thats seems to have fixed this problem.

And a new problem i have never experienced before:
Previously i could load a model just using the path to the model and the filename (no extension aka .bam or .egg), now i get a errormessage:

:loader(error): Cannot load data/models/buildings/myhouse/myhouse 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.

I do understand the errormessage. However i have been using the binary version in this thread, which afaik does not require the filename extensions.

Thanks a lot for your effort.

  1. You’re absolutely right–I was losing the escape key too. I guess we just never noticed. It appears that the OS was returning the “this event was already handled” value for the escape key for some reason, but not for other keys. I just checked in a “fix” to ignore the return value from the OS and process the key anyway.

  2. base.win.getPointer(0).getX() will return the raw mouse data from the window, which is usually the position of the mouse in pixels. This appears to work fine for me. This is different from base.mouseWatcherNode.getMouse().getX(), which returns the mouse in the [-1 … 1] range. The former should be used to be compatible with movePointer().

  3. This is a recent change in Panda itself. We have decided to deprecate the ability to load a model without specifying a filename extension; this feature was causing problems. If you still want to load models without specifying a filename extension, you have to set the Config.prc variable as suggested by the error message.

David

  1. I have finally found out what was causing my real headaches with my 1st person mode camera.
    base.win.movePointer(0, base.win.getXSize()/2, base.win.getYSize()/2)
    causes the mouse to behave very curious. It seems to reset the mouse position for a longer time, calling it every frame makes mousemovement impossible. It will stay in the center not only for this single frame.
    As you wrote both modes base.win.getPointer(0).getX() and base.mouseWatcherNode.getMouse().getX() return the correct values for me as well.

  2. Thats resolved as well in this case :slight_smile:

Ah! I forgot about this detail. Because of a difference in the way OSX handles the mouse messages, you have to specifically put the mouse into “relative” mode before you can do the trick of banging the mouse back to the center to get the mouse delta each frame.

Use code like this:

wp = WindowProperties()
wp.setMouseMode(WindowProperties.MRelative)
base.win.requestProperties(wp)

This code will be work on all platforms, and is the new official cross-platform way to engage this mode. Since you are probably also setting the mouse pointer invisible, you can use the same WindowProperties structure and the same requestProperties() call, e.g.:

wp = WindowProperties()
wp.setCursorHidden(True)
wp.setMouseMode(WindowProperties.MRelative)
base.win.requestProperties(wp)

Note that I only just checked in a change to rename this symbol from WindowProperties.MOUSERelative, to make it more consistent with the rest of the Panda API.

David

Great, that fixed this last problem as well.

There is just a last bug i know about, the event mouse3 is the middle mouse button under osx, while its the right mouse button under windows.

Thanks again for your support.

I’ll have to take your word for that–I only have a one-button mouse. I just checked in the code that ought to fix this.

David

Another thing i just observed, the mouse-wheel also does not generate any events.

I have successfully compiled panda3d on osx including shaders, fmod_ex. using some hints in this thread the sound also worked with a single channel.

However i have had lots of compile errors, which were caused by different “invalid” compile arguments.

Most of the time the

-framework Cg

was missing, this happended in the following folders:

direct/src/interval
direct/src/motiontrail
direct/src/showbase
direct/metalibs/direct
panda/src/pgraph
panda/src/chan
panda/src/char
panda/src/dgraph
panda/src/cull
panda/src/display
panda/src/device
panda/src/parametrics
panda/src/text
panda/src/grutil
panda/src/tform
panda/src/collide
panda/src/recorder
panda/metalibs/panda
panda/src/distort
panda/src/effects
panda/src/egg2pg
panda/src/framework
panda/metalibs/pandafx
panda/src/glstuff
panda/src/osxdisplay
panda/src/pandaegg
panda/metalibs/pandagl
panda/src/physics
panda/src/particlesystem
panda/metalibs/pandaphysics
panda/src/testbed
panda/src/gobj
and probably even more…

Also, sometimes the parameter -lCg was given, which does not work for me… (i think -l only works for lib’s installed using darwinports/macports)

Im not sure anymore if the “-framework OpenGL” is required sometimes as well… (i created some custom compile script which fixes the described errors itself, and i dont really remember what g++ calls i had modified)

If anybody knows how to fix there problems it would be great…

This is my Config.pp maybe there is something wrong with this?

// python bindings
#define HAVE_PYTHON 1
#define PYTHON_FRAMEWORK Python
#define PYTHON_IPATH /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
#define PYTHON_LPATH /Library/Frameworks/Python.framework/Versions/2.4/lib

// addon librarys
#define HAVE_NET 1
#define NET_IPATH /opt/local/include/nspr
#define NET_LPATH /opt/local/lib

#define ZLIB_IPATH /opt/local/include
#define ZLIB_LPATH /opt/local/lib

#define JPEG_IPATH /opt/local/include
#define JPEG_LPATH /opt/local/lib

#define PNG_IPATH /opt/local/include
#define PNG_LPATH /opt/local/lib

#define HAVE_TAR 1
#define TAR_IPATH /opt/local/include
#define TAR_LPATH /opt/local/lib

#define TIFF_IPATH /opt/local/include
#define TIFF_LPATH /opt/local/lib

#define HAVE_CG 1
#define CG_IPATH /Library/Frameworks/Cg.framework/Versions/1.0/Headers

#define HAVE_CGGL 1

#define HAVE_FMODEX 1
#define FMODEX_IPATH /Users/rspoerri/Devel/fmodapi40616/api/inc
#define FMODEX_LPATH /Users/rspoerri/Devel/fmodapi40616/api/lib
#define FMOD_LIBS fmodex

heya,

i’m back and i’m going to try to compile Panda3D for OS X again, and update the package on knuddl.net/moin.cgi/InstallPanda3d, which is already quite out-of-date (though it still works fine for development).

i will document my steps so others might follow and see if i’m missing something. currently it’s not possible to compile vanilla CVS (given installed premises as previously) for OS X.

step 1) get latest version from cvs, fresh and clean (it’s located at ~/Projects/panda3d in my development environment)

step 2) check development environment: i made sure my development environment is setup correctly and the various premises are installed and using latest versions where approriate (Cg, libpng, libtiff, libjpeg, zlib,…)

~/.profile

# panda dev environment
PYTHONPATH=/usr/local/panda/lib:$PYTHONPATH; export PYTHONPATH 
LOCAL_PPREMAKE_CONFIG=/Users/kaweh/Projects/panda3d/Config.pp ; export LOCAL_PPREMAKE_CONFIG 
PPREMAKE_CONFIG=/Users/kaweh/Projects/panda3d/Config.pp ; export PPREMAKE_CONFIG 
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/usr/local/panda/lib:/Users/kaweh/Projects/fmod/api/lib ; export DYLD_LIBRARY_PATH
DTOOL=/Users/kaweh/Projects/panda3d/ppremake

# maya dev environment
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:/Applications/Alias/maya7.0/Maya.app/Contents/MacOS ; export DYLD_LIBRARY_PATH
MAYA_LOCATION=/Applications/Alias/maya7.0/Maya.app/Contents; export MAYA_LOCATION

step 3) create panda3d/Config.pp (based on Hypnos version and my previous Config.pp):

// python bindings 
#define HAVE_PYTHON 1 
#define PYTHON_FRAMEWORK Python 
#define PYTHON_IPATH /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
#define PYTHON_LPATH /Library/Frameworks/Python.framework/Versions/2.4/lib
#define INSTALL_PYTHON_SOURCE 1

// addon librarys 
//#define HAVE_NET 1 
//#define NET_IPATH /opt/local/include/nspr 
//#define NET_LPATH /opt/local/lib 

#define ZLIB_IPATH /opt/local/include 
#define ZLIB_LPATH /opt/local/lib 

#define JPEG_IPATH /opt/local/include 
#define JPEG_LPATH /opt/local/lib 

#define PNG_IPATH /opt/local/include 
#define PNG_LPATH /opt/local/lib 

#define HAVE_TAR 1 
#define TAR_IPATH /opt/local/include 
#define TAR_LPATH /opt/local/lib 

#define TIFF_IPATH /opt/local/include 
#define TIFF_LPATH /opt/local/lib 

#define HAVE_GL 1
#define HAVE_CG 1 
#define CG_IPATH /Library/Frameworks/Cg.framework/Versions/1.0/Headers 
#define HAVE_CGGL 1 

#define HAVE_FMODEX 1 
#define FMODEX_IPATH /Users/kaweh/Projects/fmod/api/inc 
#define FMODEX_LPATH /Users/kaweh/Projects/fmod/api/lib 
#define FMOD_LIBS fmodex

#define HAVE_MAYA 1

#define HAVE_THREADS 1
#define USE_MEMORY_MALLOC 1

#define GENPYCODE_LIBS libpandaexpress libpanda libpandaphysics libdirect libpandafx 
#define PRC_PATH_ENVVARS CFG_PATH ETC_PATH 
#define DEFAULT_PATHSEP : : 

step 4) create the install directory

sudo mkdir /usr/local/panda
sudo chmod 777 /usr/local/panda

step 5) create and install ppremake - i am using the ppremake system to install Panda3D on OS X, not the makepanda system

cd panda3d/ppremake
aclocal
autoheader
automake --foreign -a
autoconf
./configure -with-platform=osx
make install

ppremake builds without any problems and is installed to /usr/local/panda/bin as expected

step 6) create and install dtool

cd panda3d/dtool
ppremake

which outputs

Root is /Users/kaweh/Projects/panda3d/dtool
Reading /Users/kaweh/Projects/panda3d/Config.pp (referred to by PPREMAKE_CONFIG)
Generating src/dtoolutil/pandaVersion.h
Generating src/dtoolutil/checkPandaVersion.h
Generating src/dtoolutil/checkPandaVersion.cxx
Generating src/prc/prc_parameters.h
Read 18 Sources.pp files.
Generating Makefile

Configuring support for the following optional third-party packages:
- Did not find OpenSSL
+ libjpeg
+ libpng
+ libtiff
+ libtar
- Did not find fftw
- Did not find Berkeley DB
+ Nvidia Cg High Level Shading Language
+ Cg OpenGL API
- Did not find Cg DX8 API
- Did not find Cg DX9 API
- Did not find Cg DX10 API
- Did not find VRPN
+ zlib
- Did not find Miles Sound System
+ FMOD Ex sound library
- Did not find gtk+-2
+ Freetype
+ OpenGL
- Did not find DirectX8
- Did not find DirectX9
- Did not find OpenCV
- Did not find FFMPEG
- Did not find ODE
+ OpenMaya

Compilation will generate Python interfaces.

See dtool_config.h for more details about the specified configuration.

Generating dtool_config.h
Generating metalibs/dtool/Makefile
Generating metalibs/dtoolconfig/Makefile
Generating src/attach/Makefile
Generating src/cppparser/Makefile
Generating src/dconfig/Makefile
Generating src/dtoolbase/Makefile
Generating src/dtoolutil/Makefile
Generating src/interrogate/Makefile
Generating src/interrogatedb/Makefile
Generating src/newheader/Makefile
Generating src/parser-inc/Makefile
Generating src/prc/Makefile
Generating src/prckeys/Makefile
Generating src/pystub/Makefile
Generating src/test_interrogate/Makefile
No errors.

seems everything (i want) is there as expected.

let’s start compiling dtool.

g5:~/Projects/panda3d/dtool kaweh$ make install
install -m 644  dtool_config.h /usr/local/panda/include/
cd ./src/dtoolbase && make install
cc   -c -o Opt3-osx/dtoolbase_dlmalloc.o -I. -I/Users/kaweh/Projects/panda3d/dtool -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4    -g -O2 -fPIC dlmalloc.c
cc   -c -o Opt3-osx/dtoolbase_lookup3.o -I. -I/Users/kaweh/Projects/panda3d/dtool -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4    -g -O2 -fPIC lookup3.c
CC   -c -o Opt3-osx/dtoolbase_indent.o -I. -I/Users/kaweh/Projects/panda3d/dtool -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4    -g -O2 -fPIC indent.cxx
CC   -c -o Opt3-osx/dtoolbase_dtoolbase_composite1.o -I. -I/Users/kaweh/Projects/panda3d/dtool -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4    -g -O2 -fPIC dtoolbase_composite1.cxx
CC   -c -o Opt3-osx/dtoolbase_dtoolbase_composite2.o -I. -I/Users/kaweh/Projects/panda3d/dtool -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4    -g -O2 -fPIC dtoolbase_composite2.cxx
neverFreeMemory.cxx:37: error: conflicting declaration ‘NeverFreeMemory* NeverFreeMemory::_global_ptr’
neverFreeMemory.h:76: error: ‘NeverFreeMemory::_global_ptr’ has a previous declaration as ‘NeverFreeMemory* volatile NeverFreeMemory::_global_ptr’
neverFreeMemory.cxx:37: error: declaration of ‘NeverFreeMemory* volatile NeverFreeMemory::_global_ptr’ outside of class is not definition
make[1]: *** [Opt3-osx/dtoolbase_dtoolbase_composite2.o] Error 1
make: *** [install-dtoolbase] Error 2

ok, seems to be a small problem in current CVS (as of 06/20/07) which is easily fixed.

make sure it says

NeverFreeMemory * TVOLATILE NeverFreeMemory::_global_ptr;

in line 37 of neverFreeMemory.cxx (the TVOLATILE is missing).

try to re-compile, will halt the process:

g5:~/Projects/panda3d/dtool kaweh$ make install
cd ./src/dtoolbase && make install
CC   -c -o Opt3-osx/dtoolbase_dtoolbase_composite2.o -I. -I/Users/kaweh/Projects/panda3d/dtool -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4    -g -O2 -fPIC dtoolbase_composite2.cxx
CC -shared  -o Opt3-osx/libdtoolbase.dylib Opt3-osx/dtoolbase_dlmalloc.o Opt3-osx/dtoolbase_lookup3.o Opt3-osx/dtoolbase_indent.o Opt3-osx/dtoolbase_dtoolbase_composite1.o Opt3-osx/dtoolbase_dtoolbase_composite2.o -L/usr/local/panda/lib -L/Library/Frameworks/Python.framework/Versions/2.4/lib -lpthread
powerpc-apple-darwin8-gcc-4.0.1: unrecognized option '-shared'
/usr/bin/ld: Undefined symbols:
_main
std::ios_base::Init::Init()
std::ios_base::Init::~Init()
std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char)
___gxx_personality_v0
std::cerr
std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
__gnu_cxx::__exchange_and_add(int volatile*, int)
std::basic_ostream<char, std::char_traits<char> >::operator<<(bool)
std::basic_ostream<char, std::char_traits<char> >::operator<<(long)
std::basic_ostream<char, std::char_traits<char> >::operator<<(unsigned long)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_M_destroy(std::allocator<char> const&)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
std::__throw_bad_alloc()
std::_Rb_tree_decrement(std::_Rb_tree_node_base*)
std::_Rb_tree_increment(std::_Rb_tree_node_base*)
std::__throw_length_error(char const*)
std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)
std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)
std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
vtable for __cxxabiv1::__class_type_info
vtable for __cxxabiv1::__si_class_type_info
operator delete(void*)
operator new(unsigned long)
___cxa_begin_catch
___cxa_end_catch
___cxa_pure_virtual
___cxa_rethrow
collect2: ld returned 1 exit status
make[1]: *** [Opt3-osx/libdtoolbase.dylib] Error 1
make: *** [install-dtoolbase] Error 2

now there seems to be something wrong with Config.pp or Config.OSX.pp (or any of these) regarding compiling on OS X.

dtool_config.h has correctly defined IS_OSX, so it seems the correct architecture has been detected. but gcc OS X does not know about -shared, but needs -dynamiclib -dynamic and such. the structure of these files seems to have changed since the last time i looked at them, they have been cleaned-up and OS X has been integrated more cleanly, still i’m not able to compile the current CVS version.

what have i missed to get vanilla CVS to compile on OS X?

any help is appreciated.

thanks,
kaweh

I think your problem was back when you built ppremake. Instead of doing:

./configure -with-platform=osx

Just do:

./configure

The default platform name is OSX, which is now autodetected correctly. However, if you override it to set it to lowercase osx, this will break some of the ppremake scripts that are looking for uppercase OSX.

Also, note that you no longer need to declare:

#define USE_MEMORY_MALLOC 1

in your Config.pp file.

I have corrected the missing TVOLATILE keyword in neverFreeMemory.cxx. Thanks! :slight_smile:

David

thanks a lot, dave. this was of great help.

dtool compiles fine and step 6 is done.

step 7) create and install panda3d core

cd panda3d/panda
ppremake
make install

seems to compile fine. but stops here:

g++ -ftemplate-depth-30  -c -o Opt3-OSX/libgobj_igate.o -I. -I/Users/kaweh/Projects/panda3d/panda -I../event -I../express -I../gsgbase -I../linmath -I../mathutil -I../nativenet -I../net -I../pandabase -I../pipeline -I../pnmimage -I../pstatclient -I../putil -I/usr/local/panda/include -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -I/Library/Frameworks/Cg.framework/Versions/1.0/Headers -I/opt/local/include    -g -O2 -fPIC Opt3-OSX/libgobj_igate.cxx
g++  -undefined dynamic_lookup -dynamic -dynamiclib -o Opt3-OSX/libgobj.dylib -install_name libgobj.dylib Opt3-OSX/gobj_gobj_composite1.o Opt3-OSX/gobj_gobj_composite2.o Opt3-OSX/libgobj_igate.o -L../event/Opt3-OSX -L../express/Opt3-OSX -L../gsgbase/Opt3-OSX -L../linmath/Opt3-OSX -L../mathutil/Opt3-OSX -L../nativenet/Opt3-OSX -L../net/Opt3-OSX -L../pandabase/Opt3-OSX -L../pipeline/Opt3-OSX -L../pnmimage/Opt3-OSX -L../pstatclient/Opt3-OSX -L../putil/Opt3-OSX -L/usr/local/panda/lib -L/usr/local/panda/lib -L/Library/Frameworks/Python.framework/Versions/2.4/lib -L/opt/local/lib -lpstatclient -levent -llinmath -lmathutil -lpnmimage -lgsgbase -lputil -lnet -lexpress -lpandabase -lpipeline -lnativenet -linterrogatedb -ldconfig -ldtoolutil -ldtoolbase -lprc -lCg -lz -framework Python
/usr/bin/libtool: can't locate file for: -lCg
/usr/bin/libtool: file: -lCg is not an object file (not allowed in a library)
make[1]: *** [Opt3-OSX/libgobj.dylib] Error 1
make: *** [install-gobj] Error 2

i believe that’s what hypnos was refering to. Cg is a framework and i think frameworks need to be linked differently. -framework Cg.

anything we can do about this, or is that a problem with dtool?

cheers,
kaweh.