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

Unable to link Open3D 0.18.0 to existing c++ project in Xcode [macOS arm64] #6707

Closed
3 tasks done
cwreynolds opened this issue Mar 19, 2024 · 5 comments
Closed
3 tasks done
Labels

Comments

@cwreynolds
Copy link

Checklist

My Question

I am trying to add Open3D 0.18.0 graphics to an existing c++ project in macOS Xcode, on an arm64 machine.

I used the binary https://github.com/isl-org/Open3D/releases/download/v0.18.0/open3d-app-macosx-12_0-arm64-0.18.0.zip from https://github.com/isl-org/Open3D/releases

I temporarily replaced my main.cpp with the contents of https://github.com/isl-org/Open3D/blob/main/examples/cpp/Draw.cpp

I worked through some header issues and am now failing at build/link phase. I dragged all .a libraries from [...]open3d-devel-darwin-arm64-0.18.0/lib into the Xcode project's [target / build phases / Link Binary With Libraries].

The build fails with many undefined symbols (eg below). Should this have worked? Any suggestion on how to fix it?

ld: Undefined symbols:
  _CFArrayAppendValue, referenced from:
      __glfwInitJoysticksNS in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      __glfwInitJoysticksNS in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      __glfwInitJoysticksNS in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      _matchCallback in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
  _CFArrayCreateMutable, referenced from:
      __glfwInitJoysticksNS in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      _matchCallback in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      _matchCallback in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)
      _matchCallback in libOpen3D_3rdparty_glfw.a[9](cocoa_joystick.m.o)

[...]

  _omp_get_thread_num, referenced from:
      _.omp_outlined. in libOpen3D.a[136](SurfaceReconstructionPoisson.cpp.o)
      _.omp_outlined..275 in libOpen3D.a[136](SurfaceReconstructionPoisson.cpp.o)
      Eigen::internal::general_matrix_matrix_product<long, double, 0, false, double, 0, false, 0, 1>::run(long, long, long, double const*, long, double const*, long, double*, long, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) in libOpen3D.a[150](RaycastingScene.cpp.o)
      _.omp_outlined. in libOpen3D.a[241](TransformationEstimation.cpp.o)
      Eigen::internal::general_matrix_matrix_product<long, double, 1, false, double, 0, false, 0, 1>::run(long, long, long, double const*, long, double const*, long, double*, long, long, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<long>*) in libOpen3D.a[241](TransformationEstimation.cpp.o)
      _.omp_outlined..3 in libOpen3D.a[241](TransformationEstimation.cpp.o)
      _.omp_outlined..4 in libOpen3D.a[241](TransformationEstimation.cpp.o)
      ...
  _omp_in_parallel, referenced from:
      open3d::utility::InParallel() in libOpen3D.a[271](Parallel.cpp.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@cwreynolds
Copy link
Author

Oh, I belatedly noticed the prebuilt is called open3d-app-macosx-12_0-arm64-0.18.0.zip but I am running on macOS Ventura 13.5.2.

Is that the underlying issue? I've seen ongoing discussions about “CI runners” for arm64 being a problem.

@ssheorey
Copy link
Member

PR #6695 should fix this (and other ARM macOS related issues).

@cwreynolds
Copy link
Author

Thanks @ssheorey — that is great to hear. Us folks in the overlap of Apple Silicon and Open3D greatly appreciate it.

If you happen to have an opinion: I'm trying to decide how I should proceed in the short term. Is building from source a way to get around this issue, or would the filament problem exist there too? I'd prefer to avoid building from source.

cwreynolds added a commit to cwreynolds/evoflock that referenced this issue Mar 19, 2024
Could only get so far before running into isl-org/Open3D#6707 which is due to isl-org/Open3D#6695
@ssheorey
Copy link
Member

Filament is built from source for Apple ARM64. You can try building from source by following the PR #6695

@cwreynolds
Copy link
Author

Belatedly closing this obsolete issue.

(Found this while looking for help with a different macOS/Open3D/c++ issue.)

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

No branches or pull requests

2 participants