mirage / jitsu

A DNS server that automatically starts unikernels on demand

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

opam failed to install libvirt

carlos-molina opened this issue · comments

I tried to explore jitsu on my Mac but failed to deploy the libvirt library

% opam install dns lwt libvirt cmdliner
...
=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Building libvirt.0.6.1.2:
./configure
make all
make opt
make install-opt
[ERROR] The compilation of libvirt.0.6.1.2 failed.
Removing libvirt.0.6.1.2.
ocamlfind remove libvirt

=== ERROR while installing libvirt.0.6.1.2 ===================================

opam-version 1.2.0

os darwin

command ./configure

path /Users/carlosmolina/.opam/system/build/libvirt.0.6.1.2

compiler system (4.02.1)

exit-code 1

env-file /Users/carlosmolina/.opam/system/build/libvirt.0.6.1.2/libvirt-4505-c61e7b.env

stdout-file /Users/carlosmolina/.opam/system/build/libvirt.0.6.1.2/libvirt-4505-c61e7b.out

stderr-file /Users/carlosmolina/.opam/system/build/libvirt.0.6.1.2/libvirt-4505-c61e7b.err

stdout

...[truncated]

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for a BSD-compatible install... /usr/bin/install -c

checking how to run the C preprocessor... gcc -E

checking for function prototypes... yes

checking whether gcc and cc understand -c and -o together... yes

checking build system type... i386-apple-darwin13.4.0

checking host system type... i386-apple-darwin13.4.0

checking for virConnectOpen in -lvirt... no

stderr

configure: error: You must install libvirt library

This is probably related to ocaml/opam-repository#2621. Does it work if you install libvirt with this command?

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

No, it didn't help, I'm afraid. It seems to be the same issue as #2621!

I) My platform

  1. opam --version
    1.2.0

  2. OS X Version 10.9.5

  3. OCaml version 4.02.1

II) -------------------ERROR message-----------------------------------

bash-3.2$ CPPFLAGS="-Wno-error=tautological-compare -Wno-error=unused-function" opam install libvirt
The following actions will be performed:

  • install libvirt.0.6.1.2
    === 1 to install ===

=-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Building libvirt.0.6.1.2:
./configure
make all
make opt
make install-opt
[ERROR] The compilation of libvirt.0.6.1.2 failed.
Removing libvirt.0.6.1.2.
ocamlfind remove libvirt

#=== ERROR while installing libvirt.0.6.1.2 ===================================#

opam-version 1.2.0

os darwin

command ./configure

path /Users/carlosmolina/.opam/system/build/libvirt.0.6.1.2

compiler system (4.02.1)

exit-code 1

env-file /Users/carlosmolina/.opam/system/build/libvirt.0.6.1.2/libvirt-6017-c61e7b.env

stdout-file /Users/carlosmolina/.opam/system/build/libvirt.0.6.1.2/libvirt-6017-c61e7b.out

stderr-file /Users/carlosmolina/.opam/system/build/libvirt.0.6.1.2/libvirt-6017-c61e7b.err

stdout

...[truncated]

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ISO C89... none needed

checking for a BSD-compatible install... /usr/bin/install -c

checking how to run the C preprocessor... gcc -E

checking for function prototypes... yes

checking whether gcc and cc understand -c and -o together... yes

checking build system type... i386-apple-darwin13.4.0

checking host system type... i386-apple-darwin13.4.0

checking for virConnectOpen in -lvirt... no

stderr

configure: error: You must install libvirt library

bash-3.2$

Ah - did you install libvirtd first? You should be able to install it with homebrew: brew install libvirt

I tried but get linking errors.

Did you install libvirt under ‘sudo’?

Carlos

bash-3.2$ brew install libvirt
==> Installing dependencies for libvirt: libtasn1, gmp, nettle, gnutls, libgpg-error, libgcrypt, yajl
==> Installing libvirt dependency: libtasn1
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libtasn1-4.2.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libtasn1-4.2.mavericks.bottle.tar.gz
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/pkgconfig/libtasn1.pc
/usr/local/lib/pkgconfig is not writable.

You can try again using:
brew link libtasn1
==> Summary
🍺 /usr/local/Cellar/libtasn1/4.2: 55 files, 568K
==> Installing libvirt dependency: gmp
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gmp-6.0.0a.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gmp-6.0.0a.mavericks.bottle.tar.gz
🍺 /usr/local/Cellar/gmp/6.0.0a: 15 files, 3.2M
==> Installing libvirt dependency: nettle
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/nettle-2.7.1.mavericks.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring nettle-2.7.1.mavericks.bottle.1.tar.gz
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/pkgconfig/hogweed.pc
/usr/local/lib/pkgconfig is not writable.

You can try again using:
brew link nettle
==> Summary
🍺 /usr/local/Cellar/nettle/2.7.1: 66 files, 1.7M
==> Installing libvirt dependency: gnutls

==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/gnutls-3.3.10.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring gnutls-3.3.10.mavericks.bottle.tar.gz
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/pkgconfig/gnutls.pc
/usr/local/lib/pkgconfig is not writable.

You can try again using:
brew link gnutls
==> Summary
🍺 /usr/local/Cellar/gnutls/3.3.10: 1021 files, 9.0M
==> Installing libvirt dependency: libgpg-error
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libgpg-error-1.17.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libgpg-error-1.17.mavericks.bottle.tar.gz
🍺 /usr/local/Cellar/libgpg-error/1.17: 17 files, 332K
==> Installing libvirt dependency: libgcrypt
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libgcrypt-1.6.2.mavericks.bottle.3.tar.gz
######################################################################## 100.0%
==> Pouring libgcrypt-1.6.2.mavericks.bottle.3.tar.gz
🍺 /usr/local/Cellar/libgcrypt/1.6.2: 18 files, 1.3M
==> Installing libvirt dependency: yajl
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/yajl-2.1.0.mavericks.bottle.3.tar.gz
######################################################################## 100.0%
==> Pouring yajl-2.1.0.mavericks.bottle.3.tar.gz
🍺 /usr/local/Cellar/yajl/2.1.0: 15 files, 232K
==> Installing libvirt
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libvirt-1.2.10.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libvirt-1.2.10.mavericks.bottle.tar.gz
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/pkgconfig/libvirt-lxc.pc

/usr/local/lib/pkgconfig is not writable.

You can try again using:
brew link libvirt
==> Summary
🍺 /usr/local/Cellar/libvirt/1.2.10: 197 files, 18M
bash-3.2$

bash-3.2$ brew install libvirt
Warning: libvirt-1.2.10 already installed, it's just not linked
bash-3.2$

On 31 Mar 2015, at 21:58, Magnus Skjegstad notifications@github.com wrote:

Ah - did you install libvirtd first? You should be able to install it with homebrew: brew install libvirt


Reply to this email directly or view it on GitHub.

You should not use sudo with brew. Seems that your installation has a problem. Run

sudo chown -R carlosmolina /usr/local
brew link libtasn1
brew link nettle
brew link gnutls
brew link libvirt

Thanks samoht. That solves the installation problem of libvirt.

Mind you that before running '% make' you need to run

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

which is related to issue #2621 ; without that 'ocamlfind' is not able to find libvirt.

I'll see if I can run the actual jitsu now.

Cheers,

Carlos