1 |
The */* x86_ ... in the use file and asking emerge to re-build the |
2 |
libraries is pretty cool for building both 64 and 32 bit libs. |
3 |
|
4 |
But it has it's problems, it seems. |
5 |
The library libcap fails to compile with some spectacular errors: |
6 |
|
7 |
---------------------------------- |
8 |
x86_64-pc-linux-gnu-gcc -m32 -O2 -pipe -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -g -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -g -fPIC -I/var/tmp/portage/sys-libs/libcap-2.24-r2/work/libcap-2.24-abi_x86_32.x86/libcap/../libcap/include/uapi -I/var/tmp/portage/sys-libs/libcap-2.24-r2/work/libcap-2.24-abi_x86_32.x86/libcap/../libcap/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Dlinux -c cap_file.c -o cap_file.o |
9 |
In file included from <command-line>:0:0: |
10 |
./_caps_output.gperf:71:80: error: unknown type name 'size_t' |
11 |
gperf_case_strncmp (register const char *s1, register const char *s2, register size_t n) |
12 |
^~~~~~ |
13 |
./_caps_output.gperf:96:53: error: unknown type name 'size_t' |
14 |
__cap_hash_name (register const char *str, register size_t len) |
15 |
^~~~~~ |
16 |
./_caps_output.gperf:197:55: error: unknown type name 'size_t' |
17 |
__cap_lookup_name (register const char *str, register size_t len) |
18 |
^~~~~~ |
19 |
./_caps_output.gperf:197:1: error: conflicting types for '__cap_lookup_name' |
20 |
__cap_lookup_name (register const char *str, register size_t len) |
21 |
^~~~~~~~~~~~~~~~~ |
22 |
./_caps_output.gperf:33:29: note: previous declaration of '__cap_lookup_name' was here |
23 |
const struct __cap_token_s *__cap_lookup_name(const char *, unsigned int); |
24 |
^~~~~~~~~~~~~~~~~ |
25 |
cap_text.c: In function 'cap_to_name': |
26 |
cap_text.c:291:2: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result] |
27 |
asprintf(&tmp, "%u", cap); |
28 |
^~~~~~~~~~~~~~~~~~~~~~~~~ |
29 |
make[1]: *** [Makefile:84: cap_text.o] Error 1 |
30 |
------------------------------------ |
31 |
|
32 |
If it can't find size_t then for some reason it fails to include |
33 |
pretty much any standard header. Which is supported by the |
34 |
"included from <command-line>" pip from gcc. Obviously, whatever |
35 |
generates the _caps_output.gperf file made a mistake, both not |
36 |
including the standard headers and also with declaration of the |
37 |
__cap_lookup_name() function. |
38 |
|
39 |
Considering that libcap builds happily on a 64-bit system and I assume |
40 |
would also build on 32-bit one, the problem must be with the magic |
41 |
required to build a 32-bit version on a 64-bit machine. |
42 |
|
43 |
Should it be considered a bug worthy of reporting? |
44 |
|
45 |
Thanks, |
46 |
|
47 |
Zoltan |