[device-mapper][virtualbox] fail to build with device-mapper-2.02.107-1
Virtualbox fail to build with libdevmapper.h from
device-mapper-2.02.107-1:
***** Checking libdevmapper *****
compiling the following source file:
#include
extern “C” {
#define private
#include
{
char version[80];
if (!dm_get_library_version(version, sizeof(version)))
{
printf(“dm_get_library_version() failed.\n”);
return 1;
}
const char* v=version;
unsigned int major = 0, minor = 0, micro = 0;
for (; *v !=’.’ && *v != ‘\0’; v++) major = major*10
+ *v-‘0’;
if (*v == ‘.’) v++;
for (; *v !=’.’ && *v != ‘\0’; v++) minor = minor*10
+ *v-‘0’;
if (*v == ‘.’) v++;
for (; *v !=’.’ && *v != ‘\0’; v++) micro = micro*10
+ *v-‘0’;
printf(“found version %s”, version);
if (major*10000 + minor*100 + micro >= 10200)
{
printf(“, OK.\n”);
return 0;
}
else
{
printf(“, expected version 1.02 or higher\n”);
return 1;
}
}
}
using the following command line:
g++ -g -O -Wall -o
/build/virtualbox/src/VirtualBox-4.3.14/.tmp_out
/build/virtualbox/src/VirtualBox-4.3.14/.tmp_src.cc
“-ldevmapper “
In file included from
/build/virtualbox/src/VirtualBox-4.3.14/.tmp_src.cc:4:0:
/usr/include/libdevmapper.h:1663:13: error: duplicate
‘const’
const void const *value; /* reserved value:
^
Bug is already fixed upstream with:
git.fedorahosted.org/cgit/lvm2.git/commit/libdm/libdevmapper.h?id=100342605ce4a304b397665682d2ec555af5aa27
Read more here: Source link