ocaml-mccs icon indicating copy to clipboard operation
ocaml-mccs copied to clipboard

Missing dependency: conf-g++

Open maroneze opened this issue 2 years ago • 0 comments

I tried installing mccs.1.1+14 on a Cygwin machine, and it failed due to the absence of cc1plus.

I then tried installing it in my Fedora, and it failed for the same reason. More precisely:

# [...]
# File "src/dune", line 5, characters 16-36:
# 5 |    new_criteria notuptodate_criteria removed_criteria mccscudf mccs_stubs)
#                     ^^^^^^^^^^^^^^^^^^^^
# (cd _build/default/src && /usr/bin/gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -I . -DUSEGLPK -g -I /home/user/.opam/4.13.1/lib/ocaml -I /home/user/.opam/4.13.1/lib/cudf -I /home/user/.opam/4.13.1/lib/extlib -I glpk -o notuptodate_criteria.o -c notuptodate_criteria.cpp)
# gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
# compilation terminated.
# File "src/dune", line 5, characters 37-53:
# 5 |    new_criteria notuptodate_criteria removed_criteria mccscudf mccs_stubs)
#                                          ^^^^^^^^^^^^^^^^
# (cd _build/default/src && /usr/bin/gcc -O2 -fno-strict-aliasing -fwrapv -pthread -fPIC -I . -DUSEGLPK -g -I /home/user/.opam/4.13.1/lib/ocaml -I /home/user/.opam/4.13.1/lib/cudf -I /home/user/.opam/4.13.1/lib/extlib -I glpk -o removed_criteria.o -c removed_criteria.cpp)
# gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
# compilation terminated.

In both cases, installing g++ solved the problem (in Cygwin, I installed mingw64-x86_64-gcc-g++ 11.4.0-1). So, adding conf-g++ to the dependencies might be useful.

The only downside I see is that, if the user already has a C++ compiler (such as Clang) which provides cc1plus, adding conf-g++ might force it to install a different C++ compiler. But since I don't see a conf-cc1plus package, I'm not sure how to do it otherwise. The README does mention this needs a C++ compiler and has only been tested with g++, so the dependency on conf-g++ does not seem out of place.

maroneze avatar Jul 06 '23 07:07 maroneze