Skip to content
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

[BUG] Undefined symbols for architecture x86_64: "_PyObject_CallFunction", referenced from: #2681

Closed
zanyfly opened this issue Apr 9, 2020 · 5 comments
Labels
macOS Affects macOS

Comments

@zanyfly
Copy link

zanyfly commented Apr 9, 2020

Platform

Operating system and version:
mac OS 10.15 (19A583), Xcode 11.3.1,Python 3.7.4
OBS Studio version: the latest source code from master branch

Expected Behavior

cmake finish, i got the app

Current Behavior

[ 26%] Building C object deps/obs-scripting/CMakeFiles/obs-scripting.dir/obs-scripting-python-import.c.o
[ 26%] Linking CXX shared library libobs-scripting.dylib
Undefined symbols for architecture x86_64:
"_PyObject_CallFunction", referenced from:
_SwigPyObject_dealloc in obs-scripting-python.c.o
(maybe you meant: _Import_PyObject_CallFunctionObjArgs)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [deps/obs-scripting/libobs-scripting.dylib] Error 1
make[1]: *** [deps/obs-scripting/CMakeFiles/obs-scripting.dir/all] Error 2
make: *** [all] Error 2

Steps to Reproduce

i follow the instructions in mac os, run "cmake .. && make" in build directory

@zanyfly zanyfly changed the title [BUG] <bug description> [BUG] Undefined symbols for architecture x86_64: "_PyObject_CallFunction", referenced from: Apr 9, 2020
@Fenrirthviti
Copy link
Member

As far as I am aware, Python support does not work on macOS. Please disable it in your cmake config.

@zanyfly
Copy link
Author

zanyfly commented Apr 14, 2020

@FarzadKarkhani i donnot know how to disable the config

@Fenrirthviti Fenrirthviti added the macOS Affects macOS label Apr 26, 2020
@gaslitbytech
Copy link

gaslitbytech commented May 8, 2020

@zanyfly I also don't know how to disable the config. Though I had the same error and after some persistence had master building using

# Use the following 2 outputs for cmake -DPYTHON_INCLUDE_DIR= params.
python3.7-config --includes --ldflags
python3.7-config --ldflags
cmake -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/config-3.7m-darwin .. && make -j

Though when running ./obs I get

error: os_dlopen(libpython3.8.dylib->libpython3.8.dylib): dlopen(libpython3.8.dylib, 257): image not found

warning: [Python] Could not load library: libpython3.8.dylib
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed

So I guess my default python being 3.8 I need to work out how to use 3.7 at runtime as well at install time?

@dsample
Copy link

dsample commented Jun 9, 2020

I was stuck on this, installing many different versions of Python didn't do the trick, but finally figured out how to disable python:

cmake -DDISABLE_PYTHON=true ..

@zanyfly
Copy link
Author

zanyfly commented Jun 11, 2020

@dsample that works thanks

@zanyfly zanyfly closed this as completed Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
macOS Affects macOS
Projects
None yet
Development

No branches or pull requests

4 participants