-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create executable with macOS Mojave 10.14.4 #4
Comments
on macOS Mojave 10.14.5 clang++ 3d-game-shaders-for-beginners.o -o 3d-game-shaders-for-beginners -L/Developer/Panda3D/lib -lp3framework -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -lp3direct -lpthread |
Hello, You can try forcing the architecture with the This may not work, however. Trying compiling Panda3D from source. You may need to install the Cg toolkit. From there, you can link 3d-game-shaders-for-beginners to your custom build of Panda3D. 👍 |
If you have a recent version of Panda3D, then it has 64-bit binaries and you don't need to switch to However I don't see the Alternatively I wonder if it has something to do with the fact that Panda3D was compiled with |
Thanks for the reply. But, is Cg toolkit necessary only for NVIDIA cards? |
Hello, You can try not using the Cg toolkit. 3D Game Shaders For Beginners uses only GLSL. The Cg toolkit is a higher abstraction that works for both GLSL (OpenGL) and HLSL (DirectX). I do know the examples provided by Panda3D use Cg, so those may not work. However, 3D Game Shaders For Beginners should work without the Cg toolkit being present. 👍 |
FWIW Panda ships with the Cg toolkit included nowadays on macOS and it should not be necessary to install it separately. The errors presented do not look like they are related to the Cg toolkit, anyway. Since the missing symbols all seem to relate to the use of |
Hey, I am having the same issue with my Mac. I can compile the source code but I can't create the executable. Does anyone have any advice on compiling Panda3D from source? I have cloned the repository and downloaded the thirdparty packages. I have simply placed the thirdparty folder inside the main panda3d folder. However, when I run: python makepanda/makepanda.py --everything --installer I get the following error messages: WARNING: Could not locate thirdparty package fftw, excluding from build I am on Mojave 10.14.5 |
I have the same error too when trying to compile Panda3D... so far haven't figured it out yet. |
Hello, Try running the command with the verbose flag and post those results. python makepanda/makepanda.py --everything --installer --verbose See if pkg-config knows where Python is. pkg-config --list-all | grep -i python You can also try to find the pkgconfig path or paths. find / -type f -path '*python*.pc' 2>/dev/null Depending on what that returns, you may need to export an updated export PKG_CONFIG_PATH=/some/path/to/pkgconfig/:$PKG_CONFIG_PATH
python makepanda/makepanda.py --everything --installer 👍 |
1 python makepanda/makepanda.py --everything --installer --verbose Result (only showing the beginning and where it fails): $ python makepanda/makepanda.py --everything --installer --verbose
Version: 1.10.3
Platform: macosx-10.14-x86_64
Using Python 2.7 build located at /System/Library/Frameworks/Python.framework/Versions/2.7/Headers
=========================================================================
WARNING: Python 2.7 will reach EOL after December 31, 2019, and will not
WARNING: be supported after that date. Please ensure you are prepared
WARNING: by planning your upgrade to Python 3 now.
=========================================================================
Using compiler: GCC
Host OS: darwin
Host arch: x86_64
Target OS: darwin
Target arch: x86_64
System library search path:
/usr/lib
/usr/local/lib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1
System include search path:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
Using thirdparty directory: thirdparty/darwin-libs-a/
Couldn't find library libfftw3
Couldn't find header file fftw.h
WARNING: Could not locate thirdparty package fftw, excluding from build
Couldn't find the framework OpenGLES
Couldn't find library libGLESv1_CM
Couldn't find header file GLES/gl.h
WARNING: Could not locate thirdparty package gles, excluding from build
Couldn't find library libGLESv2
Couldn't find header file GLES2/gl2.h
WARNING: Could not locate thirdparty package gles2, excluding from build
Couldn't find library libEGL
Couldn't find header file EGL/egl.h
WARNING: Could not locate thirdparty package egl, excluding from build
WARNING: Could not locate pkg-config package gtk+-2.0, excluding from build
Writing built/include/prc_parameters.h
Writing built/include/dtool_config.h
Writing built/tmp/dtool_have_python.dat
Writing built/tmp/dtool_have_direct.dat
Writing built/tmp/dtool_have_gl.dat
Writing built/tmp/dtool_have_gles.dat
Writing built/tmp/dtool_have_gles2.dat
Writing built/tmp/dtool_have_dx9.dat
Writing built/tmp/dtool_have_tinydisplay.dat
Writing built/tmp/dtool_have_nvidiacg.dat
Writing built/tmp/dtool_have_egl.dat
Writing built/tmp/dtool_have_eigen.dat
Writing built/tmp/dtool_have_openal.dat
Writing built/tmp/dtool_have_fmodex.dat
Writing built/tmp/dtool_have_vorbis.dat
Writing built/tmp/dtool_have_opus.dat
Writing built/tmp/dtool_have_ffmpeg.dat
Writing built/tmp/dtool_have_swscale.dat
Writing built/tmp/dtool_have_swresample.dat
Writing built/tmp/dtool_have_ode.dat
Writing built/tmp/dtool_have_physx.dat
Writing built/tmp/dtool_have_bullet.dat
Writing built/tmp/dtool_have_pandaphysics.dat
Writing built/tmp/dtool_have_speedtree.dat
Writing built/tmp/dtool_have_zlib.dat
Writing built/tmp/dtool_have_png.dat
Writing built/tmp/dtool_have_jpeg.dat
Writing built/tmp/dtool_have_tiff.dat
Writing built/tmp/dtool_have_openexr.dat
Writing built/tmp/dtool_have_squish.dat
Writing built/tmp/dtool_have_maya6.dat
Writing built/tmp/dtool_have_maya65.dat
Writing built/tmp/dtool_have_maya7.dat
Writing built/tmp/dtool_have_maya8.dat
Writing built/tmp/dtool_have_maya85.dat
Writing built/tmp/dtool_have_maya2008.dat
Writing built/tmp/dtool_have_maya2009.dat
Writing built/tmp/dtool_have_maya2010.dat
Writing built/tmp/dtool_have_maya2011.dat
Writing built/tmp/dtool_have_maya2012.dat
Writing built/tmp/dtool_have_maya2013.dat
Writing built/tmp/dtool_have_maya20135.dat
Writing built/tmp/dtool_have_maya2014.dat
Writing built/tmp/dtool_have_maya2015.dat
Writing built/tmp/dtool_have_maya2016.dat
Writing built/tmp/dtool_have_maya20165.dat
Writing built/tmp/dtool_have_maya2017.dat
Writing built/tmp/dtool_have_maya2018.dat
Writing built/tmp/dtool_have_max6.dat
Writing built/tmp/dtool_have_max7.dat
Writing built/tmp/dtool_have_max8.dat
Writing built/tmp/dtool_have_max9.dat
Writing built/tmp/dtool_have_max2009.dat
Writing built/tmp/dtool_have_max2010.dat
Writing built/tmp/dtool_have_max2011.dat
Writing built/tmp/dtool_have_max2012.dat
Writing built/tmp/dtool_have_max2013.dat
Writing built/tmp/dtool_have_max2014.dat
Writing built/tmp/dtool_have_fcollada.dat
Writing built/tmp/dtool_have_assimp.dat
Writing built/tmp/dtool_have_egg.dat
Writing built/tmp/dtool_have_freetype.dat
Writing built/tmp/dtool_have_harfbuzz.dat
Writing built/tmp/dtool_have_vrpn.dat
Writing built/tmp/dtool_have_openssl.dat
Writing built/tmp/dtool_have_fftw.dat
Writing built/tmp/dtool_have_artoolkit.dat
Writing built/tmp/dtool_have_opencv.dat
Writing built/tmp/dtool_have_directcam.dat
Writing built/tmp/dtool_have_vision.dat
Writing built/tmp/dtool_have_gtk2.dat
Writing built/tmp/dtool_have_mfc.dat
Writing built/tmp/dtool_have_wx.dat
Writing built/tmp/dtool_have_fltk.dat
Writing built/tmp/dtool_have_rocket.dat
Writing built/tmp/dtool_have_carbon.dat
Writing built/tmp/dtool_have_cocoa.dat
Writing built/tmp/dtool_have_x11.dat
Writing built/tmp/dtool_have_pandatool.dat
Writing built/tmp/dtool_have_pview.dat
Writing built/tmp/dtool_have_deploytools.dat
Writing built/tmp/dtool_have_skel.dat
Writing built/tmp/dtool_have_pandafx.dat
Writing built/tmp/dtool_have_pandaparticlesystem.dat
Writing built/tmp/dtool_have_contrib.dat
Writing built/tmp/dtool_have_sse2.dat
Writing built/tmp/dtool_have_neon.dat
Writing built/tmp/platform.dat
Writing built/tmp/optimize.dat
Writing built/include/pandaVersion.h
Writing built/include/checkPandaVersion.cxx
Writing built/include/checkPandaVersion.h
Writing built/tmp/null.cxx
Writing built/direct/__init__.py
Writing built/panda3d/__init__.py
Writing built/panda3d/dtoolconfig.py
Writing built/pandac/PandaModules.py
Writing built/pandac/extension_native_helpers.py
Writing built/pandac/__init__.py
Writing built/panda3d.dist-info/METADATA
Writing built/panda3d.dist-info/entry_points.txt
Writing built/etc/Config.prc
Writing built/etc/Confauto.prc
install_name_tool -id @loader_path/../lib/libfmodexL.dylib built/lib/libfmodexL.dylib
otool -L built/lib/libfmodexL.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -id @loader_path/../lib/libfmodex.dylib built/lib/libfmodex.dylib
otool -L built/lib/libfmodex.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -id @loader_path/../lib/libopencv_highgui.2.4.3.dylib built/lib/libopencv_highgui.2.4.3.dylib
otool -L built/lib/libopencv_highgui.2.4.3.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -change libopencv_core.2.4.dylib @loader_path/../lib/libopencv_core.2.4.3.dylib built/lib/libopencv_highgui.2.4.3.dylib
install_name_tool -change libopencv_imgproc.2.4.dylib @loader_path/../lib/libopencv_imgproc.2.4.3.dylib built/lib/libopencv_highgui.2.4.3.dylib
install_name_tool -id @loader_path/../lib/libopencv_core.2.4.3.dylib built/lib/libopencv_core.2.4.3.dylib
otool -L built/lib/libopencv_core.2.4.3.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -id @loader_path/../lib/libopencv_imgproc.2.4.3.dylib built/lib/libopencv_imgproc.2.4.3.dylib
otool -L built/lib/libopencv_imgproc.2.4.3.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -change libopencv_core.2.4.dylib @loader_path/../lib/libopencv_core.2.4.3.dylib built/lib/libopencv_imgproc.2.4.3.dylib
install_name_tool -id @loader_path/../lib/libRocketCore.1.dylib built/lib/libRocketCore.1.dylib
otool -L built/lib/libRocketCore.1.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -id @loader_path/../lib/libRocketControls.1.dylib built/lib/libRocketControls.1.dylib
otool -L built/lib/libRocketControls.1.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -change libRocketCore.1.dylib @loader_path/../lib/libRocketCore.1.dylib built/lib/libRocketControls.1.dylib
install_name_tool -id @loader_path/../lib/libRocketDebugger.1.dylib built/lib/libRocketDebugger.1.dylib
otool -L built/lib/libRocketDebugger.1.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -change libRocketCore.1.dylib @loader_path/../lib/libRocketCore.1.dylib built/lib/libRocketDebugger.1.dylib
install_name_tool -id @loader_path/../lib/libboost_python-xgcc42-mt-1_57.dylib built/lib/libboost_python-xgcc42-mt-1_57.dylib
otool -L built/lib/libboost_python-xgcc42-mt-1_57.dylib | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -id _rocketcontrols.so built/_rocketcontrols.so
otool -L built/_rocketcontrols.so | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -change libboost_python-xgcc42-mt-1_57.dylib @loader_path/lib/libboost_python-xgcc42-mt-1_57.dylib built/_rocketcontrols.so
install_name_tool -id _rocketcore.so built/_rocketcore.so
otool -L built/_rocketcore.so | grep .dylib > built/tmp/otool-libs.txt
install_name_tool -change libboost_python-xgcc42-mt-1_57.dylib @loader_path/lib/libboost_python-xgcc42-mt-1_57.dylib built/_rocketcore.so
Writing built/include/ctl3d.h
Generating dependencies...
Writing built/tmp/interrogate_preamble_python_native.cxx
WARNING: file depends on Python but is not in an ABI-specific directory: built/bin/p3dcparse
WARNING: file depends on Python but is not in an ABI-specific directory: built/bin/deploy-stub
WARNING: file depends on Python but is not in an ABI-specific directory: built/bin/deploy-stubw
WARNING: file dependencies changed: ['built/models/maps/smiley.rgb']
[ 0%] Building C++ object built/tmp/p3dtoolbase_composite1.o
clang++ -std=gnu++11 -ftemplate-depth-70 -fPIC -c -o built/tmp/p3dtoolbase_composite1.o -Ibuilt/tmp -Ibuilt/include -Ithirdparty/darwin-libs-a/eigen/include -Idtool/src/dtoolbase -fvisibility=hidden -Wno-deprecated-declarations -pthread -fno-exceptions -msse2 -fno-strict-aliasing -ffast-math -fno-stack-protector -fno-finite-math-only -fno-unsafe-math-optimizations -O2 -Wall -Wno-unused-function -Wno-reorder -DBUILDING_DTOOL dtool/src/dtoolbase/p3dtoolbase_composite1.cxx Fail - [ 93%] Linking executable built/bin/deploy-stubw
clang++ -o built/bin/deploy-stubw -Lbuilt/lib -Lbuilt/tmp built/tmp/cpython-27m/deploy-stubw.o -headerpad_max_install_names -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib /System/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib -framework AppKit -ldl
[ 93%] Compressing built/models/misc/Dirlight.egg.pz
built/bin/pzip built/models/misc/Dirlight.egg
dyld: Symbol not found: __ZNSsD1Ev
Referenced from: /Users/Noah/Downloads/panda3d-release-1.10.x/built/bin/../lib/libpanda.1.10.dylib
Expected in: flat namespace
in /Users/Noah/Downloads/panda3d-release-1.10.x/built/bin/../lib/libpanda.1.10.dylib
Process exited with exit status 255 and signal code 122
Storing dependency cache.
Elapsed Time: 24 min 21 sec
The following command returned a non-zero value: built/bin/pzip built/models/misc/Dirlight.egg
Build terminated. 2 pkg-config --list-all | grep -i python Result: 3 find / -type f -path '*python*.pc' 2>/dev/null Result: /usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig/python-2.7.pc
/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig/python-2.7.pc
/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/pkgconfig/python-3.7.pc
/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig/python-2.7.pc
/Library/Frameworks/Python.framework/Versions/3.7/lib/pkgconfig/python-3.7.pc
/Library/Frameworks/Python.framework/Versions/3.6/lib/pkgconfig/python-3.6.pc
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig/python-2.7.pc
/Users/Noah/Library/Developer/Xamarin/android-ndk/android-ndk-r14b/prebuilt/darwin-x86_64/lib/pkgconfig/python2.pc
/Users/Noah/Library/Developer/Xamarin/android-ndk/android-ndk-r14b/prebuilt/darwin-x86_64/lib/pkgconfig/python.pc
/Users/Noah/Library/Developer/Xamarin/android-ndk/android-ndk-r14b/prebuilt/darwin-x86_64/lib/pkgconfig/python-2.7.pc
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig/python-2.7.pc
/Volumes/BOOTCAMP/Microsoft/AndroidNDK64/android-ndk-r16b/prebuilt/windows-x86_64/lib/pkgconfig/python-2.7.pc
/Volumes/BOOTCAMP/Microsoft/AndroidNDK64/android-ndk-r16b/prebuilt/windows-x86_64/lib/pkgconfig/python.pc
/Volumes/BOOTCAMP/Microsoft/AndroidNDK64/android-ndk-r16b/prebuilt/windows-x86_64/lib/pkgconfig/python2.pc Can you tell anything from these output? Also, which path do I need to export to update Thanks. |
That problem looks like the same as panda3d/panda3d#584 |
Hey rdb, Thanks for your help with this. When rebuilding the third-party packages with CMake I run into the following issue: error: The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture. I saw that you mentioned @jwcotejr discussed how to fix this on Discord. Is there anyway to link to that discussion page or did you ever get the chance to look into rebuilding them against the 10.7 SDK? Cheers. |
Hello, I believe this is the referenced post. So from what I gather. cd
git clone https://github.com/rdb/panda3d-thirdparty.git thirdparty
cd thirdparty
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
cd
git clone https://github.com/panda3d/panda3d.git
cd panda3d
mkdir thirdparty
# Note the trailing dot.
cp -a ../thirdparty/build/darwin-libs-a/. thirdparty/
# Modify "osxtarget" and the Python include and lib directories for your environment.
makepanda/makepanda.py --everything --wheel --threads 4 --osxtarget=10.14 --python-incdir /usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/include --python-libdir /usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib 👍 |
Hey, This confused me for a moment with the errors on lines 6 and 7. It should be: cmake -DCMAKE_BUILD_TYPE=Release .. With the double dot on line 6 instead of line 7 since we want to access the CMakeLists.txt file in the main directory. I still get the following error: The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture. And cannot proceed to the next step. I've tried deleting i386 from CmakeCache.txt line 114: CMAKE_OSX_ARCHITECTURES:STRING=x86_64;i386 This gets rid of that error but then I get a message about libstdc++ being deprecated for OS X 10.9 clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated] Do you have any further suggestions? Maybe I should ask @jwcotejr? |
Maybe you should try these changes rdb/panda3d-thirdparty#10 (I will see about getting that merged soon) |
Hey rdb, Thanks for this. Could you clarify how to use this? I have installed the python cmake buildsystem and cloned the thirdparty packages from treamology's repo. However, when I build them I am not sure what options to pass to Cmake. I have tried: cmake -DCMAKE_BUILD_TYPE=Release -G"Xcode" -DCMAKE_OSX_SDK=macosx10.14 .. But it says "Ignoring CMAKE_OSX_SYSROOT value: because the directory does not exist. And then the same i386 error happens during the build. |
tl;dr Finally managed to build Panda3d on my Mac but there were some warnings and various packages were excluded from the build. Hey rdb, I have managed to rebuild the 3rd party packages using treamology's branch. However, when I do: makepanda/makepanda.py --everything --wheel --threads 4 --osxtarget=10.14 --python-incdir /anaconda3/include --python-libdir /anaconda3/lib (Tip to anyone trying to modify their "osxtarget" and the Python include and lib directories for your environment - https://stackoverflow.com/questions/35071192/how-to-find-out-where-the-python-include-directory-is) I get thes various warnings: Version: 1.11.0 This seems strange since I can see bullet.prefix and artoolkit.prefix in my thirdparty folder. However, at least I've been able to finally build Panda3d on my Mac! I can run the test programs and generate the grassy scenery etc. https://www.panda3d.org/manual/?title=Loading_the_Grassy_Scenery |
You should be copying the "darwin-libs-a" directory from your built panda3d-thirdparty directory into your Panda3D's "thirdparty" directory, not the "*.prefix" directories. |
Ah ok, someone else had advised that I copy everything from the build folder. This works! There are a few warnings about some thirdparty packages that haven't been installed but none about any of the packages in the "darwin-libs-a" directory so I guess it's found them ok. Thanks for all the help! |
I'd like to mention that Panda3D 1.10.5 was just released, which has a 10.9+ download that is compiled against libc++: |
Thank you @rdb. 👍 |
I am able to compile the source code into an object file.
But I failed at creating the executable by running this:
(The directory to Panda3D library is correct)
The full error log is:
I am on macOS Mojave 10.14.4
The text was updated successfully, but these errors were encountered: