pymagsac icon indicating copy to clipboard operation
pymagsac copied to clipboard

/usr/bin/ld: cannot find -lEigen3::Eigen

Open CallMeFrozenBanana opened this issue 5 years ago • 6 comments

Eigen is already installed. Environment variable was set as: EIGEN3_INCLUDE_DIR=/usr/include/eigen3/Eigen What happen ?= =

running install running bdist_egg running egg_info writing src/pymagsac.egg-info/PKG-INFO writing dependency_links to src/pymagsac.egg-info/dependency_links.txt writing top-level names to src/pymagsac.egg-info/top_level.txt reading manifest file 'src/pymagsac.egg-info/SOURCES.txt' writing manifest file 'src/pymagsac.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext -- pybind11 v2.1.1 -- Configuring done CMake Warning (dev) at lib/pybind11/tools/pybind11Tools.cmake:127 (add_library): Policy CMP0028 is not set: Double colon in target name means ALIAS or IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

Target "pymagsac" links to target "Eigen3::Eigen" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? Call Stack (most recent call first): CMakeLists.txt:55 (pybind11_add_module) This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done -- Build files have been written to: /data/for_jr/pymagsac/build/temp.linux-x86_64-3.5 [ 33%] Linking CXX shared module ../lib.linux-x86_64-3.5/pymagsac/pymagsac.cpython-35m-x86_64-linux-gnu.so /usr/bin/ld: cannot find -lEigen3::Eigen collect2: error: ld returned 1 exit status CMakeFiles/pymagsac.dir/build.make:137: recipe for target '../lib.linux-x86_64-3.5/pymagsac/pymagsac.cpython-35m-x86_64-linux-gnu.so' failed make[2]: *** [../lib.linux-x86_64-3.5/pymagsac/pymagsac.cpython-35m-x86_64-linux-gnu.so] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/pymagsac.dir/all' failed make[1]: *** [CMakeFiles/pymagsac.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 Traceback (most recent call last): File "setup.py", line 106, in zip_safe=False, File "/usr/local/lib/python3.5/dist-packages/setuptools/init.py", line 143, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.5/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 172, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/local/lib/python3.5/dist-packages/setuptools/command/bdist_egg.py", line 158, in call_command self.run_command(cmdname) File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install_lib.py", line 11, in run self.build() File "/usr/lib/python3.5/distutils/command/install_lib.py", line 109, in build self.run_command('build_ext') File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "setup.py", line 38, in run self.build_extension(ext) File "setup.py", line 69, in build_extension cwd=self.build_temp) File "/usr/lib/python3.5/subprocess.py", line 581, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j2']' returned non-zero exit status 2

CallMeFrozenBanana avatar Feb 15 '20 10:02 CallMeFrozenBanana

Sorry, cannot help you here. Eigen linking might be tricky, but I cannot do remote debugging.

ducha-aiki avatar Mar 22 '20 10:03 ducha-aiki

Update my Eigen version from 3.2 to 3.3.9 (git clone && make && make install) Then replace find_package(Eigen3 REQUIRED) to list(APPEND CMAKE_INCLUDE_PATH "/usr/local/include") find_package (Eigen3 3.3 REQUIRED NO_MODULE)

it works for me.

Smellly avatar Mar 25 '20 13:03 Smellly

Update my Eigen version from 3.2 to 3.3.9 (git clone && make && make install) Then replace find_package(Eigen3 REQUIRED) to list(APPEND CMAKE_INCLUDE_PATH "/usr/local/include") find_package (Eigen3 3.3 REQUIRED NO_MODULE)

it works for me.

This works for me. Thank you very much

ZeyingXuHuaWei avatar Sep 22 '21 03:09 ZeyingXuHuaWei

Update my Eigen version from 3.2 to 3.3.9 (git clone && make && make install) Then replace find_package(Eigen3 REQUIRED) to list(APPEND CMAKE_INCLUDE_PATH "/usr/local/include") find_package (Eigen3 3.3 REQUIRED NO_MODULE)

it works for me.

it works for me too, though i don't know why this works

allenthreee avatar Oct 07 '21 15:10 allenthreee

Update my Eigen version from 3.2 to 3.3.9 (git clone && make && make install) Then replace find_package(Eigen3 REQUIRED) to list(APPEND CMAKE_INCLUDE_PATH "/usr/local/include") find_package (Eigen3 3.3 REQUIRED NO_MODULE)

it works for me.

omg!!Thank you so much!I finally solved this proble after 3 days searching...

Janebek avatar Nov 13 '21 09:11 Janebek

I spent ~2-3 hours on this problem before finding this comment and it is solved!

Note to others: My include path was different. If somebody reads this commend and the solution does not work, be careful with your includes path!

ismetdagli avatar Mar 20 '22 03:03 ismetdagli