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

Mac OSX 10.15.5 Catalina Undefined symbols for architecture x86_64 #423

Open
wbrennan899 opened this issue Jun 9, 2020 · 1 comment
Open

Comments

@wbrennan899
Copy link

Undefined symbols for architecture x86_64
OSX 10.15.5 Catalina

Using the Cmake instructions here. Tried on the master branch as well as 9b41a4e
https://openvslam.readthedocs.io/en/master/installation.html

Also replaced all instances of # with </usr/local/opt/libomp/include/omp.h> in order to get to this step.

I found a few past issues, but was unable to follow the solution proposed here #210 (comment)

cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr/local \
    -DCMAKE_CXX_FLAGS=-std=c++11 \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_UNITTESTS=OFF \
    -DBUILD_WITH_MARCH_NATIVE=ON \
    -DG2O_USE_CHOLMOD=OFF \
    -DG2O_USE_CSPARSE=ON \
    -DG2O_USE_OPENGL=OFF \
    -DG2O_USE_OPENMP=ON \
    ..
[  3%] Built target parser_library
[  5%] Built target csparse_extension
[ 10%] Built target stuff
[ 11%] Built target interface_library
[ 11%] Linking CXX shared library ../../../lib/libg2o_core.dylib
Undefined symbols for architecture x86_64:
  "___kmpc_end_serialized_parallel", referenced from:
      g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::~SparseBlockMatrix() in marginal_covariance_cholesky.cpp.o
      g2o::SparseOptimizer::computeActiveErrors() in sparse_optimizer.cpp.o
  "___kmpc_for_static_fini", referenced from:
      _.omp_outlined. in marginal_covariance_cholesky.cpp.o
      _.omp_outlined. in sparse_optimizer.cpp.o
  "___kmpc_for_static_init_4", referenced from:
      _.omp_outlined. in marginal_covariance_cholesky.cpp.o
      _.omp_outlined. in sparse_optimizer.cpp.o
  "___kmpc_fork_call", referenced from:
      g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::~SparseBlockMatrix() in marginal_covariance_cholesky.cpp.o
      g2o::SparseOptimizer::computeActiveErrors() in sparse_optimizer.cpp.o
  "___kmpc_global_thread_num", referenced from:
      g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::~SparseBlockMatrix() in marginal_covariance_cholesky.cpp.o
      _.omp_outlined. in marginal_covariance_cholesky.cpp.o
      g2o::SparseOptimizer::computeActiveErrors() in sparse_optimizer.cpp.o
      _.omp_outlined. in sparse_optimizer.cpp.o
  "___kmpc_serialized_parallel", referenced from:
      g2o::SparseBlockMatrix<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::~SparseBlockMatrix() in marginal_covariance_cholesky.cpp.o
      g2o::SparseOptimizer::computeActiveErrors() in sparse_optimizer.cpp.o
  "_omp_destroy_lock", referenced from:
      g2o::OptimizableGraph::Vertex::~Vertex() in optimizable_graph.cpp.o
  "_omp_init_lock", referenced from:
      g2o::OptimizableGraph::Vertex::Vertex() in optimizable_graph.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../lib/libg2o_core.dylib] Error 1
make[1]: *** [g2o/core/CMakeFiles/core.dir/all] Error 2
make: *** [all] Error 2
@Camuvingian
Copy link

@wbrennan899 did you manage to fix this issue, I am having exactly the same problem...

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

2 participants