Compiling on macOS 10.11

Just getting this weird issue from my Panda3D compilation.

Compiled source code from the latest GitHub commit which is currently, ce736ad

/panda3d/built/include/mutexPosixImpl.I:18:35: error: expected expression
MutexPosixImpl() NOEXCEPT : _lock(PTHREAD_MUTEX_INITIALIZER)

Very odd. I’ve not seen this before. I have no issues compiling Panda on macOS.

Does the error occur in your own code or when compiling Panda3D itself?

I’m trying to freeze my game. Importing

#include <datagram.h>

is where it imports.

Could you share your compiler settings, ie. the flags you are passing to clang?

Also, please make sure you are not adding the parser-inc directory to your include path. This directory is meant to be used by interrogate, and will wreak havoc when added to a compiler include path.

g++ -c -DPy_BUILD_CORE -DLINK_ALL_STATIC -ftemplate-depth-70 -fPIC -O2 -Wno-deprecated-declarations -pthread -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/thirdparty/darwin-libs-a/jpeg/include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/src" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/thirdparty/darwin-libs-a/openssl/include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/thirdparty/darwin-libs-a/freetype/include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/thirdparty/darwin-libs-a/tiff/include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/built/include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/python/Include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/thirdparty/darwin-libs-a/ode/include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/thirdparty/darwin-libs-a/vorbis/include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/thirdparty/darwin-libs-a/png/include" -I"/Users/gabrielfraser/Documents/Toontown Standard/Nirai/panda3d/thirdparty/darwin-libs-a/squish/include" -o "built/sample.o" "src/sample.cxx"

I know you don’t support the package Nirai but it seems to be contained inside the panda3d compiled files, that is why I’ve posted it here.

I should also note that I’m running on OS X El Capitan & Xcode 8 (Downloaded directly from App Store)

Here are my parameters I’m using to build Panda3D

python makepanda/makepanda.py --everything --no-contrib --no-fmodex \
       --no-physx --no-bullet --no-pview --no-pandatool --no-swscale \
       --no-swresample --no-speedtree --no-vrpn --no-artoolkit \
       --no-opencv --no-directcam --no-vision --no-rocket --no-awesomium \
       --no-deploytools --no-skel --no-ffmpeg --no-eigen \
       --no-assimp --no-gles --no-gles2 --no-egl \
       --no-gtk --static $@

I don’t know if this is the cause of your trouble, but we no longer support the GCC that comes with Mac. It is hopelessly outdated. Instead, you should use clang++. I also advise adding the flag -std=gnu++0x to enable C++11 support that we use in the Panda codebase.

Let me know if that helps.

That should fix my mutex error?

It might very well.

Alright cool, that fixed the issue. Cheers for the help buddy. :slight_smile: