M1 Mac unable to ./buildg3d tools

45 views
Skip to first unread message

r3db0i

unread,
Feb 1, 2022, 9:52:27 PM2/1/22
to G3D Users
Getting a linker error when I try to build tools. Lib and Data builds seem to have worked fine.
Using Python 3.6, as well as have the other dependencies sorted. Any help would be much appreciated. Getting Undefined symbols error when building the Viewer.

Logs:

(py36) [~/Documents/GitHub/g3d/G3D10] %./buildg3d tools


Library written to ../build/lib/libG3D-app.a
../../bin/icompile --verbosity 1 --noprompt --opt

Copying data files
background2.jpg
background1.jpg
reassignOBJMaterial.py
_______________________________________________________________________

Building viewer
Computing dependencies

Compiling
EmptyViewer.cpp
VideoViewer.cpp
FontViewer.cpp
...
TextureViewer.cpp
App.cpp
copying dylib /Users/username/Documents/GitHub/g3d/G3D10/build/bin/libavfilter.dylib to ../../temp/tools/viewer/libavfilter.dylib
libavfilter.dylib
copying dylib /Users/username/Documents/GitHub/g3d/G3D10/build/bin/libswresample.dylib to ../../temp/tools/viewer/libswresample.dylib
libswresample.dylib
..
copying dylib /Users/username/Documents/GitHub/g3d/G3D10/build/bin/libavutil.dylib to ../../temp/tools/viewer/libavutil.dylib
libavutil.dylib
copying dylib /Users/username/Documents/GitHub/g3d/G3D10/build/bin/libtbb.dylib to ../../temp/tools/viewer/libtbb.dylib
libtbb.dylib

Linking
Undefined symbols for architecture x86_64:
"_PyDict_GetItemString", referenced from:
G3D::PythonInterpreter::importFunctionFromModule(G3D::G3DString<64ul> const&, G3D::G3DString<64ul> const&) in libG3D-app.a(PythonInterpreter.o)
"_PyErr_Fetch", referenced from:
G3D::PythonInterpreter::startPython(G3D::G3DString<64ul> const&) in libG3D-app.a(PythonInterpreter.o)
G3D::PythonInterpreter::assertPythonOk(char const*) in libG3D-app.a(PythonInterpreter.o)
G3D::PythonInterpreter::importModule(G3D::G3DString<64ul> const&) in libG3D-app.a(PythonInterpreter.o)
G3D::PythonInterpreter::importFunctionFromModule(G3D::G3DString<64ul> const&, G3D::G3DString<64ul> const&) in libG3D-app.a(PythonInterpreter.o)
...
G3D::PythonInterpreter::finishPython() in libG3D-app.a(PythonInterpreter.o)
"_Py_Initialize", referenced from:
G3D::PythonInterpreter::startPython(G3D::G3DString<64ul> const&) in libG3D-app.a(PythonInterpreter.o)
"_Py_SetPythonHome", referenced from:
G3D::PythonInterpreter::startPython(G3D::G3DString<64ul> const&) in libG3D-app.a(PythonInterpreter.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
37s

(py36) [~/Documents/GitHub/g3d/G3D10] %python --version
Python 3.6.15

(py36) [~/Documents/GitHub/g3d/G3D10] %clang --version
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin21.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

wings...@gmail.com

unread,
Feb 3, 2022, 2:23:56 AM2/3/22
to G3D Users
I've just pushed a fix that removes PythonInterpreter.cpp from compilation on non-Windows, which should fix your issue until I can fix Linux/Mac compilation and re-enable it for all builds.

-Zander

Morgan McGuire

unread,
Feb 3, 2022, 5:42:49 PM2/3/22
to g3d-...@googlegroups.com
Awesome! Thank you so much.

-m


--
You received this message because you are subscribed to the Google Groups "G3D Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to g3d-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/g3d-users/8a6a5b1e-1b6f-4d52-b3e1-9231a068f294n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages