-
Notifications
You must be signed in to change notification settings - Fork 26
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
LUI does not compile on MacOS 10.14.5, Python 3.7, and Panda3D 1.10.3 #54
Comments
This is because the Panda3D SDK was compiled with an older (ancient) version of xcode which used If you want to compile with a newer xcode, this is what I did to get it to work: # Install some requirements beforehand. There may be more which I already had installed.
brew install yasm
brew install icu4c
brew install python3
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"
# Building panda-thirdparty - these are required to build the Panda3D SDK. I skipped bullet because I can't get it to compile.
git clone https://github.com/treamology/panda3d-thirdparty.git
cd panda3d-thirdparty
# This is important! This branch has the changes needed for newer versions of MacOS.
git checkout ios
mkdir build
cd build
# NOTE: the output will be in ../darwin-libs-a
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_BULLET:BOOL=FALSE ..
cmake --build . --config Release
# Go back to the top level.
cd ../../
# Building panda
git clone https://github.com/panda3d/panda3d.git
cd panda3d
# Copy the third party stuff over to here.
mkdir thirdparty
cp -R ../panda3d-thirdparty/darwin-libs-a thirdparty/
# You might need to change your osxtarget depending on your MacOS version.
python3 makepanda/makepanda.py --everything --no-bullet --osxtarget 10.15 --threads 4 --python-incdir=/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include --python-libdir=/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib --installer
# Go back to the top-level directory.
cd ..
# Now you have an installer for the Panda3D SDK. You need to do a couple of things to install it (especially if you are using MacOS 10.15 which makes the root directory read-only).
# 1. open disk utility
# 2. Click file -> New Image -> Blank Image
# 3. Name it PandaSDK-1_11_0
# 4. Set size to 1 GB
# 5. Click save and it should be mounted automatically but if it isn't, then mount it.
# 6. Run your new Panda3D SDK installer, and when you get to the drive selection, select your volume you just created.
# 7. VERY IMPORTANT select back and make sure to check to install the headers. Whenever you change the drives it will uncheck that option...
# Now that you have the SDK installed, we can finally compile lui.
git clone https://github.com/tobspr/LUI.git
cd LUI
python3 update_module_builder.py
VERBOSE=1 PYTHONPATH=/Volumes/PandaSDK-1_11_0/Developer/Panda3D python3 build.py
# Finally you should have lui.so compiled, now we just need to add it to the sdk.
cp osx_amd64_panda1.11.0_py37/lui.so /Volumes/PandaSDK-1_11_0/Developer/Panda3D/panda3d/
# Now make python find the panda python files and try importing lui.
export PYTHONPATH=/Volumes/PandaSDK-1_11_0/Developer/Panda3D python3 -c "import panda3d.lui"
# Great! Now you have LUI compiled! A couple of gotchas:
# 1. A lot of the LUI code uses unicode(). If you're in python3, you need to replace this with str().
# 2. IMPORTANT!!! In your prc file for panda you need
# gl-version 3 2
#
# For example:
# from panda3d.core import load_prc_file_data
# load_prc_file_data("", """
# text-minfilter linear
# text-magfilter linear
# text-pixels-per-unit 32
# sync-video #f
# textures-power-2 none
# show-frame-rate-meter #t
# win-size 700 600
# window-title LUI Minimal Example
# gl-version 3 2
# """)
# If you forget this, then LUI won't render correctly. I made this script by looking through my bash history, so there may be a small mistake somewhere. Let me know if you run into any trouble and I can help you get it sorted out. If this is too much work, I can also just upload the volume I created with the Panda3D SDK including lui.so. |
Not sure if this is missing a library or some other issue?
MacOS 10.14.5, Python 3.7, Panda3D 1.10.3
The text was updated successfully, but these errors were encountered: