This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/21604] New: glibc fails to build with a gcc/musl toolchain
- From: "sam.thursfield at codethink dot co.uk" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 16 Jun 2017 16:30:02 +0000
- Subject: [Bug libc/21604] New: glibc fails to build with a gcc/musl toolchain
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=21604
Bug ID: 21604
Summary: glibc fails to build with a gcc/musl toolchain
Product: glibc
Version: 2.25
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: sam.thursfield at codethink dot co.uk
CC: drepper.fsp at gmail dot com
Target Milestone: ---
I get a build failure in the sunrpc/ subdirectory when building GLIBC on Alpine
Linux 3.6.1.
The toolchain has a target of `x86_64-alpine-linux-musl` so it's perhaps not
officially supported by GLIBC. However this issue is the only thing that
prevents GLIBC 2.25 from compiling in that environment so it would be
worthwhile to fix it.
musl libc defines certain types in its sys/types.h when _GNU_SOURCE or
_BSD_SOURCE is set, such as `u_char`, `u_short`, and `caddr_t`.
See: http://git.musl-libc.org/cgit/musl/tree/include/sys/types.h#n59
These are redefined inside GLIBC in `sunrpc/rpc/types.h`, causing 'conflicting
types' issues.
If GLIBC could detect the existance of these symbols at configure-time in the
host libc it could then #ifdef away the redefinitions appropriately.
This is the full error output:
gcc -D_RPC_THREAD_SAFE_ -D_GNU_SOURCE -DIS_IN_build -include
/buildstream/build/o/config.h rpc_clntout.c \
-o /buildstream/build/o/sunrpc/cross-rpc_clntout.o -MMD -MP -MF
/buildstream/build/o/sunrpc/cross-rpc_clntout.o.dt -MT
/buildstream/build/o/sunrpc/cross-rpc_clntout.o -c
In file included from rpc_parse.c:39:0:
rpc/types.h:78:9: error: unknown type name '__u_char'
typedef __u_char u_char;
^~~~~~~~
rpc/types.h:78:18: error: conflicting types for 'u_char'
typedef __u_char u_char;
^~~~~~
In file included from rpc/types.h:69:0,
from rpc_parse.c:39:
/usr/include/sys/types.h:64:23: note: previous declaration of 'u_char' was
here
typedef unsigned char u_char;
^~~~~~
In file included from rpc_parse.c:39:0:
rpc/types.h:79:9: error: unknown type name '__u_short'
typedef __u_short u_short;
^~~~~~~~~
rpc/types.h:79:19: error: conflicting types for 'u_short'
typedef __u_short u_short;
^~~~~~~
In file included from rpc/types.h:69:0,
from rpc_parse.c:39:
/usr/include/sys/types.h:65:24: note: previous declaration of 'u_short' was
here
typedef unsigned short u_short, ushort;
^~~~~~~
In file included from rpc_parse.c:39:0:
rpc/types.h:80:9: error: unknown type name '__u_int'
typedef __u_int u_int;
^~~~~~~
rpc/types.h:80:17: error: conflicting types for 'u_int'
typedef __u_int u_int;
^~~~~
In file included from rpc/types.h:69:0,
from rpc_parse.c:39:
/usr/include/sys/types.h:66:18: note: previous declaration of 'u_int' was
here
typedef unsigned u_int, uint;
^~~~~
In file included from rpc_parse.c:39:0:
rpc/types.h:81:9: error: unknown type name '__u_long'
typedef __u_long u_long;
^~~~~~~~
rpc/types.h:81:18: error: conflicting types for 'u_long'
typedef __u_long u_long;
^~~~~~
In file included from rpc/types.h:69:0,
from rpc_parse.c:39:
/usr/include/sys/types.h:67:23: note: previous declaration of 'u_long' was
here
typedef unsigned long u_long, ulong;
^~~~~~
In file included from rpc_parse.c:39:0:
rpc/types.h:82:9: error: unknown type name '__quad_t'
typedef __quad_t quad_t;
^~~~~~~~
rpc/types.h:82:18: error: conflicting types for 'quad_t'
typedef __quad_t quad_t;
^~~~~~
In file included from rpc/types.h:69:0,
from rpc_parse.c:39:
/usr/include/sys/types.h:68:19: note: previous declaration of 'quad_t' was
here
typedef long long quad_t;
^~~~~~
In file included from rpc_parse.c:39:0:
rpc/types.h:83:9: error: unknown type name '__u_quad_t'
typedef __u_quad_t u_quad_t;
^~~~~~~~~~
rpc/types.h:83:20: error: conflicting types for 'u_quad_t'
typedef __u_quad_t u_quad_t;
^~~~~~~~
In file included from rpc/types.h:69:0,
from rpc_parse.c:39:
/usr/include/sys/types.h:69:28: note: previous declaration of 'u_quad_t'
was here
typedef unsigned long long u_quad_t;
^~~~~~~~
In file included from rpc_parse.c:39:0:
rpc/types.h:84:9: error: unknown type name '__fsid_t'
typedef __fsid_t fsid_t;
^~~~~~~~
rpc/types.h:88:9: error: unknown type name '__daddr_t'
typedef __daddr_t daddr_t;
^~~~~~~~~
rpc/types.h:90:9: error: unknown type name '__caddr_t'
typedef __caddr_t caddr_t;
^~~~~~~~~
rpc/types.h:90:19: error: conflicting types for 'caddr_t'
typedef __caddr_t caddr_t;
^~~~~~~
In file included from rpc/types.h:69:0,
from rpc_parse.c:39:
/usr/include/sys/types.h:63:15: note: previous declaration of 'caddr_t' was
here
typedef char *caddr_t;
^~~~~~~
In file included from rpc_clntout.c:34:0:
rpc/types.h:78:9: error: unknown type name '__u_char'
typedef __u_char u_char;
^~~~~~~~
rpc/types.h:78:18: error: conflicting types for 'u_char'
typedef __u_char u_char;
^~~~~~
In file included from rpc/types.h:69:0,
from rpc_clntout.c:34:
/usr/include/sys/types.h:64:23: note: previous declaration of 'u_char' was
here
typedef unsigned char u_char;
^~~~~~
In file included from rpc_clntout.c:34:0:
rpc/types.h:79:9: error: unknown type name '__u_short'
typedef __u_short u_short;
^~~~~~~~~
rpc/types.h:79:19: error: conflicting types for 'u_short'
typedef __u_short u_short;
^~~~~~~
In file included from rpc/types.h:69:0,
from rpc_clntout.c:34:
/usr/include/sys/types.h:65:24: note: previous declaration of 'u_short' was
here
typedef unsigned short u_short, ushort;
^~~~~~~
In file included from rpc_clntout.c:34:0:
rpc/types.h:80:9: error: unknown type name '__u_int'
typedef __u_int u_int;
^~~~~~~
rpc/types.h:80:17: error: conflicting types for 'u_int'
typedef __u_int u_int;
^~~~~
In file included from rpc/types.h:69:0,
from rpc_clntout.c:34:
/usr/include/sys/types.h:66:18: note: previous declaration of 'u_int' was
here
typedef unsigned u_int, uint;
^~~~~
In file included from rpc_clntout.c:34:0:
rpc/types.h:81:9: error: unknown type name '__u_long'
typedef __u_long u_long;
^~~~~~~~
rpc/types.h:81:18: error: conflicting types for 'u_long'
typedef __u_long u_long;
^~~~~~
In file included from rpc/types.h:69:0,
from rpc_clntout.c:34:
/usr/include/sys/types.h:67:23: note: previous declaration of 'u_long' was
here
typedef unsigned long u_long, ulong;
^~~~~~
In file included from rpc_clntout.c:34:0:
rpc/types.h:82:9: error: unknown type name '__quad_t'
typedef __quad_t quad_t;
^~~~~~~~
rpc/types.h:82:18: error: conflicting types for 'quad_t'
typedef __quad_t quad_t;
^~~~~~
In file included from rpc/types.h:69:0,
from rpc_clntout.c:34:
/usr/include/sys/types.h:68:19: note: previous declaration of 'quad_t' was
here
typedef long long quad_t;
^~~~~~
In file included from rpc_clntout.c:34:0:
rpc/types.h:83:9: error: unknown type name '__u_quad_t'
typedef __u_quad_t u_quad_t;
^~~~~~~~~~
rpc/types.h:83:20: error: conflicting types for 'u_quad_t'
typedef __u_quad_t u_quad_t;
^~~~~~~~
In file included from rpc/types.h:69:0,
from rpc_clntout.c:34:
/usr/include/sys/types.h:69:28: note: previous declaration of 'u_quad_t'
was here
typedef unsigned long long u_quad_t;
^~~~~~~~
In file included from rpc_clntout.c:34:0:
rpc/types.h:84:9: error: unknown type name '__fsid_t'
typedef __fsid_t fsid_t;
^~~~~~~~
rpc/types.h:88:9: error: unknown type name '__daddr_t'
typedef __daddr_t daddr_t;
^~~~~~~~~
rpc/types.h:90:9: error: unknown type name '__caddr_t'
typedef __caddr_t caddr_t;
^~~~~~~~~
rpc/types.h:90:19: error: conflicting types for 'caddr_t'
typedef __caddr_t caddr_t;
^~~~~~~
In file included from rpc/types.h:69:0,
from rpc_clntout.c:34:
/usr/include/sys/types.h:63:15: note: previous declaration of 'caddr_t' was
here
typedef char *caddr_t;
^~~~~~~
make[2]: *** [Makefile:167: /buildstream/build/o/sunrpc/cross-rpc_parse.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:167:
/buildstream/build/o/sunrpc/cross-rpc_clntout.o] Error 1
make[2]: Leaving directory '/buildstream/build/sunrpc'
make[1]: *** [Makefile:215: sunrpc/others] Error 2
make[1]: Leaving directory '/buildstream/build'
make: *** [Makefile:9: all] Error 2
--
You are receiving this mail because:
You are on the CC list for the bug.