savonet / ocaml-taglib

OCaml bindings to taglib.
http://liquidsoap.info/
Other
10 stars 1 forks source link

compilation error Arch Linux ocaml 4.08.1 #10

Open waclena opened 4 years ago

waclena commented 4 years ago

I can no longer install ocaml-taglib 0.3.6 on Arch Linux (Arch taglib package 1.11.1-3), opam switch 4.08.1.

To make sure there's no problem with Arch's taglib package,I installed another Arch package with a taglib dependency (a C++ program), from source, and it compiled fine. But trying to install ocaml-taglib via opam blows up. Any ideas? Thanks for ocaml-taglib, which I've been using for years!

opam install taglib
The following actions will be performed:
  ∗ install taglib 0.3.6

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[taglib.0.3.6] found in cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of taglib failed at "/home/keith/.opam/opam-init/hooks/sandbox.sh build make".

#=== ERROR while compiling taglib.0.3.6 =======================================#
# context     2.0.6 | linux/x86_64 | ocaml-base-compiler.4.08.1 | https://opam.ocaml.org/#8a928a81
# path        ~/.opam/4.08.1/.opam-switch/build/taglib.0.3.6
# command     ~/.opam/opam-init/hooks/sandbox.sh build make
# exit-code   2
# env-file    ~/.opam/log/taglib-1579655-c61e7b.env
# output-file ~/.opam/log/taglib-1579655-c61e7b.out
### output ###
# [...]
# In file included from /usr/include/taglib/tfile.h:30,
#                  from /usr/include/taglib/fileref.h:29,
#                  from taglib_stubs.cc:44:
# /usr/include/taglib/taglib.h:47:10: fatal error: string: No such file or directory
#    47 | #include <string>
#       |          ^~~~~~~~
''
# compilation terminated.
# make[2]: *** [OCamlMakefile:1007: taglib_stubs.o] Error 1
# make[2]: Leaving directory '/home/keith/.opam/4.08.1/.opam-switch/build/taglib.0.3.6/src'
# make[1]: *** [OCamlMakefile:717: byte-code-library] Error 2
# make[1]: Leaving directory '/home/keith/.opam/4.08.1/.opam-switch/build/taglib.0.3.6/src'
# make: *** [Makefile:10: all] Error 2

<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build taglib 0.3.6
└─
╶─ No changes have been performed
zsh: exit 31    opam install taglib
waclena commented 4 years ago

Let me add that if I clone the git repo and run dune install it compiles and installs perfectly, so I guess this is just a problem with the opam file?

Et7f3 commented 1 year ago

I was able to compile with modify this value to true (use_standard_c_and_cxx_flags false)

replace (:include c_flags.sexp))) by :standard (:include c_flags.sexp)))in src/dune and use dune3