FS#41252 - [device-mapper][virtualbox] fail to build with device-mapper-2.02.107-1

Attached to Project: Arch Linux
Opened by Laurent Carlier (lordheavy) - Friday, 18 July 2014, 13:47 GMT
Last edited by Laurent Carlier (lordheavy) - Friday, 18 July 2014, 14:13 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Eric Belanger (Snowman)
Thomas Bächler (brain0)
Sébastien Luttringer (seblu)
Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Virtualbox fail to build with libdevmapper.h from device-mapper-2.02.107-1:

***** Checking libdevmapper *****
compiling the following source file:
#include <cstdio>
extern "C" {
#define private
#include <libdevmapper.h>
int main()
{
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:
https://git.fedorahosted.org/cgit/lvm2.git/commit/libdm/libdevmapper.h?id=100342605ce4a304b397665682d2ec555af5aa27
This task depends upon

Closed by  Laurent Carlier (lordheavy)
Friday, 18 July 2014, 14:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  device-mapper-2.02.107-2

Loading...