particle-sfm icon indicating copy to clipboard operation
particle-sfm copied to clipboard

ImportError while running run_particlesfm.py

Open vinayver198 opened this issue 2 years ago • 6 comments

Hi ,

I am facing this import error issue while running particlesfm

ImportError: /home/xyz/Downloads/particle-sfm/point_trajectory/optimize/build/particlesfm.cpython-37m-x86_64-linux-gnu.so: undefined symbol: cholmod_solve

Is there any dependency missing in CMakeLists or I have made some mistake while building particle-sfm ?

Thanks

vinayver198 avatar Jul 29 '22 11:07 vinayver198

Hi, thanks for you interest!

It seems that the Ceres library was not appropriately linked when building point trajectory optimize module. Did you use the shared library when building Ceres (cmake -DBUILD_SHARED_LIBS=ON .., see https://github.com/bytedance/particle-sfm/blob/main/misc/doc/ceres.md)? If not, please try this.

Best, Wang

thuzhaowang avatar Jul 30 '22 01:07 thuzhaowang

Hi, thanks for the reply .

I tried installing ceres again but I am getting some kind of ceres cuda kernel error. Can you let me know the tag of ceres-solver used in particle sfm .

Thanks Vinay

vinayver198 avatar Aug 03 '22 07:08 vinayver198

Hi Vinay,

We use the default master branch of ceres. Could you please share the error message of ceres cuda kernel error?

thuzhaowang avatar Aug 04 '22 00:08 thuzhaowang

Hi ,

This is how my cmake command ends here

-- Performing Test CHECK_CXX_FLAG_Wno_unknown_pragmas
-- Performing Test CHECK_CXX_FLAG_Wno_unknown_pragmas - Success
-- Performing Test CHECK_CXX_FLAG_Wno_sign_compare
-- Performing Test CHECK_CXX_FLAG_Wno_sign_compare - Success
-- Performing Test CHECK_CXX_FLAG_Wno_unused_parameter
-- Performing Test CHECK_CXX_FLAG_Wno_unused_parameter - Success
-- Performing Test CHECK_CXX_FLAG_Wno_missing_field_initializers
-- Performing Test CHECK_CXX_FLAG_Wno_missing_field_initializers - Success
-- Creating configured Ceres config.h output directory: /home/vinay/ceres-solver/build/include/ceres/internal
-- Enabling CERES_USE_EIGEN_SPARSE in Ceres config.h
-- Enabling CERES_NO_ACCELERATE_SPARSE in Ceres config.h
-- Enabling CERES_USE_CXX_THREADS in Ceres config.h
-- Performing Test CHECK_CXX_FLAG_Wno_missing_declarations
-- Performing Test CHECK_CXX_FLAG_Wno_missing_declarations - Success
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Do not build any example.
-- Configuring done
CMake Warning (dev) in internal/ceres/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "ceres_cuda_kernels".
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in internal/ceres/CMakeLists.txt:
  Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
  empty CUDA_ARCHITECTURES not allowed.  Run "cmake --help-policy CMP0104"
  for policy details.  Use the cmake_policy command to set the policy and
  suppress this warning.

  CUDA_ARCHITECTURES is empty for target "ceres_cuda_kernels".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/vinay/ceres-solver/build

And this is how make command ends

[ 80%] Building CXX object internal/ceres/CMakeFiles/ceres_internal.dir/inner_product_computer.cc.o
[ 81%] Building CXX object internal/ceres/CMakeFiles/ceres_internal.dir/solver_utils.cc.o
/home/vinay/ceres-solver/internal/ceres/ceres_cuda_kernels.cu(33): error: qualified name is not allowed

1 error detected in the compilation of "/tmp/tmpxft_000036fc_00000000-6_ceres_cuda_kernels.cpp1.ii".
internal/ceres/CMakeFiles/ceres_cuda_kernels.dir/build.make:75: recipe for target 'internal/ceres/CMakeFiles/ceres_cuda_kernels.dir/ceres_cuda_kernels.cu.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_cuda_kernels.dir/ceres_cuda_kernels.cu.o] Error 1
CMakeFiles/Makefile2:374: recipe for target 'internal/ceres/CMakeFiles/ceres_cuda_kernels.dir/all' failed
make[1]: *** [internal/ceres/CMakeFiles/ceres_cuda_kernels.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:243: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/generated/partitioned_matrix_view_2_4_8.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/generated/partitioned_matrix_view_2_4_8.cc.o] Error 4
make[2]: *** Waiting for unfinished jobs....
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1671: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/program.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/program.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1853: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/sparse_normal_cholesky_solver.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/sparse_normal_cholesky_solver.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1167: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/dogleg_strategy.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/dogleg_strategy.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1727: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/schur_complement_solver.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/schur_complement_solver.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1251: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/evaluator.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/evaluator.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1755: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/schur_jacobi_preconditioner.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/schur_jacobi_preconditioner.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:173: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/generated/partitioned_matrix_view_2_3_9.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/generated/partitioned_matrix_view_2_3_9.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1489: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/line_search_preprocessor.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/line_search_preprocessor.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1601: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/partitioned_matrix_view.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/partitioned_matrix_view.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:537: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/generated/schur_eliminator_2_4_6.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/generated/schur_eliminator_2_4_6.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:411: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/generated/schur_eliminator_2_2_4.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/generated/schur_eliminator_2_2_4.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:929: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/compressed_row_jacobian_writer.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/compressed_row_jacobian_writer.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1531: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/linear_solver.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/linear_solver.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:509: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/generated/schur_eliminator_2_4_3.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/generated/schur_eliminator_2_4_3.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:327: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/generated/partitioned_matrix_view_4_4_3.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/generated/partitioned_matrix_view_4_4_3.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:1069: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/covariance_impl.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/covariance_impl.cc.o] Error 4
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
internal/ceres/CMakeFiles/ceres_internal.dir/build.make:579: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/generated/schur_eliminator_2_4_d.cc.o' failed
make[2]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/generated/schur_eliminator_2_4_d.cc.o] Error 4
CMakeFiles/Makefile2:267: recipe for target 'internal/ceres/CMakeFiles/ceres_internal.dir/all' failed
make[1]: *** [internal/ceres/CMakeFiles/ceres_internal.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
make: *** [all] Error 2

Thanks, Vinay

vinayver198 avatar Aug 04 '22 06:08 vinayver198

Hi Vinay,

I did not have this kind of error messages before, but I guess it could probably be due to the deprecated version of c++. Did you try to update your c++ to 17?

Thanks

B1ueber2y avatar Aug 06 '22 13:08 B1ueber2y

Or you can try to checkout the old version for ceres solver like 2.0.0.

guohengkai avatar Aug 06 '22 13:08 guohengkai

Hi Vinay,

This issue should be solved by #3 . Please checkout the latest commit.

Thanks.

guohengkai avatar Sep 19 '22 02:09 guohengkai

Hi @guohengkai ,

Thanks for the update .

Now I am able to install by using the latest commit.

vinayver198 avatar Sep 19 '22 17:09 vinayver198