ocaml-opam / opam-depext

Attempt to automate the installation of system packages required by OPAM packages
Other
33 stars 28 forks source link

Sys_error "Bad file descriptor" on AppVeyor #119

Closed sagotch closed 4 years ago

sagotch commented 5 years ago

See for instance this build: https://ci.appveyor.com/project/sagotch/geneweb/builds/23805741#L207

%CYG_BASH% 'opam depext geneweb.dev'
Opam plugin "depext" is not installed. Install it on the current switch? [Y/n] y
The following actions will be performed:
  - install opam-depext 1.1.2
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[opam-depext.1.1.2] downloaded from https://github.com/ocaml/opam-depext/releases/download/v1.1.2/opam-depext-full-1.1.2.tbz
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed opam-depext.1.1.2
Done.
# Run eval $(opam env) to update the current shell environment
<><> Carrying on to "C:\cygwin64\usr\local\bin\opam.exe depext geneweb.dev" <><>
# Detecting depexts using vars: arch=x86_64, os=win32, os-distribution=win32, os-family=windows
# The following system packages are needed:
Fatal error: exception Sys_error("Bad file descriptor")
Command exited with code 2

The appveyor.yml file used is this one:

platform:
  - x64

environment:
  CYG_ROOT: 'C:\cygwin64'
  CYG_BASH: 'C:\cygwin64\bin\bash -lc'

install:
  - 'set OPAMYES=1'
  - '%CYG_ROOT%\setup-x86_64.exe -qnNdO -R %CYG_ROOT% -s http://cygwin.mirror.constant.com -l C:\cygwin\var\cache\setup -P diffutils -P git -P make -P m4 -P patch -P perl -P rsync -P unzip -P mingw64-x86_64-gcc-core'
  - '%CYG_BASH% ''curl -fsSL -o opam64.tar.xz "https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam64.tar.xz"'''
  - '%CYG_BASH% ''tar -xf opam64.tar.xz'''
  - '%CYG_BASH% ''opam64/install.sh'''
  - '%CYG_BASH% ''opam init default "https://github.com/fdopen/opam-repository-mingw.git#opam2" -c "ocaml-variants.4.07.1+mingw64" --disable-sandboxing'''
  - '%CYG_BASH% ''eval $(ocaml-env cygwin)'''
  - '%CYG_BASH% ''opam update'''
  - '%CYG_BASH% ''opam pin add --no-action -k path geneweb.dev ${APPVEYOR_BUILD_FOLDER}'''
  - '%CYG_BASH% ''opam depext geneweb.dev'''
  - '%CYG_BASH% ''opam install geneweb.dev --deps-only'''

build_script:
  - '%CYG_BASH% ''cd ${APPVEYOR_BUILD_FOLDER} && ./configure && make distrib'''
rjbou commented 4 years ago

External dependencies handling is integrated in opam (since 2.1.0-alpha). If this is still an issue, please open one in opam bugtracker. Thanks!