Closed MERCEcousineau closed 7 months ago
After digging a little bit, I found that there is no C++ compiler by default in WSL/Ubuntu. (compilation was failing in ./ppl because $(CXX) was expanded to an empty string).
I'm pretty sure I did not get an Opam warning concerning an external dependency (sorry if I missed it). I did not get any warning when running ./configure manually.
I could install apron via opam after installing g++ via apt and export CXX=g++
P.S: I could not figure why I got some "permission denied" error when opam installation failed at first
Hi. Thanks for the report and sorry for the long delay in replying.
It seems that Apron tried to compile some C++ code when no compiler is detected, to support C++ libraries (that, strangely, are detected even though the C++ compiler is not there...). I hope that #104 should fix the issue.
If you have time to test #104, I would be interested in the results.
Dear Antoine, thanks for the reply.
I tried #104 from a brand new Ubuntu image for WSL (https://cloud-images.ubuntu.com/wsl/releases/22.04/current/ubuntu-jammy-wsl-amd64-wsl.rootfs.tar.gz).
I only installed gcc, libgmp-dev, libmpft-dev via apt, and OCaml via opam.
Without applying patch of #104, configure returns:
checking compilation with cc -Wcast-qual: working
checking compilation with cc -Wswitch: working
checking compilation with cc -Wall: working
checking compilation with cc -Wextra: working
checking compilation with cc -Wundef: working
checking compilation with cc -Wcast-align: working
checking compilation with cc -Wno-unused: working
checking compilation with cc -Wno-unused-parameter: working
checking compilation with cc -Wno-unused-function: working
checking compilation with cc -fPIC: working
checking compilation with cc -Wno-stringop-overflow: working
checking compilation with cc -Werror-implicit-function-declaration: working
checking compilation with cc -Wbad-function-cast: working
checking compilation with cc -Wstrict-prototypes: working
checking compilation with cc stringop-overflow: not working
checking compilation with cc -std=c99: working
checking compilation with c++ : not working
checking compilation with g++ : not working
checking compilation with clang++ : not working
binary ar: found in /usr/bin
binary ranlib: found in /usr/bin
binary sed: found in /usr/bin
binary install: found in /usr/bin
looking for gmp without prefix
include gmp.h: found
library gmp: found
library gmp found without prefix
looking for mpfr without prefix
include mpfr.h: found
library mpfr: found
library mpfr found without prefix
looking for glpk without prefix
include glpk.h: not found
looking for glpk in prefix /usr/local
include glpk.h: not found
looking for glpk in prefix /usr
include glpk.h: not found
looking for glpk in prefix /root
include glpk.h: not found
library glpk not found
binary ocamlc.opt: found in /root/.opam/5.1.1/bin
binary ocamlopt.opt: found in /root/.opam/5.1.1/bin
binary ocamldep: found in /root/.opam/5.1.1/bin
binary ocamllex: found in /root/.opam/5.1.1/bin
binary ocamlyacc: found in /root/.opam/5.1.1/bin
binary ocamldoc: found in /root/.opam/5.1.1/bin
binary ocamlmktop: found in /root/.opam/5.1.1/bin
binary ocamlmklib: found in /root/.opam/5.1.1/bin
binary camlidl: not found
checking support for native plugins: working
binary java: not found
detected configuration:
optional OCaml support 0
optional OCamlFind support 0
optional plugins support 1
optional C++ support 0
optional Java support 0 ()
optional PPL support 1
optional PPLite support 1
optional GLPK support 0
optional debug libraries 0
installation path /usr/local
dynamic libraries extension so
and compilation fails for ppl
make[1]: Leaving directory '/root/old/apron-master/taylor1plus'
(cd ppl; make)
make[1]: Entering directory '/root/old/apron-master/ppl'
U__STRICT_ANSI__ -DNDEBUG -O3 -I../apron -I../num -I../itv -c -o ppl_user.o ppl_user.cc
make[1]: U__STRICT_ANSI__: No such file or directory
make[1]: [Makefile:151: ppl_user.o] Error 127 (ignored)
U__STRICT_ANSI__ -DNDEBUG -O3 -I../apron -I../num -I../itv -c -o ppl_poly.o ppl_poly.cc
make[1]: U__STRICT_ANSI__: No such file or directory
make[1]: [Makefile:151: ppl_poly.o] Error 127 (ignored)
U__STRICT_ANSI__ -DNDEBUG -O3 -I../apron -I../num -I../itv -c -o ppl_grid.o ppl_grid.cc
make[1]: U__STRICT_ANSI__: No such file or directory
make[1]: [Makefile:151: ppl_grid.o] Error 127 (ignored)
/usr/bin/ar rcs libap_ppl.a ppl_user.o ppl_poly.o ppl_grid.o
/usr/bin/ar: ppl_user.o: No such file or directory
make[1]: *** [Makefile:132: libap_ppl.a] Error 1
make[1]: Leaving directory '/root/old/apron-master/ppl'
make: *** [Makefile:26: c] Error 2
After applying patch of #104, configure does not set PPL and PPLite support anymore,
checking compilation with cc : working
checking compilation with cc -Wcast-qual: working
checking compilation with cc -Wswitch: working
checking compilation with cc -Wall: working
checking compilation with cc -Wextra: working
checking compilation with cc -Wundef: working
checking compilation with cc -Wcast-align: working
checking compilation with cc -Wno-unused: working
checking compilation with cc -Wno-unused-parameter: working
checking compilation with cc -Wno-unused-function: working
checking compilation with cc -fPIC: working
checking compilation with cc -Wno-stringop-overflow: working
checking compilation with cc -Werror-implicit-function-declaration: working
checking compilation with cc -Wbad-function-cast: working
checking compilation with cc -Wstrict-prototypes: working
checking compilation with cc stringop-overflow: not working
checking compilation with cc -std=c99: working
checking compilation with c++ : not working
checking compilation with g++ : not working
checking compilation with clang++ : not working
binary ar: found in /usr/bin
binary ranlib: found in /usr/bin
binary sed: found in /usr/bin
binary install: found in /usr/bin
looking for gmp without prefix
include gmp.h: found
library gmp: found
library gmp found without prefix
looking for mpfr without prefix
include mpfr.h: found
library mpfr: found
library mpfr found without prefix
looking for glpk without prefix
include glpk.h: not found
looking for glpk in prefix /usr/local
include glpk.h: not found
looking for glpk in prefix /usr
include glpk.h: not found
looking for glpk in prefix /root
include glpk.h: not found
library glpk not found
binary ocamlc.opt: found in /root/.opam/5.1.1/bin
binary ocamlopt.opt: found in /root/.opam/5.1.1/bin
binary ocamldep: found in /root/.opam/5.1.1/bin
binary ocamllex: found in /root/.opam/5.1.1/bin
binary ocamlyacc: found in /root/.opam/5.1.1/bin
binary ocamldoc: found in /root/.opam/5.1.1/bin
binary ocamlmktop: found in /root/.opam/5.1.1/bin
binary ocamlmklib: found in /root/.opam/5.1.1/bin
binary camlidl: not found
checking support for native plugins: working
binary java: not found
detected configuration:
optional OCaml support 0
optional OCamlFind support 0
optional plugins support 1
optional C++ support 0
optional Java support 0 ()
optional PPL support 0
optional PPLite support 0
optional GLPK support 0
optional debug libraries 0
installation path /usr/local
dynamic libraries extension so
install (stripped) command /usr/bin/install (--strip)
And compilation goes perfectly well!
Thanks
Thank you for you quick response! I will merge the patch then.
Dear Apron developers, I ran into a problem when installing apron v0.9.14 on Ubuntu running on top of WSL (Windows Subsystem for Linux). This problem does not occur for v0.9.14 on standard Ubuntu and macOS, and it does neither occur for v0.9.13 on WSL/Ubuntu and standard Ubuntu.
It seems to be a permissions problem for some directory called "shared". Attached are the opam info/env/log files.
Thanks
apron-2154-d0f245.env.txt apron-2154-d0f245.info.txt apron-2154-d0f245.out.txt