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

Can't build mac m1 #26

Open
emmajane1313 opened this issue Oct 8, 2022 · 8 comments
Open

Can't build mac m1 #26

emmajane1313 opened this issue Oct 8, 2022 · 8 comments

Comments

@emmajane1313
Copy link

Getting an error on running conan install . --build=missing --update

make[2]: *** [src/x86/darwin.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
libffi/3.2.1:
libffi/3.2.1: ERROR: Package '240c2182163325b213ca6886a7614c8ed2bf1738' build failed
libffi/3.2.1: WARN: Build folder /Users/devdesign/.conan/data/libffi/3.2.1/_/_/build/240c2182163325b213ca6886a7614c8ed2bf1738
ERROR: libffi/3.2.1: Error in build() method, line 160
	autotools.make()
	ConanException: Error 2 while executing make -j10
@jellespijker
Copy link
Member

please paste the complete output from the conan install command

@mvvkinn
Copy link

mvvkinn commented Aug 7, 2024

I got issue on conan build . [13/13] Linking CXX shared library pynest2d.so

[13/13] Linking CXX shared library pynest2d.so
FAILED: pynest2d.so 
: && /Library/Developer/CommandLineTools/usr/bin/g++ -stdlib=libc++ -std=c++17 -O3      -stdlib=libc++ -O3 -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -dynamiclib -Wl,-headerpad_max_install_names  -o pynest2d.so -install_name @rpath/pynest2d.so CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dBottomLeftConfig.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dBox.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dCircle.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dDJDHeuristicConfig.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dItem.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dItemGroup.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dNfpConfig.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dPoint.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dRectangle.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dcmodule.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dstdstring.cpp.o CMakeFiles/sip_pynest2d.dir/sip/pynest2d/sippynest2dstdvector0101Item.cpp.o  

[...]

~/.conan/data/zlib/1.2.11/_/_/package/6f12be38b2e454b75ce1f2efb692e5b77c8cdee3/lib/libz.a && :
ld: warning: ignoring duplicate libraries: '-lc++'
Undefined symbols for architecture arm64:
  "_sip_init_library", referenced from:
      _PyInit_pynest2d in sippynest2dcmodule.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
ERROR: conanfile.py (pynest2d/5.4.0-alpha): Error in build() method, line 133
        cmake.build()
        ConanException: Error 1 while executing cmake --build "/pynest2d-5.3.0/build/Release" '--' '-j8'

@jellespijker
Copy link
Member

I suspect you're mixing different architecture. Maybe you did a conan install on a emulated Intel rossetta terminal and the build on the native arm terminal.

Remove your build folder, possibly your ~/.conan/data and do everything from the same native arm terminal.
Check if your conan profile mentioned the arm architecture and make sure that your system python with sip is installed on this architecture as well

@mvvkinn
Copy link

mvvkinn commented Aug 9, 2024

I suspect you're mixing different architecture. Maybe you did a conan install on a emulated Intel rossetta terminal and the build on the native arm terminal.

Remove your build folder, possibly your ~/.conan/data and do everything from the same native arm terminal. Check if your conan profile mentioned the arm architecture and make sure that your system python with sip is installed on this architecture as well

@jellespijker

tried again and python crashes with SIGSEGV.
about this, I created new issue #31

@jellespijker
Copy link
Member

try adding a --require-override=cpython/3.10.4@ultimaker/testing it is probably finding the system python during building since you aren't building this as part of Cura, where this cpython recipe is overwritten in the conanfile.py of Cura

@mvvkinn
Copy link

mvvkinn commented Aug 10, 2024

@jellespijker
tried with command conan install . --build=missing --update --require-override=cpython/3.10.4@ultimaker/testing

cpython/3.10@ultimaker/testing: Not found in local cache, looking in remotes...
cpython/3.10@ultimaker/testing: Trying with 'cura'...
ERROR: Failed requirement 'cpython/3.10@ultimaker/testing' from 'conanfile.py (pynest2d/5.4.0-alpha)'
ERROR: Unable to find 'cpython/3.10@ultimaker/testing' in remotes

in addition, this is my config below

Configuration (profile_host):
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=17
compiler.libcxx=libc++
compiler.version=15
os=Macos
os_build=Macos
curaengine:compiler.cppstd=20
curaengine*:compiler.cppstd=20
curaengine_plugin_infill_generate:compiler.cppstd=20
curaengine_plugin_gradual_flow:compiler.cppstd=20
curaengine_grpc_definitions:compiler.cppstd=20
scripta:compiler.cppstd=20
umspatial*:compiler.cppstd=20
dulcificum:compiler.cppstd=20
cura_settings:compiler.cppstd=20
[options]
[build_requires]
[env]
[conf]
tools.cmake.cmaketoolchain:generator=Ninja
tools.env.virtualenv:auto_use=True
tools.gnu:define_libcxx11_abi=True
tools.build:skip_test=False

Configuration (profile_build):
[settings]
arch=armv8
arch_build=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=17
compiler.libcxx=libc++
compiler.version=15
os=Macos
os_build=Macos
[options]
[build_requires]
[env]
[conf]
tools.cmake.cmaketoolchain:generator=Ninja
tools.env.virtualenv:auto_use=True
tools.gnu:define_libcxx11_abi=True
tools.build:skip_test=False

@jellespijker
Copy link
Member

jellespijker commented Aug 10, 2024

my mistake testing should be stable

conan install . --build=missing --update --require-override=cpython/3.10.4@ultimaker/stable

typing this on my phone double check please

@mvvkinn
Copy link

mvvkinn commented Aug 11, 2024

Tried with --require-override=cpython/3.10.4@ultimaker/stable and issue still persists.

Is this problem could be related to sip, cmake, ninja version? I'm using latest stable release. Version of Conan is 1.64.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants