Fail to compile source with --enable-static
Issue 41 by matrix.use.li... on 2009-11-07 18:44:22:
Hi,
when i try to compile with --enable-static i receive this error:
/usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib/libdevmapper.a(libdm-common.o):
In function `_add_dev_node':
(.text+0x169d): warning: the use of `mktemp' is dangerous, better use
`mkstemp' or `mkdtemp'
/usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib/libdevmapper.a(libdm-common.o):
In function `dm_set_selinux_context':
(.text+0x13f9): undefined reference to `is_selinux_enabled'
/usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib/libdevmapper.a(libdm-common.o):
In function `dm_set_selinux_context':
(.text+0x1411): undefined reference to `matchpathcon'
/usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib/libdevmapper.a(libdm-common.o):
In function `dm_set_selinux_context':
(.text+0x1461): undefined reference to `lsetfilecon'
/usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib/libdevmapper.a(libdm-common.o):
In function `dm_set_selinux_context':
(.text+0x1473): undefined reference to `freecon'
/usr/lib/gcc/x86_64-linux-gnu/4.3.4/../../../../lib/libdevmapper.a(libdm-common.o):
In function `dm_set_selinux_context':
(.text+0x158a): undefined reference to `freecon'
collect2: ld returned 1 exit status
make[2]: *** [cryptsetup] Error 1
For reproduce this issue:
1) checkout
2) ./autogen.sh --enable-static
Tested on:
- debian-testing (squeeze) 2.6.31.5 x86_64
- debian-stable (lenny) 2.6.31 x86
In attachment autogen/make output (squeeze)
Good work
Gabriele