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 on opensuse leap #467

Open
marph91 opened this issue Jul 5, 2020 · 5 comments · May be fixed by #541
Open

Build error on opensuse leap #467

marph91 opened this issue Jul 5, 2020 · 5 comments · May be fixed by #541

Comments

@marph91
Copy link

marph91 commented Jul 5, 2020

I'm using opensuse leap and tried to build nextpnr from sources (commit 137241c). Eigen 3.3.4 is installed. The build fails with the following output:

[ 68%] Building CXX object CMakeFiles/nextpnr-ice40.dir/common/placer_heap.cc.o
/home/martin/dev/nextpnr/common/placer_heap.cc:37:10: fatal error: Eigen/Core: Datei oder Verzeichnis nicht gefunden
 #include <Eigen/Core>
          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/nextpnr-ice40.dir/build.make:197: CMakeFiles/nextpnr-ice40.dir/common/placer_heap.cc.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:226: CMakeFiles/nextpnr-ice40.dir/all] Fehler 2
make: *** [Makefile:147: all] Fehler 2

My workaround was to create a symbolic link sudo ln -s /usr/include/eigen3/Eigen /usr/include/Eigen as described here. Another workaround would be to use # include <eigen3/Eigen/Core> instead of # include <Eigen/Core>.

I guess it works on other linux distributions, since I didn't find any related bug report. Is there a way to fix this for all distributions?

@daveshah1
Copy link
Contributor

Seems like the CMake find_package Eigen3 isn't working properly for some reason. Out of curiosity, what does pkg-config --cflags eigen3 show (I don't think cmake actually uses this but I would like to see what path it thinks it is installed to.)

@marph91
Copy link
Author

marph91 commented Jul 6, 2020

> pkg-config --cflags eigen3
-I/usr/include/eigen3

@daveshah1
Copy link
Contributor

Does /usr/share/cmake/Modules/FindEigen3.cmake exist? Are you sure that you are using system cmake and not, for example, Conda-provided cmake? This is certainly a mysterious failure.

@marph91
Copy link
Author

marph91 commented Jul 6, 2020

The file /usr/share/cmake/Modules/FindEigen3.cmake exists and looks correct.

I only have the system python installed. Anaconda or similar environments aren't installed.

I will try to search a bit more. Maybe this is a known problem with eigen3 + cmake + opensuse.

@marph91
Copy link
Author

marph91 commented Dec 11, 2020

Small update: There is a similar issue at openscad/openscad#2082. This points to the eigen source code. It seems like the EIGEN_* variables are legacy and shouldn't be used anymore.

@marph91 marph91 linked a pull request Dec 11, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants