-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opam compilation on Cygwin fails (opam-admin-cache) #4090
Labels
Comments
This is the script I’m using to compile on Windows. #!/bin/sh
# setup-x86_64 --root=C:\cygwin64 --quiet-mode --no-desktop --no-startmenu --packages=make,mingw64-x86_64-gcc-core,m4,patch --site "http://mirrors.kernel.org/sourceware/cygwin/"
# C:\cygwin64\bin\mintty -
# echo "none /cygdrive cygdrive noacl,binary,posix=0,user 0 0" > /etc/fstab
OCAML_VERSION=4.09.0
OCAML_PATH=ocaml-${OCAML_VERSION}
OPAM_VERSION=2.0.6
FLEXDLL_VERSION=0.37
PREFIX=/usr/local
BUILD=x86_64-pc-cygwin
HOST=x86_64-w64-mingw32
BUILDDIR=/cygdrive/c/ocaml_platform_build
MAKEFLAGS=-j$(nproc)
export MAKEFLAGS
CYGWIN="nodosfilewarning winsymlinks:native"
export CYGWIN
mkdir -p "$BUILDDIR"
cd "$BUILDDIR" || exit 1
curl -SLfs "https://github.com/ocaml/ocaml/archive/${OCAML_VERSION}.tar.gz" -o "${OCAML_VERSION}.tar.gz"
tar xf "${OCAML_VERSION}.tar.gz"
curl -SLfs "https://github.com/alainfrisch/flexdll/archive/${FLEXDLL_VERSION}.tar.gz" -o "${FLEXDLL_VERSION}.tar.gz"
tar xf "${FLEXDLL_VERSION}.tar.gz"
mv "flexdll-${FLEXDLL_VERSION}"/* "${OCAML_PATH}/flexdll/"
cd "${OCAML_PATH}" || exit 1
./configure --build="$BUILD" --host="$HOST" --prefix="$PREFIX"
make flexdll
make world.opt
make flexlink.opt
make install
cd "$BUILDDIR" || exit 1
curl -SLfs "https://github.com/ocaml/opam/releases/download/${OPAM_VERSION}/opam-full-${OPAM_VERSION}.tar.gz" -o "opam-full-${OPAM_VERSION}.tar.gz"
tar xf "opam-full-${OPAM_VERSION}.tar.gz"
OCAMLLIB="C:/cygwin64$PREFIX/lib/ocaml"
CAML_LD_LIBRARY_PATH="$OCAMLLIB/stublibs;$OCAMLLIB"
export OCAMLLIB
export CAML_LD_LIBRARY_PATH
cd "opam-full-${OPAM_VERSION}" || exit 1
./configure --build="$BUILD" --host="$HOST" --prefix="$PREFIX"
make lib-ext all -j1 OCAMLC='ocamlc -unsafe-string' OCAMLOPT='ocamlopt -unsafe-string'
make install
cd "$BUILDDIR" || exit 1
OPAMYES=true
export OPAMYES
opam --init -a --disable-sandboxing
eval $(opam env) It still fails on the same error. |
MisterDA
added a commit
to MisterDA/ocaml-platform
that referenced
this issue
Feb 26, 2020
Currently has a bug in the compilation of cmdliner, a dependency of Opam. See ocaml/opam#4090.
The error disappears when using master (8da623a). |
Finally found out! It was resolved with #3911 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
I’m trying to bootstrap OCaml+Opam in Cygwin.
I’ve set up the environment as described in the readme.
Then ran:
But I got this error in the last step:
What can be done to fix this?
Thanks!
The text was updated successfully, but these errors were encountered: