Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.
This repository was archived by the owner on Mar 12, 2021. It is now read-only.

error: '_PATH_MOUNTED' undeclared #31

@valerytschopp

Description

@valerytschopp

I'm trying to build the Docker image but it fails when compiling libvirt 3.2.0

$ docker build -t kumina-libvirt-exporter .
...
storage/storage_backend_fs.c: In function 'virStorageBackendFileSystemIsMounted':
storage/storage_backend_fs.c:306:23: error: '_PATH_MOUNTED' undeclared (first use in this function); did you mean 'XPATH_POINT'?
  306 |     if ((mtab = fopen(_PATH_MOUNTED, "r")) == NULL) {
      |                       ^~~~~~~~~~~~~
      |                       XPATH_POINT
storage/storage_backend_fs.c:306:23: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [Makefile:10174: storage/libvirt_storage_backend_fs_la-storage_backend_fs.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
gcc: warning: switch '-Wchkp' is no longer supported
make[3]: Leaving directory '/tmp/libvirt-3.2.0/src'
make[2]: *** [Makefile:5941: all] Error 2
make[2]: Leaving directory '/tmp/libvirt-3.2.0/src'
make[1]: Leaving directory '/tmp/libvirt-3.2.0'
make[1]: *** [Makefile:2084: all-recursive] Error 1
make: *** [Makefile:1981: all] Error 2
The command '/bin/sh -c ./configure --disable-shared --enable-static --localstatedir=/var --without-storage-mpath &&     make -j2 &&     make install &&     sed -i 's/^Libs:.*/& -lnl -ltirpc -lxml2/' /usr/local/lib/pkgconfig/libvirt.pc' returned a non-zero code: 2
$

Any idea how to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions