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

Build error during build from source on Sonoma M1 Max #6514

Closed
3 tasks done
valkovich opened this issue Nov 28, 2023 · 4 comments · Fixed by #6529
Closed
3 tasks done

Build error during build from source on Sonoma M1 Max #6514

valkovich opened this issue Nov 28, 2023 · 4 comments · Fixed by #6529
Labels
build/install Build or installation issue

Comments

@valkovich
Copy link

valkovich commented Nov 28, 2023

Checklist

Steps to reproduce the issue

I first cloned Open3D by:

git clone https://github.com/isl-org/Open3D.git
cd Open3D

Then, I build Open3D (on Ubuntu 20.04, with CUDA 11.5) with:

mkdir build && cd build
cmake .. -DBUILD_PYTHON_MODULE=OFF 
make -j$(sysctl -n hw.physicalcpu)

Error message

[ 84%] Built target core
/Open3Ds/open3dlatest/cpp/open3d/pipelines/registration/Feature.cpp:158:15: error: unused variable 'kOuterThreads' [-Werror,-Wunused-variable]
    const int kOuterThreads = std::min(kMaxThreads, num_searches);
              ^
/Open3Ds/open3dlatest/cpp/open3d/pipelines/registration/Feature.cpp:159:15: error: unused variable 'kInnerThreads' [-Werror,-Wunused-variable]
    const int kInnerThreads = std::max(kMaxThreads / num_searches, 1);
              ^
2 errors generated.
make[2]: *** [cpp/open3d/pipelines/CMakeFiles/pipelines.dir/registration/Feature.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/Open3Ds/open3dlatest/cpp/open3d/t/pipelines/registration/Feature.cpp:104:15: error: unused variable 'kOuterThreads' [-Werror,-Wunused-variable]
    const int kOuterThreads = std::min(kMaxThreads, num_searches);
              ^
1 error generated.

Open3D, Python and System information

- Operating system: macOS 14.1.1
- Python version: Doesn't matter ( I think :D )
- Open3D version: tried 17.0 and latest from master branch
- System architecture: apple-silicon (M1 Max)
- Is this a remote workstation?: No
- How did you install Open3D?: build from source
- Compiler version (if built from source): Clang 14 (from Xcode)

Additional information

So yeah, firstly I got error during building VTK, but then got this. Now will surpress those warnings and then provide more comments

@valkovich valkovich added the build/install Build or installation issue label Nov 28, 2023
@kshitijgoel007
Copy link

Same error, Sonoma macOS intel i9

@valkovich
Copy link
Author

Made some fixes in Open3DShowAndAbortOnWarning.cmake

    target_compile_options(${target} PRIVATE
        $<$<COMPILE_LANG_AND_ID:C,MSVC>:/W4 /WX ${DISABLE_MSVC_WARNINGS}>
        $<$<COMPILE_LANG_AND_ID:C,GNU,Clang,AppleClang,Intel>:${DISABLE_GNU_CLANG_INTEL_WARNINGS}>
        # $<$<COMPILE_LANG_AND_ID:C,GNU,Clang,AppleClang,Intel>:-Wall -Wextra -Werror ${DISABLE_GNU_CLANG_INTEL_WARNINGS}>
        $<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/W4 /WX ${DISABLE_MSVC_WARNINGS}>
        $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang,Intel>:${DISABLE_GNU_CLANG_INTEL_WARNINGS}>
        # $<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang,Intel>:-Wall -Wextra -Werror ${DISABLE_GNU_CLANG_INTEL_WARNINGS}>
        $<$<COMPILE_LANGUAGE:CUDA>:SHELL:${CUDA_FLAGS}>
        $<$<COMPILE_LANGUAGE:ISPC>:--werror>
    )

Got this linker error and trying to fix it:

0  0x1008f7648  __assert_rtn + 72
1  0x1008b20f0  ___Z13dispatchApplyIRKmZ15dispatchForEachIKN6mach_o13CompactUnwind11Diff24FixupEZNK2ld16LayoutExecutable18writeCompactUnwindENSt3__14spanIhLm18446744073709551615EEEyRKNS7_13SectionLayoutEE4$_26EvNSA_IT_Lm18446744073709551615EEEmT0_EUlmE_EvOSG_SI__block_invoke + 0
2  0x1829e7950  _dispatch_client_callout2 + 20
3  0x1829fc1a4  _dispatch_apply_invoke_and_wait + 176
4  0x1829fb464  _dispatch_apply_with_attr_f + 1176
5  0x1829fb650  dispatch_apply + 96
6  0x1008b2398  ld::LayoutExecutable::writeContentWithoutLinkEdit(std::__1::span<unsigned char, 18446744073709551615ul>, unsigned long long) + 672
7  0x1008b8020  ld::LayoutExecutable::writeToFile(char const*) + 15248
8  0x10086a2e8  main + 9424
ld: Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@kshitijgoel007
Copy link

Its already installed.

Also tried with

brew link --force libomp

Same error.

sitic added a commit to sitic/Open3D that referenced this issue Dec 9, 2023
Occurs on macOS Sonoma when building without OpenMP.

Fixes isl-org#6514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build/install Build or installation issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants