mmottl / gsl-ocaml

OCaml bindings to the GSL (GNU Scientific Library).
Other
36 stars 10 forks source link

installation via opam fails for 1.19.2 and 1.19.3 #18

Closed nilsbecker closed 7 years ago

nilsbecker commented 7 years ago

1.19.1 installs fine.

i get this error message:

#=== ERROR while installing gsl.1.19.2 ========================================#
# opam-version 1.2.2
# os           darwin
# command      ocaml setup.ml -doc
# path         /Users/nbecker/.opam/4.04.0+flambda/build/gsl.1.19.2
# compiler     4.04.0+flambda
# exit-code    1
# env-file     /Users/nbecker/.opam/4.04.0+flambda/build/gsl.1.19.2/gsl-22165-6d07ae.env
# stdout-file  /Users/nbecker/.opam/4.04.0+flambda/build/gsl.1.19.2/gsl-22165-6d07ae.out
# stderr-file  /Users/nbecker/.opam/4.04.0+flambda/build/gsl.1.19.2/gsl-22165-6d07ae.err
### stdout ###
# Backtrace:
# [...]
#                           - Building src/Gsl.mly
#               - Building src/gsl.odoc:
#                   - Failed to build all of these:
#                       - Building src/gsl.ml:
#                           - Failed to build all of these:
#                               - Building src/gsl.mly
#                               - Building src/gsl.mll
#                       - Building src/gsl.mli:
#                           - Building src/gsl.mly
### stderr ###
# E: Failure("Command ''/Users/nbecker/.opam/4.04.0+flambda/bin/ocamlbuild' API.docdir/index.html -docflags '-colorize-code -keep-code -charset utf-8' -tag debug' terminated with error code 6")

the .out file contains

Solver failed:
  Ocamlbuild knows of no rules that apply to a target named src/Gsl.mly. This can happen if you ask Ocamlbuild to build a target with the wrong extension (e.g. .opt instead of .native) or if the source files live in directories that have not been specified as include directories.
Backtrace:
  - Failed to build the target API.docdir/index.html
      - Building API.docdir/index.html:
          - Failed to build all of these:
              - Building src/Gsl.odoc:
                  - Failed to build all of these:
                      - Building src/Gsl.ml:
                          - Failed to build all of these:
                              - Building src/Gsl.mly
                              - Building src/Gsl.mll
                      - Building src/Gsl.mli:
                          - Building src/Gsl.mly
              - Building src/gsl.odoc:
                  - Failed to build all of these:
                      - Building src/gsl.ml:
                          - Failed to build all of these:
                              - Building src/gsl.mly
                              - Building src/gsl.mll
                      - Building src/gsl.mli:
                          - Building src/gsl.mly

the .err file contains what is already given above. this is on mac os x.

mmottl commented 7 years ago

I'm afraid, but I don't know what could be going wrong there. I have built GSL on Mac OS X and CentOS Linux without problems, and the package passes all CI tests on all platforms tested by OPAM. If you find out what's different on your platform and how to fix it, please send more details. You may need to build manually from source to identify the problem.

nilsbecker commented 7 years ago

ok, i will have to experiment. maybe with a new switch to start.

nilsbecker commented 7 years ago

i tried on new switches; 4.02.1 and 4.04.0. both times i get the same behavior. i suspected my local gsl installation to be too new. (2.3) however it is not easy for me to downgrade to 2.0, since homebrew does not provide a way to do that. the only thing they offer is 2.2.1 which gives the same error, and 1.16 which gives a different error.

nilsbecker commented 7 years ago

aha! OPAMBUILDDOC=true was set in my environment. with that set to false i can install 1.19.3. i remember setting that to increase chances that i get documentation. is that still advisable?

mmottl commented 7 years ago

I actually never test with OPAMBUILDDOC=true. At some point in the future I may make sure that this works, too. I guess the issue can be closed, since the build issue can be solved by the user.