I tried to install the ocaml graphics package, but it fails. Any suggestions for how I can fix it?
~/Documents/Work/Code/OCaml with graphics: opam update
=-=- Updating package repositories =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[default: http] Command started
[default: http] Command started
[default] synchronized from https://opam.ocaml.org
~/Documents/Work/Code/OCaml with graphics: opam upgrade
Already up-to-date.
~/Documents/Work/Code/OCaml with graphics: opam install graphics
The following actions will be performed:
∗ install graphics 1.0
=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[graphics: ocamlc graphics.cma] Command started
[ERROR] The compilation of graphics failed at "ocamlc -custom graphics.cma -o
test".
#=== ERROR while installing graphics.1.0 ======================================#
# opam-version 1.2.2
# os darwin
# command ocamlc -custom graphics.cma -o test
# path /Users/Tim/.opam/system/build/graphics.1.0
# compiler system (4.04.0)
# exit-code 2
# env-file /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.env
# stdout-file /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.out
# stderr-file /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.err
### stderr ###
# File "_none_", line 1:
# Error: Cannot find file graphics.cma
=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions failed
∗ install graphics 1.0
No changes have been performed
=-=- graphics.1.0 troubleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package checks whether the Graphics library was compiled.
Other than the missing graphics package, my ocaml install is working fine.
Here are the contents of the files in ~/.opam/system/build/graphics.1.0
First, graphics-14648-7afd23.err:
File "_none_", line 1:
Error: Cannot find file graphics.cma
Then graphics-14648-7afd23.info:
# opam-version 1.2.2
# os darwin
# command ocamlc -custom graphics.cma -o test
# path /Users/Tim/.opam/system/build/graphics.1.0
# compiler system (4.04.0)
# env-file /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.env
# stdout-file /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.out
# stderr-file /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.err
And graphics-14648-7afd23.env:
PATH=/Users/Tim/.opam/system/bin:/Library/Frameworks/Python.framework/Versions/3.2/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/usr/local/bin
OCAML_TOPLEVEL_PATH=/Users/Tim/.opam/system/lib/toplevel
PERL5LIB=/Users/Tim/.opam/system/lib/perl5:
MANPATH=/Users/Tim/.opam/system/man:/opt/local/share/man:
OPAMSWITCH=system
OPAMUTF8MSGS=1
CAML_LD_LIBRARY_PATH=/Users/Tim/.opam/system/lib/stublibs:/usr/local/lib/ocaml/stublibs
SHELL=/bin/bash
TERM=dumb
TMPDIR=/var/folders/kv/kmn525v16kb2mz2hrhq3q4mh0000gn/T/
BASHRC_HAS_BEEN_RUN=1
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.8tP8Ej926f/Render
EMACSDATA=/Applications/Emacs.app/Contents/Resources/etc
OLDPWD=/Users/Tim/Documents/Work/Code
EMACSPATH=/Applications/Emacs.app/Contents/MacOS/bin
USER=Tim
EMACS=t
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.EXKwsf0Dz0/Listeners
TERMCAP=
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
COLUMNS=190
BASH_PROFILE_HAS_BEEN_RUN=1
PWD=/Users/Tim/Documents/Work/Code/OCaml with graphics
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
EMACSLOADPATH=/Applications/Emacs.app/Contents/Resources/site-lisp:/Applications/Emacs.app/Contents/Resources/lisp:/Applications/Emacs.app/Contents/Resources/leim
SHLVL=1
HOME=/Users/Tim
LOGNAME=Tim
INFOPATH=/Applications/Emacs.app/Contents/Resources/info:
DISPLAY=/private/tmp/com.apple.launchd.jPYPDR7RIj/org.macosforge.xquartz:0
INSIDE_EMACS=23.1.1,comint
EMACSDOC=/Applications/Emacs.app/Contents/Resources/etc
_=/usr/local/bin/opam
OPAM_PACKAGE_VERSION=1.0
OPAM_PACKAGE_NAME=graphics
MAKELEVEL=
MAKEFLAGS=
The final file, graphics-14648-7afd23.env, is empty.