Closed JetForMe closed 3 months ago
Hi @JetForMe,
Thank you for using Lib3MF. I think there is an issue with the crypto library for the tests on Apple Silicon. You do not need those tests for using lib3mf.
You can disable the tests with cmake -DLIB3MF_TESTS=OFF .., or by using cmake-gui
Maybe we should disable them by default, @martinweismann @vijaiaeroastro @3dJan?
That does seem to let it successfully build. I have not yet tried to use it.
@alexanderoster We already made this behavior default with VCPKG. We can make the behavior universal if @martinweismann and @gangatp are okay with it.
if we set this variable SET(CMAKE_OSX_ARCHITECTURES "x86_64") in https://github.com/3MFConsortium/lib3mf/blob/0dc7c6b83c06aa02b33541f4c8d547f16d9adc52/CMakeLists.txt#L242 to CMAKE_OSX_ARCHITECTURES=arm64;x86_64 for enabling universal build for test cases.
It seems like the test should either inherit from the main project, or default to the current architecture, no? Since you're likely only going to run the tests locally after building.
I have PR for removing the setting CMAKE_OSX_ARCHITECTURE for TEST https://github.com/3MFConsortium/lib3mf/pull/362/files
We have these changes merged into develop already. Closing it for now.
M1 MacBook Pro macOS: 14.4.1 Xcode: 15.3 Apple clang: 15.0.0 cmake: 3.29.0 lib3mf branch: main
Looking to write a Swift 3MF importer, I tried to build lib3mf from source. I’m not great with cmake, so perhaps I missed a crucial step, but while the code compiles, it fails to link, I think because of an architecture mismatch. Lots and lots of
I followed these steps to build:
git clone https://github.com/3MFConsortium/lib3mf.git
cd lib3mf
git submodule update --init
chmod a+x cmake/*.sh
cmake/GenerateMake.sh
cd build
make
There were also a number of source-level warnings, and a couple link-related warnings: