I just noticed that the latest valid build of Panda I made for mac os was with High Sierra. On Mojave, I had trouble compiling Panda and in the end, the sdk is unusable as it crashes when instancing CocoaGraphicsPipe()
I’m building using the following command, as I’m using Homebrew Python :
python3 makepanda/makepanda.py --everything --threads 4 --osxtarget=10.7 --python-incdir /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include --python-libdir /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib --installer
First, building with bullet fails with the following errors :
[T3] Building C++ object built/tmp/p3bullet_composite.o In file included from panda/src/bullet/p3bullet_composite.cxx:1: In file included from panda/src/bullet/config_bullet.cxx:14: In file included from panda/src/bullet/config_bullet.h:26: In file included from panda/src/bullet/bulletWorld.h:19: In file included from panda/src/bullet/bullet_includes.h:19: In file included from thirdparty/darwin-libs-a/bullet/include/btBulletDynamicsCommon.h:20: In file included from thirdparty/darwin-libs-a/bullet/include/btBulletCollisionCommon.h:22: In file included from thirdparty/darwin-libs-a/bullet/include/BulletCollision/CollisionDispatch/btCollisionWorld.h:80: thirdparty/darwin-libs-a/bullet/include/LinearMath/btVector3.h:330:7: error: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range] y = bt_splat_ps(y, 0x80); ^~~~~~~~~~~~~~~~~~~~ thirdparty/darwin-libs-a/bullet/include/LinearMath/btVector3.h:46:32: note: expanded from macro 'bt_splat_ps' #define bt_splat_ps( _a, _i ) bt_pshufd_ps((_a), BT_SHUFFLE(_i,_i,_i,_i) ) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ thirdparty/darwin-libs-a/bullet/include/LinearMath/btVector3.h:44:35: note: expanded from macro 'bt_pshufd_ps' #define bt_pshufd_ps( _a, _mask ) _mm_shuffle_ps((_a), (_a), (_mask) ) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include/xmmintrin.h:2608:11: note: expanded from macro '_mm_shuffle_ps' (__m128)__builtin_ia32_shufps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), \ ^ In file included from panda/src/bullet/p3bullet_composite.cxx:1: In file included from panda/src/bullet/config_bullet.cxx:14: In file included from panda/src/bullet/config_bullet.h:26: In file included from panda/src/bullet/bulletWorld.h:19: In file included from panda/src/bullet/bullet_includes.h:19: In file included from thirdparty/darwin-libs-a/bullet/include/btBulletDynamicsCommon.h:20: In file included from thirdparty/darwin-libs-a/bullet/include/btBulletCollisionCommon.h:22: In file included from thirdparty/darwin-libs-a/bullet/include/BulletCollision/CollisionDispatch/btCollisionWorld.h:81: In file included from thirdparty/darwin-libs-a/bullet/include/LinearMath/btTransform.h:21: thirdparty/darwin-libs-a/bullet/include/LinearMath/btMatrix3x3.h:882:17: error: argument value 10880 is outside the valid range [0, 255] [-Wargument-outside-range] __m128 vk = bt_splat_ps(_mm_load_ss((float *)&k), 0x80); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ thirdparty/darwin-libs-a/bullet/include/LinearMath/btVector3.h:46:32: note: expanded from macro 'bt_splat_ps' #define bt_splat_ps( _a, _i ) bt_pshufd_ps((_a), BT_SHUFFLE(_i,_i,_i,_i) ) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ thirdparty/darwin-libs-a/bullet/include/LinearMath/btVector3.h:44:35: note: expanded from macro 'bt_pshufd_ps' #define bt_pshufd_ps( _a, _mask ) _mm_shuffle_ps((_a), (_a), (_mask) ) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include/xmmintrin.h:2608:11: note: expanded from macro '_mm_shuffle_ps' (__m128)__builtin_ia32_shufps((__v4sf)(__m128)(a), (__v4sf)(__m128)(b), \ ^
Rebuilding using --no-bullet is successful, but with several warnings I hadn’t in the past related to the third party libraries (which are the latest though) :
[T1] Linking dynamic library built/lib/libpandaode.dylib clang: **warning:** libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated] ld: warning: building for macOS, but linking in object file (thirdparty/darwin-libs-a/ode/lib/libode.a(ode.cpp.o)) built for ld: warning: building for macOS, but linking in object file (thirdparty/darwin-libs-a/ode/lib/libode.a(collision_kernel.cpp.o)) built for ld: warning: building for macOS, but linking in object file (thirdparty/darwin-libs-a/ode/lib/libode.a(box.cpp.o)) built for ... ld: warning: building for macOS, but linking in object file (thirdparty/darwin-libs-a/ode/lib/libode.a(IceHPoint.cpp.o)) built for
With verbose, the correct SDK is selected though :
clang++ -undefined dynamic_lookup -dynamiclib -install_name @loader_path/../lib/libpandaexpress.1.10.dylib -compatibility_version 1.10 -current_version 1.10.5 -o built/lib/libpandaexpress.1.10.dylib -Lbuilt/lib -Lbuilt/tmp built/tmp/pandaexpress_pandaexpress.o built/tmp/p3downloader_composite1.o built/tmp/p3downloader_composite2.o built/tmp/p3express_composite1.o built/tmp/p3express_composite2.o built/tmp/p3pandabase_pandabase.o built/lib/libp3dtool.dylib built/lib/libp3dtoolconfig.dylib -headerpad_max_install_names -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 thirdparty/darwin-libs-a/openssl/lib/libssl.a thirdparty/darwin-libs-a/openssl/lib/libcrypto.a thirdparty/darwin-libs-a/zlib/lib/libz.a -framework AppKit -ldl
FWIW, I’m able to compile C++ modules for Panda on Mojave using the 10.7 SDK
I will investigate a bit, but any clue is welcome