You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I am building with /Users/joro/.pyenv/shims/python ./waf configure --with-python --pythondir=/Users/joro/.pyenv/versions/my_virtual_env/lib/python3.6/site-packages
and failed with
Setting out to : /Users/joro/Download/essentia/build
→ configuring the project in /Users/joro/Download/essentia
→ Building in release mode
Checking for 'clang++' (C++ compiler) : /usr/bin/clang++
Checking for 'clang' (C compiler) : /usr/bin/clang
=======================Lightweight Mode : Ignoring ALL libraries except [''] =======================
Checking for 'clang' (C compiler) : /usr/bin/clang
Checking for program 'python' : /Users/joro/.pyenv/versions/3.6.5/bin/python
Checking for python version >= 2.7.0 : 3.6.5
→ Configuring for python3
python-config : /Users/joro/.pyenv/versions/3.6.5/bin/python-config
Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes
Testing pyembed configuration : yes
Asking python-config for pyext '--cflags --libs --ldflags' flags : yes
**Testing pyext configuration : Could not build python extensions**
The log tells:
['/usr/bin/clang++', '-Wl,-stack_size,1000000', '-bundle', '-undefined', 'dynamic_lookup', 'test.cpp.1.o', '-o/Users/joro/Download/essentia/build/.conf_check_231afabe54c4ebccd2356cebe43bc6aa/testbuild/testprog.cpython-36m-darwin.so', '-framework', 'CoreFoundation', '-L/Users/joro/.pyenv/versions/3.6.5/lib/python3.6/config-3.6m-darwin', '-lpython3.6m', '-ldl', '-lpython3.6m', '-ldl', '-L/usr/local/opt/openssl@1.1/lib']
err: ld: -stack_size option can only be used when linking a main executable
clang: error: linker command failed with exit code 1 (use -v to see invocation)
According to this post and this post the flags -Wl,-stack_size,1000000 are confusing the linker. Is there a way to tell ./waf or to tell python3-config --ldflags to exclude these flags?
The text was updated successfully, but these errors were encountered:
georgid
changed the title
Building on Mac OS X 11 with python 3.6.5 problem with linker flags
Building on Mac OS X 11.0 with python 3.6.5 problem with linker flags
Sep 17, 2021
It seems that the problem is that the ld flags are populated from the python installation used. You can check them with /path/to/python/bin/python3-config --ldflags
It seems that when using a framework build (from brew or binary ) the ldflags do not contain the problematic -stack_size.
Otherwise using non-framework python (from pyenv or anaconda) they ldflags seem to be there.
If using the latter, a workaround would be to tweak the ctx.env.LDFLAGS in wscript for waf, which is where they are stored at compile time. However, I could not make it work. Check this kovidgoyal/kitty#289
Hey, I am building with
/Users/joro/.pyenv/shims/python ./waf configure --with-python --pythondir=/Users/joro/.pyenv/versions/my_virtual_env/lib/python3.6/site-packages
and failed with
The log tells:
According to this post and this post the flags
-Wl,-stack_size,1000000
are confusing the linker. Is there a way to tell ./waf or to tell python3-config --ldflags to exclude these flags?The text was updated successfully, but these errors were encountered: