Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.5.2
-
None
-
-
18ba7a9af (dev), bd67a7e8c (6.6)
Description
I am trying to build PySide6 from source on macOS Sonoma 14.0 on a MacBookPro with M1 CPU.
The build fails with the following error:
{{[95/98] Linking CXX executable generator/shiboken6FAILED: generator/shiboken6 : && /Library/Developer/CommandLineTools/usr/bin/c++ -Wall -Wextra -Wno-strict-aliasing -fvisibility=hidden -D QT_NO_CAST_FROM_ASCII -D QT_NO_CAST_TO_ASCII -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=13.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names generator/CMakeFiles/shiboken6.dir/shiboken6_autogen/mocs_compilation.cpp.o generator/CMakeFiles/shiboken6.dir/defaultvalue.cpp.o generator/CMakeFiles/shiboken6.dir/generator.cpp.o generator/CMakeFiles/shiboken6.dir/generatorcontext.cpp.o generator/CMakeFiles/shiboken6.dir/main.cpp.o generator/CMakeFiles/shiboken6.dir/shiboken/cppgenerator.cpp.o generator/CMakeFiles/shiboken6.dir/shiboken/cppgenerator_container.cpp.o generator/CMakeFiles/shiboken6.dir/shiboken/cppgenerator_smartpointer.cpp.o generator/CMakeFiles/shiboken6.dir/shiboken/generatorargument.cpp.o generator/CMakeFiles/shiboken6.dir/shiboken/headergenerator.cpp.o generator/CMakeFiles/shiboken6.dir/shiboken/overloaddata.cpp.o generator/CMakeFiles/shiboken6.dir/shiboken/shibokengenerator.cpp.o generator/CMakeFiles/shiboken6.dir/qtdoc/qtdocgenerator.cpp.o generator/CMakeFiles/shiboken6.dir/qtdoc/qtxmltosphinx.cpp.o -o generator/shiboken6 -iframework /opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/opt/llvm/lib ApiExtractor/libapiextractor.a /opt/homebrew/lib/QtCore.framework/Versions/A/QtCore -framework IOKit -framework DiskArbitration /opt/homebrew/opt/llvm/lib/libclang.dylib /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libxslt.tbd /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libxml2.tbd && : ld: Undefined symbols: CppGenerator::writeSetattroDefaultReturn(TextStream&), referenced from: CppGenerator::writeSmartPointerSetattroFunction(TextStream&, GeneratorContext const&) in cppgenerator_smartpointer.cpp.o clang: error: linker command failed with exit code 1 (use -v to see invocation)ninja: build stopped: subcommand failed.error: Error compiling shiboken6Traceback (most recent call last): File "/Users/tilman/WorkSpace/pyside-pyside-setup/setup.py", line 42, in <module> setup_runner.run_setup() File "/Users/tilman/WorkSpace/pyside-pyside-setup/build_scripts/setup_runner.py", line 263, in run_setup raise RuntimeError(msg)RuntimeError: setup.py invocation failed with exit code: 1.
Steps:
- Installed latest llvm and python3.11 from brew
- Qt 6.5.2 and 6.5.3 are installed through the official installer
- Clone pyside-pyside-setup with this commit: b7d75f8
- Create a venv inside the cloned repository folder: python3.11 -m venv venv
- Activate the venv: source venv/bin/activate
- Upgrade pip: python -m pip install --upgrade pip
- Install requirements: python -m pip install -r requirements
- Now start the build: python setup.py build
Notes:
- When installing requirements the wheel build for PyInstaller did not work as it could not find llvm-strip so I had to create a link to it: ln -s /opt/homebrew/opt/llvm/bin/llvm-strip /opt/homebrew/opt/llvm/bin/strip