camlzip: "This package relies on external (system) dependencies that may be missing." - ocaml

I'm trying to install camlzip (an OCaml package housed in opam), but when I run opam install camlzip I get this:
The following actions will be performed:
∗ install camlzip 1.05
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[camlzip] Archive in cache
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of camlzip failed at "make all".
Processing 1/1: [camlzip: ocamlfind remove]
#=== ERROR while installing camlzip.1.05 ======================================#
# opam-version 1.2.2
# os linux
# command make all
# path /home/mttjone/.opam/system/build/camlzip.1.05
# compiler system (4.02.3)
# exit-code 2
# env-file /home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.env
# stdout-file /home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.out
# stderr-file /home/mttjone/.opam/system/build/camlzip.1.05/camlzip-3552-d2d111.err
### stdout ###
# ocamlc -g -c -ccopt -g -ccopt -I/usr/local/include zlibstubs.c
### stderr ###
# [...]
# zlibstubs.c:151: warning: comparison between pointer and integer
# zlibstubs.c: In function ‘camlzip_inflateEnd’:
# zlibstubs.c:165: warning: implicit declaration of function ‘inflateEnd’
# zlibstubs.c:165: error: ‘z_stream’ undeclared (first use in this function)
# zlibstubs.c:165: error: expected expression before ‘)’ token
# zlibstubs.c:165: error: invalid operands to binary * (have ‘int *’ and ‘int *’)
# zlibstubs.c:165: error: called object ‘<erroneous-expression>’ is not a function
# zlibstubs.c: In function ‘camlzip_update_crc32’:
# zlibstubs.c:172: warning: implicit declaration of function ‘crc32’
# make: *** [zlibstubs.o] Error 2
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
∗ install camlzip 1.05
No changes have been performed
=-=- camlzip.1.05 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing. `opam depext camlzip.1.05' may help you find the correct installation for your system.
Now I think it's clear the it isn't acctually missing dependencies, but I can the suggested command anyway and it said I wasn't missing any dependencies.
Presumably the problem is with the zlibstubs.c file, but I'm not exactly sure what's happening.
Can anyone hep me out?

TL;DR
opam install depext
opam depext camlzip
Explanations
The opam install depext command will install an opam plugin that is capable of installing external dependencies. It will add a depext command to opam tool.
The opam depext camlzip will install external dependencies, using system package manager. If your package manager is not supported, then the command will fail. In that case you can use
opam list --external --required-by=camlzip
to get all external dependencies of camlzip for all distributions and package management systems known to a package maintainer. From this information you can infer the names of packages for your distribution. Once you succeed, it is also a good idea to contribute this information back to the maintainer.

Related

Graphics Installation in Opam

I am trying to install graphics using opam install graphics, but I get the following error
message:
$ opam install graphics
The following actions will be performed:
∗ install graphics 5.1.1
↻ recompile ocamlfind 1.9.1 [uses graphics]
↻ recompile base-bytes base [uses ocamlfind]
↻ recompile ounit2 2.2.4 [uses base-bytes]
↻ recompile ANSITerminal 0.8.2 [uses base-bytes]
===== ∗ 1 ↻ 4 =====
Do you want to continue? [Y/n] y
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
[ANSITerminal.0.8.2] found in cache
[graphics.5.1.1] found in cache
[ocamlfind.1.9.1] found in cache
[ounit2.2.2.4] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
[ERROR] The compilation of graphics failed at "/Users/traviszhang/.opam/opam-init/hooks/sandbox.sh build dune
build -p graphics -j 3 #install".
#=== ERROR while compiling graphics.5.1.1 =====================================#
# context 2.0.8 | macos/x86_64 | ocaml-base-compiler.4.11.1 | https://opam.ocaml.org#7e6a6dcc
# path ~/.opam/cs3110-2021sp/.opam-switch/build/graphics.5.1.1
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p graphics -j 3 #install
# exit-code 1
# env-file ~/.opam/log/graphics-9364-8b8a2d.env
# output-file ~/.opam/log/graphics-9364-8b8a2d.out
### output ###
# [...]
# In file included from src/unix/subwindow.c:16:
# src/unix/libgraph.h:17:10: fatal error: 'X11/Xlib.h' file not found
# #include <X11/Xlib.h>
# ^~~~~~~~~~~~
# 1 error generated.
# cc src/text.o (exit 1)
# (cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -D_FILE_OFFSET_BITS=64 -D_REENTRANT -g -I /Users/traviszhang/.opam/cs3110-2021sp/lib/ocaml -o text.o -c text.c)
# In file included from src/unix/text.c:16:
# src/unix/libgraph.h:17:10: fatal error: 'X11/Xlib.h' file not found
# #include <X11/Xlib.h>
# ^~~~~~~~~~~~
# 1 error generated.
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
┌─ The following actions failed
│ λ build graphics 5.1.1
└─
╶─ No changes have been performed
I have tried the following solutions, but none of them seem to work:
https://github.com/ocaml/graphics/issues/16 (running export LIBRARY_PATH=/opt/X11/lib)
Also adding export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig" to my .zshrc file (this is mentioned in the same thread as 1.
When I run pkg-config --list-all | grep x11 the x11 libraries pop up, but for some reason spam can't seem to find it when trying to install graphics. Any suggestions would be helpful!
Here is my current computer configuration:
macOS BigSur Version 11.2.1
Ocaml Compiler 4.11.1
Update:
This issue has been brought up in the following thread (https://github.com/ocaml/graphics/pull/36#issuecomment-846827032), and will be updated in the new graphics release.
The easiest path to get the graphics package working on macOS is to install and properly setup homebrew, after that you can just do
opam depext --install graphics
and it should install the system dependencies via homebrew (xquartz and xorgproto) and install the OCaml library.

utop installation using opam fails in fedora 25

I have an error installing utop in fedora 25 when I run "opam install utop". The first time I ran the command some packages were installed, but not all. I ran the same command again and got the error message below. Any suggestion?
The following actions will be performed:
- install lambda-term 1.12.0 [required by utop]
- install utop 2.0.2
===== 2 to install =====
Do you want to continue ? [Y/n] y
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[lambda-term] Archive in cache
[utop] Archive in cache
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of lambda-term failed at "jbuilder build -p lambda-term
-j 4".
#=== ERROR while installing lambda-term.1.12.0 ================================#
# opam-version 1.2.2
# os linux
# command jbuilder build -p lambda-term -j 4
# path /home/se/.opam/4.05.0/build/lambda-term.1.12.0
# compiler 4.05.0
# exit-code 1
# env-file /home/se/.opam/4.05.0/build/lambda-term.1.12.0/lambda-term-1999-58c514.env
# stdout-file /home/se/.opam/4.05.0/build/lambda-term.1.12.0/lambda-term-1999-58c514.out
# stderr-file /home/se/.opam/4.05.0/build/lambda-term.1.12.0/lambda-term-1999-58c514.err
### stderr ###
# Warning 3: deprecated: module Lwt_sequence
# [...]
# File "src/lTerm_widget_callbacks.ml", line 48, characters 2-21:
# Warning 3: deprecated: module Lwt_sequence
# This module is an implementation detail of Lwt. See
# https://github.com/ocsigen/lwt/issues/361
# ocamlc src/lTerm_unix.{cmo,cmt} (exit 2)
# (cd _build/default && /home/se/.opam/4.05.0/bin/ocamlc.opt -w -40 -safe-string -g -bin-annot -I /home/se/.opam/4.05.0/lib/bytes -I /home/se/.opam/4.05.0/lib/camomile -I /home/se/.opam/4.05.0/lib/lwt -I /home/se/.opam/4.05.0/lib/lwt_react -I /home/se/.opam/4.05.0/lib/ocaml -I /home/se/.opam/4.05.0/lib/ocaml/threads -I /home/se/.opam/4.05.0/lib/react -I /home/se/.opam/4.05.0/lib/result -I /home/se/.opam/4.05.0/lib/zed -no-alias-deps -I src -o src/lTerm_unix.cmo -c -impl src/lTerm_unix.ml)
# File "src/lTerm_unix.ml", line 342, characters 32-51:
# Error: This expression has type bytes but an expression was expected of type
# string
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions were aborted
- install utop 2.0.2
The following actions failed
- install lambda-term 1.12.0
No changes have been performed
Problem fixed:
opam update
opam upgrade
and possibly
opam reinstall [whatever-was-not-installed-correctly]

Trying to install utop for OCaml in Fedora 26; got an error about installing LWT

I currently have Fedora 26 installed, and I have installed the following packages:
sudo dnf install opam ocaml gcc gcc-c++ m4 make ocamldoc sqlite-devel libcurl-devel fuse-devel zlib-devel ocaml-camlp4-devel redhat-rpm-config
This is the error I currently get trying to install utop:
#=== ERROR while installing lwt.2.7.1 =========================================#
# opam-version 1.2.2
# os linux
# command make build
# path /home/z/.opam/system/build/lwt.2.7.1
# compiler system (4.02.3)
# exit-code 2
# env-file /home/z/.opam/system/build/lwt.2.7.1/lwt-21869-a00279.env
# stdout-file /home/z/.opam/system/build/lwt.2.7.1/lwt-21869-a00279.out
# stderr-file /home/z/.opam/system/build/lwt.2.7.1/lwt-21869-a00279.err
### stdout ###
# ./setup.exe -build
# ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package cppo_ocamlbuild myocamlbuild.ml /usr/lib64/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# + ocamlfind ocamlopt -package unix -package ocamlbuild -linkpkg -package cppo_ocamlbuild myocamlbuild.ml /usr/lib64/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
# File "myocamlbuild.ml", line 1:
# Error: Files /home/z/.opam/system/lib/cppo_ocamlbuild/ocamlbuild_cppo.cmxa
# and /usr/lib64/ocaml/ocamlbuild/ocamlbuildlib.cmxa
# make inconsistent assumptions over implementation Ocamlbuild_plugin
# Command exited with code 2.
# Makefile:33: recipe for target 'build' failed
### stderr ###
# W: Cannot find source file matching module 'Lwt_unix' in library lwt-unix.
# W: Use InterfacePatterns or ImplementationPatterns to define this file with feature "source_patterns".
# W: Cannot find source file matching module 'Lwt_unix' in library lwt-unix.
# W: Use InterfacePatterns or ImplementationPatterns to define this file with feature "source_patterns".
# E: Failure("Command ''/usr/bin/ocamlbuild' src/core/lwt.cma src/core/lwt.cmxa src/core/lwt.a src/core/lwt.cmxs src/logger/lwt-log.cma src/logger/lwt-log.cmxa src/logg$r/lwt-log.a src/logger/lwt-log.cmxs src/unix/liblwt-unix_stubs.a src/unix/dlllwt-unix_stubs.so src/unix/lwt-unix.cma src/unix/lwt-unix.cmxa src/unix/lwt-unix.a src/unix$lwt-unix.cmxs src/simple_top/lwt-simple-top.cma src/simple_top/lwt-simple-top.cmxa src/simple_top/lwt-simple-top.a src/simple_top/lwt-simple-top.cmxs src/react/lwt-reac$.cma src/react/lwt-react.cmxa src/react/lwt-react.a src/react/lwt-react.cmxs src/preemptive/lwt-preemptive.cma src/preemptive/lwt-preemptive.cmxa src/preemptive/lwt-pre$mptive.a src/preemptive/lwt-preemptive.cmxs src/ppx/ppx.cma src/ppx/ppx.cmxa src/ppx/ppx.a src/ppx/ppx.cmxs src/ppx/ppx_lwt_ex.native doc/examples/unix/logging.native d$c/examples/unix/relay.native doc/examples/unix/parallelize.native -use-ocamlfind -plugin-tags 'package(cppo_ocamlbuild)' -tag debug' terminated with error code 10")
# make: *** [build] Error 1
What should I do?
Thank you!
Opam's "system compiler", that is used by default on opam init, is an hybrid setting in which the packages are installed in the local opam sandbox, but the compiler from the system (/usr) is used. See the opam switch command to use a sandbox with a compiler compiled by opam instead, or to switch back.
Your example shows that you are using a system compiler, as provided by dnf install ocaml ; opam is consequently supposed to use e.g. /usr/bin/ocamlopt, but installed software and libs from ~/.opam/system/{bin,lib}.
What is supposed to happen is that lwt depends on ocamlbuild and ocamlfind, which opam installs first; then PATH is set so that ~/.opam/system/bin/ is first and these installed binaries are always chosen. It's where something must be going wrong, because the end of the log shows that /usr/bin/ocamlbuild was called.
It's difficult to know what without more details, and I failed to reproduce on a Fedora 25 container. But you could:
check if ocamlbuild and ocamlfind were properly installed by opam, and the presence of ~/.opam/system/bin/ocaml{find,build}
check if there is any global or environment configuration of ocamlfind that could interfere (which ocamlfind; ocamlfind printconf; opam config exec -- ocamlfind printconf).
check the linked environment file: /home/z/.opam/system/build/lwt.2.7.1/lwt-21869-a00279.env to see if PATH is properly defined
run with -v to see all commands issued by opam
Of course, as mentionned in the comments above, using a standard (i.e. non-system) switch, which includes its own OCaml compiler, would work around the issue. It takes a tad longer to compile though.

Opam failures on macOS Sierra

I'm having problems very similar to this question.
I have a MacBook Pro on macOS Sierra. I've installed ocaml and opam via brew. (brew install ocaml, brew install opam) This installed ocaml 4.03.0, and it appears to work fine on its own.
I tried to install oasis (opam install oasis), but the installation failed due to a failure in installing ocamlfind:
➜ ~ opam install ocamlfind
The following actions will be performed:
∗ install ocamlfind 1.6.2
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[ocamlfind] Archive in cache
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[ERROR] The compilation of ocamlfind failed at "./configure -bindir /Users/drautb/.opam/system/bin -sitelib /Users/drautb/.opam/system/lib -mandir /Users/drautb/.opam/system/man -config /Users/drautb/.opam/system/lib/findlib.conf -no-custom -no-topfind".
Processing 1/1: [ocamlfind: rm]
#=== ERROR while installing ocamlfind.1.6.2 ===================================#
# opam-version 1.2.2
# os darwin
# command ./configure -bindir /Users/drautb/.opam/system/bin -sitelib /Users/drautb/.opam/system/lib -mandir /Users/drautb/.opam/system/man -config /Users/drautb/.opam/system/lib/findlib.conf -no-custom -no-topfind
# path /Users/drautb/.opam/system/build/ocamlfind.1.6.2
# compiler system (4.03.0)
# exit-code 1
# env-file /Users/drautb/.opam/system/build/ocamlfind.1.6.2/ocamlfind-41584-6d07ae.env
# stdout-file /Users/drautb/.opam/system/build/ocamlfind.1.6.2/ocamlfind-41584-6d07ae.out
# stderr-file /Users/drautb/.opam/system/build/ocamlfind.1.6.2/ocamlfind-41584-6d07ae.err
### stdout ###
# [...]
# Configuration for str written to site-lib-src/str/META
# Configuration for threads written to site-lib-src/threads/META
# Configuration for unix written to site-lib-src/unix/META
# Configuration for stdlib written to site-lib-src/stdlib/META
# Configuration for bigarray written to site-lib-src/bigarray/META
# Configuration for ocamldoc written to site-lib-src/ocamldoc/META
# Configuration for camlp4 written to site-lib-src/camlp4/META
# Configuration for compiler-libs written to site-lib-src/compiler-libs/META
# Configuration for bytes written to site-lib-src/bytes/META
# Detecting compiler arguments: FAILED (see the file ocargs.log for details)
### stderr ###
# ./configure: line 553: cd: src: No such file or directory
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
The following actions failed
∗ install ocamlfind 1.6.2
No changes have been performed
I thought it might be related to ocaml 4.03.0, so I tried switching to ocaml 4.02.1. (opam switch 4.02.1) This fails also:
➜ ~ opam switch 4.02.1
=-=- Installing compiler 4.02.1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 🐫
[default.comp] http://caml.inria.fr/pub/distrib/ocaml-4.02/ocaml-4.02.1.tar.gz downloaded
Now compiling OCaml. This may take a while, please bear with us...
[ERROR] Compiler build failed at "./configure -prefix /Users/drautb/.opam/4.02.1 -with-debug-runtime":
# opam-version 1.2.2
# os darwin
# command ./configure -prefix /Users/drautb/.opam/4.02.1 -with-debug-runtime
# path /Users/drautb/.opam/4.02.1/build/ocaml
# exit-code 2
# env-file /Users/drautb/.opam/log/log-42620-d2c37b.env
# stdout-file /Users/drautb/.opam/log/log-42620-d2c37b.out
# stderr-file /Users/drautb/.opam/log/log-42620-d2c37b.err
### stdout ###
# [ERROR!]Cannot guess host type. You must specify one with the -host option.
### stderr ###
# ./configure: line 190: cd: config/auto-aux: No such file or directory
# ./configure: line 222: ../gnu/config.guess: No such file or directory
I've tried reinstalling XCode, I've tried reinstalling ocaml and opam via homebrew with the --build-from-source option, (including rm -rf ~/.opam) and the errors persist.
Has anyone else had issues like this?

Unable to install ctypes using opam

I wish to install ctypes on my Ubuntu 14.04 computer. I am trying to do so using opam but its failing. Here's the response that I get :-
opam install ctypes
The following actions will be performed:
∗ install conf-ncurses 1 [required by ocamlfind]
∗ install ocamlfind 1.6.2 [required by ctypes]
∗ install base-bytes base [required by ctypes]
∗ install ctypes 0.5.1
===== ∗ 4 =====
Do you want to continue ? [Y/n] Y
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ctypes] Archive in cache
[ocamlfind] Archive in cache
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of conf-ncurses failed at "pkg-config ncurses".
#=== ERROR while installing conf-ncurses.1 ====================================#
# opam-version 1.2.2
# os linux
# command pkg-config ncurses
# path ~/.opam/4.02.1/build/conf-ncurses.1
# compiler 4.02.1
# exit-code 1
# env-file ~/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.env
# stdout-file ~/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.out
# stderr-file ~/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.err
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions were aborted
∗ install base-bytes base
∗ install ctypes 0.5.1
∗ install ocamlfind 1.6.2
The following actions failed
∗ install conf-ncurses 1
No changes have been performed
=-=- conf-ncurses.1 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing. `opam depext conf-ncurses.1' may help you find the correct installation for your system.
I have already installed the dependencies but still I am unable to install ncurses.
~$ opam depext conf-ncurses.1
# Detecting depexts using flags: x86_64 linux ubuntu
# The following system packages are needed:
# - ncurses-dev
# - pkg-config
# The following new OS packages need to be installed: ncurses-dev
Not running as root, the following command will be run through "sudo":
apt-get install -qq -yy ncurses-dev
[sudo] password for ask:
# OS packages installation successful
I wonder why I am facing these issues, ncurses-dev and pkg-config is already installed on my system.
Update on performing suggestions by Tobias :-
# Detecting depexts using flags: x86_64 linux ubuntu
# The following system packages are needed:
# - m4
# - ncurses-dev
# - pkg-config
# The following new OS packages need to be installed: ncurses-dev
Not running as root, the following command will be run through "sudo":
apt-get install -qq -yy ncurses-dev
# OS packages installation successful
The following actions will be performed:
∗ install conf-pkg-config 1.0 [required by ctypes]
∗ install conf-m4 1 [required by ocamlfind]
∗ install conf-ncurses 1 [required by ocamlfind]
∗ install ocamlfind 1.6.2 [required by ctypes]
∗ install base-bytes base [required by ctypes]
∗ install ctypes 0.5.1
===== ∗ 6 =====
Do you want to continue ? [Y/n] Y
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ctypes] Archive in cache
[ocamlfind] Archive in cache
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗ installed conf-pkg-config.1.0
∗ installed conf-m4.1
[ERROR] The compilation of conf-ncurses failed at "pkg-config ncurses".
#=== ERROR while installing conf-ncurses.1 ====================================#
# opam-version 1.2.2
# os linux
# command pkg-config ncurses
# path ~/.opam/4.03.0/build/conf-ncurses.1
# compiler 4.03.0
# exit-code 1
# env-file ~/.opam/4.03.0/build/conf-ncurses.1/conf-ncurses-10261-9b8556.env
# stdout-file ~/.opam/4.03.0/build/conf-ncurses.1/conf-ncurses-10261-9b8556.out
# stderr-file ~/.opam/4.03.0/build/conf-ncurses.1/conf-ncurses-10261-9b8556.err
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions were aborted
∗ install base-bytes base
∗ install ctypes 0.5.1
∗ install ocamlfind 1.6.2
The following actions failed
∗ install conf-ncurses 1
The following changes have been performed
∗ install conf-m4 1
∗ install conf-pkg-config 1.0
=-=- conf-ncurses.1 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing.
`opam depext conf-ncurses.1' may help you find the correct installation for
your system.
The former state can be restored with:
opam switch import "~/.opam/4.03.0/backup/state-20160410155208.export"
There's still no text in the error files.
Thanks.
When you are dealing with such erros, you can get more detail by looking the whole errors in the error file pointed out by opam, which is here :
cat /home/ask/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.err
Please note that you also have classical output here :
cat /home/ask/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.out
You may have additional informations that will allow you to end your installation. Sometimes some deps are forgotten in the depext command.
PS : I write here because I don't have enough reputation to ask precision in comment
try the following:
$ apt-get install libncurses5-dev
$ pkg-config --print-provides ncurses
to verify that both ncurses and pkg-config are installed and working correctly.
further diagnostics:
$ dpkg-query -L libncurses5-dev | grep pc$
# results for my machine
/usr/lib/x86_64-linux-gnu/pkgconfig/form.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/ncurses++.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/panel.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/ncurses.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/menu.pc
$ pkg-config --variable pc_path pkg-config
# results for my machine
/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
note that libncurses5-dev has installed its ncurses.pc file in a directory that is in pkg-config's default search path.
If that is not true for your system, try setting $PKG_CONFIG_PATH explicitly to point to where libncurses5-dev has installed ncurses.pc. (Also check that the file actually is there!)
This discussion may be helpful too: https://askubuntu.com/questions/210210/pkg-config-path-environment-variable/373217
In my system if I add
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/
and then execute
opam install conf-ncurses
it works