ocaml / opam-repository

Main public package repository for opam, the source package manager of OCaml.

Home Page:https://opam.ocaml.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

libvirt installation fails on OS X

MagnusS opened this issue · comments

Error message:

===== ERROR while installing libvirt.0.6.1.2 =====
# opam-version 1.1.1
# os           darwin
# command      make all
# path         /Users/magnus/.opam/system/build/libvirt.0.6.1.2
# compiler     system (4.01.0)
# exit-code    2
# env-file     /Users/magnus/.opam/system/build/libvirt.0.6.1.2/libvirt-13076-ffb3fd.env
# stdout-file  /Users/magnus/.opam/system/build/libvirt.0.6.1.2/libvirt-13076-ffb3fd.out
# stderr-file  /Users/magnus/.opam/system/build/libvirt.0.6.1.2/libvirt-13076-ffb3fd.err
### stdout ###
# ...[truncated]
# config.status: creating libvirt/Makefile
# config.status: creating examples/Makefile
# config.status: creating config.h
# for d in libvirt examples; do \
#     /Applications/Xcode.app/Contents/Developer/usr/bin/make -C $d all; \
#     if [ $? -ne 0 ]; then exit 1; fi; \
#   done
# rm -f .depend
# ocamlfind ocamldep -package unix  libvirt.mli libvirt_version.mli libvirt.ml libvirt_version.ml > .depend
# cc -g -O2 -I.. -I"/usr/local/lib/ocaml" -g -Wall -Werror -fPIC   -c -o libvirt_c.o libvirt_c.c
### stderr ###
# ...[truncated]
#       ~ ^  ~~~~
# ./libvirt_c_epilogue.c:141:9: error: comparison of 0 <= unsigned enum expression is always true [-Werror,-Wtautological-compare]
#   if (0 <= code && code <= MAX_VIR_DOMAIN)
#       ~ ^  ~~~~
# ./libvirt_c_epilogue.c:157:9: error: comparison of 0 <= unsigned enum expression is always true [-Werror,-Wtautological-compare]
#   if (0 <= code && code <= MAX_VIR_LEVEL)
#       ~ ^  ~~~~
#3 errors generated.
# make[1]: *** [libvirt_c.o] Error 1
# make: *** [all] Error 1

Works with:

CPPFLAGS="-Wno-error=tautological-compare -Wno-error=unused-function"  opam install libvirt

djs55/ocaml-libvirt is the maintainer's (@djs55) repo from https://libvirt.org/ocaml/ which has a version 0.6.1.4 released (but not including a fix for this issue, I believe). This issue needs to make its way back to one of those repositories.

and missing depext for osx as well.

fixed in #5121 and #5112