-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I ran opam install eigen on a laptop running Ubuntu. Opam failed with the following error message:
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[eigen.0.3.0] found in cache
[owl.0.8.0] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of eigen failed at "/home/larry/.opam/opam-init/hooks/sandbox.sh build dune build -p eigen -j 15".
#=== ERROR while compiling eigen.0.3.0 ========================================#
# context 2.0.5 | linux/x86_64 | ocaml-system.4.08.1 | https://opam.ocaml.org#5bb6b8b7
# path ~/.opam/default/.opam-switch/build/eigen.0.3.0
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p eigen -j 15
# exit-code 1
# env-file ~/.opam/log/eigen-75083-d0f245.env
# output-file ~/.opam/log/eigen-75083-d0f245.out
### output ###
# [...]
# x86_64-linux-gnu-gcc eigen_cpp/eigen_spmat.o (exit 1)
# (cd _build/default/eigen_cpp && /usr/bin/x86_64-linux-gnu-gcc -O2 -fno-strict-aliasing -fwrapv -fPIC -fPIC -ansi -pedantic -O3 -std=c++11 -w -Wno-invalid-partial-specialization -Ofast -march=native -funroll-loops -ffast-math -g -I /usr/lib/ocaml -I /home/larry/.opam/default/lib/bytes -I /home/larry/.opam/default/lib/ctypes -I /home/larry/.opam/default/lib/integers -I lib -I lib/unsupported -o[...]
# cc1plus: error: bad value (‘tigerlake’) for ‘-march=’ switch
...
The problem appears to be that opam is using x86_64-linux-gnu-gcc to compile the Eigen library. Also, this issue with the march value appears to be fixed in gcc-10 and g++-10 (https://stackoverflow.com/questions/64493692/cc1plus-error-bad-value-tigerlake-for-march-switch-compilation-error). I have both installed (/usr/bin/x86_64-linux-gnu-gcc-10) but opam clearly isn't using this.
Is there any way to instruct opam to use a different compiler, march flag, etc?
Metadata
Metadata
Assignees
Labels
No labels