Странная ошибка при создании crosstool-ng для архитектуры mipsel под Alpine в Docker - PullRequest
0 голосов
/ 19 октября 2019

Как видно из заголовка, я получаю странную ошибку при создании crosstool-ng для архитектуры mipsel в Alpine в Docker. Есть идеи? Для меня это выглядит как несовместимость между набором инструментов хоста и целевым набором инструментов, но я не эксперт в такого рода вещах.

Вот мой Dockerfile:

FROM alpine:3.10.2
RUN apk add bash
SHELL ["/bin/bash", "-c"]
RUN apk add build-base
RUN set -o xtrace ; set -o errexit ; set -o nounset ; set -o pipefail ; mkdir -p /opt/ctng ; cd /opt/ctng ; wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.24.0.tar.bz2 ; [ "$(sha256sum ./crosstool-ng-1.24.0.tar.bz2 | cut -d " " -f 1)" == "d200d1ea5e2056c60d2b11b3f2721d30e53e817e1e0050fffaca074864e2f523" ] ; tar -xf ./crosstool-ng-1.24.0.tar.bz2 ; mv ./crosstool-ng-1.24.0 ./ctng
RUN apk add flex
RUN apk add texinfo
RUN apk add xz
RUN apk add help2man
RUN apk add gawk
RUN apk add libtool
RUN apk add ncurses-dev
RUN apk add gettext-dev
RUN apk add wget
RUN apk add patch
RUN apk add bison
RUN apk add libc-dev
RUN set -o xtrace ; set -o errexit ; set -o nounset ; set -o pipefail ; cd /opt/ctng/ctng ; ./configure --enable-local ; make
RUN set -o xtrace ; set -o errexit ; set -o nounset ; set -o pipefail ; cd /opt/ctng/ctng ; ./ct-ng mipsel-unknown-linux-gnu ; echo -n -e "CT_EXPERIMENTAL=y\nCT_ALLOW_BUILD_AS_ROOT=y\nCT_ALLOW_BUILD_AS_ROOT_SURE=y\n" >>./.config ; mkdir -p /root/src ; time ./ct-ng build CT_JOBS=`nproc`

Вот соответствующий build.log вывод:

[ALL  ]      x86_64-build_pc-linux-gnu-gcc  -O2 -g -I/opt/ctng/ctng/.build/mipsel-unknown-linux-gnu/buildtools/include    -D_GNU_SOURCE -DIS_IN_build -include /opt/ctng/ctng/.build/mipsel-unknown-linux-gnu/build/build-libc-startfiles/multilib/config.h rpc_parse.c     -o /opt/ctng/ctng/.build/mipsel-unknown-linux-gnu/build/build-libc-startfiles/multilib/sunrpc/cross-rpc_parse.o -MMD -MP -MF /opt/ctng/ctng/.build/mipsel-unknown-linux-gnu/build/build-libc-startfiles/multilib/sunrpc/cross-rpc_parse.o.dt -MT /opt/ctng/ctng/.build/mipsel-unknown-linux-gnu/build/build-libc-startfiles/multilib/sunrpc/cross-rpc_parse.o -c
[ALL  ]      In file included from rpc_parse.c:39:
[ERROR]      rpc/types.h:78:9: error: unknown type name '__u_char'
[ALL  ]       typedef __u_char u_char;
[ALL  ]               ^~~~~~~~
[ERROR]      rpc/types.h:78:18: error: conflicting types for 'u_char'
[ALL  ]       typedef __u_char u_char;
[ALL  ]                        ^~~~~~
[ALL  ]      In file included from rpc/types.h:69,
[ALL  ]                       from rpc_parse.c:39:
[ALL  ]      /usr/include/sys/types.h:64:23: note: previous declaration of 'u_char' was here
[ALL  ]       typedef unsigned char u_char;
[ALL  ]                             ^~~~~~
[ALL  ]      In file included from rpc_parse.c:39:
[ERROR]      rpc/types.h:79:9: error: unknown type name '__u_short'
[ALL  ]       typedef __u_short u_short;
[ALL  ]               ^~~~~~~~~
[ERROR]      rpc/types.h:79:19: error: conflicting types for 'u_short'
[ALL  ]       typedef __u_short u_short;
[ALL  ]                         ^~~~~~~
[ALL  ]      In file included from rpc/types.h:69,
[ALL  ]                       from rpc_parse.c:39:
[ALL  ]      /usr/include/sys/types.h:65:24: note: previous declaration of 'u_short' was here
[ALL  ]       typedef unsigned short u_short, ushort;
[ALL  ]                              ^~~~~~~
[ALL  ]      In file included from rpc_parse.c:39:
[ERROR]      rpc/types.h:80:9: error: unknown type name '__u_int'
[ALL  ]       typedef __u_int u_int;
[ALL  ]               ^~~~~~~
[ERROR]      rpc/types.h:80:17: error: conflicting types for 'u_int'
[ALL  ]       typedef __u_int u_int;
[ALL  ]                       ^~~~~
[ALL  ]      In file included from rpc/types.h:69,
[ALL  ]                       from rpc_parse.c:39:
[ALL  ]      /usr/include/sys/types.h:66:18: note: previous declaration of 'u_int' was here
[ALL  ]       typedef unsigned u_int, uint;
[ALL  ]                        ^~~~~
[ALL  ]      In file included from rpc_parse.c:39:
[ERROR]      rpc/types.h:81:9: error: unknown type name '__u_long'
[ALL  ]       typedef __u_long u_long;
[ALL  ]               ^~~~~~~~
[ERROR]      rpc/types.h:81:18: error: conflicting types for 'u_long'
[ALL  ]       typedef __u_long u_long;
[ALL  ]                        ^~~~~~
[ALL  ]      In file included from rpc/types.h:69,
[ALL  ]                       from rpc_parse.c:39:
[ALL  ]      /usr/include/sys/types.h:67:23: note: previous declaration of 'u_long' was here
[ALL  ]       typedef unsigned long u_long, ulong;
[ALL  ]                             ^~~~~~
[ALL  ]      In file included from rpc_parse.c:39:
[ERROR]      rpc/types.h:82:9: error: unknown type name '__quad_t'
[ALL  ]       typedef __quad_t quad_t;
[ALL  ]               ^~~~~~~~
[ERROR]      rpc/types.h:82:18: error: conflicting types for 'quad_t'
[ALL  ]       typedef __quad_t quad_t;
[ALL  ]                        ^~~~~~
[ALL  ]      In file included from rpc/types.h:69,
[ALL  ]                       from rpc_parse.c:39:
[ALL  ]      /usr/include/sys/types.h:68:19: note: previous declaration of 'quad_t' was here
[ALL  ]       typedef long long quad_t;
[ALL  ]                         ^~~~~~
[ALL  ]      In file included from rpc_parse.c:39:
[ERROR]      rpc/types.h:83:9: error: unknown type name '__u_quad_t'
[ALL  ]       typedef __u_quad_t u_quad_t;
[ALL  ]               ^~~~~~~~~~
[ERROR]      rpc/types.h:83:20: error: conflicting types for 'u_quad_t'
[ALL  ]       typedef __u_quad_t u_quad_t;
[ALL  ]                          ^~~~~~~~
[ALL  ]      In file included from rpc/types.h:69,
[ALL  ]                       from rpc_parse.c:39:
[ALL  ]      /usr/include/sys/types.h:69:28: note: previous declaration of 'u_quad_t' was here
[ALL  ]       typedef unsigned long long u_quad_t;
[ALL  ]                                  ^~~~~~~~
[ALL  ]      In file included from rpc_parse.c:39:
[ERROR]      rpc/types.h:84:9: error: unknown type name '__fsid_t'
[ALL  ]       typedef __fsid_t fsid_t;
[ALL  ]               ^~~~~~~~
[ERROR]      rpc/types.h:88:9: error: unknown type name '__daddr_t'
[ALL  ]       typedef __daddr_t daddr_t;
[ALL  ]               ^~~~~~~~~
[ERROR]      rpc/types.h:89:9: error: unknown type name '__caddr_t'
[ALL  ]       typedef __caddr_t caddr_t;
[ALL  ]               ^~~~~~~~~
[ERROR]      rpc/types.h:89:19: error: conflicting types for 'caddr_t'
[ALL  ]       typedef __caddr_t caddr_t;
[ALL  ]                         ^~~~~~~
[ALL  ]      In file included from rpc/types.h:69,
[ALL  ]                       from rpc_parse.c:39:
[ALL  ]      /usr/include/sys/types.h:63:15: note: previous declaration of 'caddr_t' was here
[ALL  ]       typedef char *caddr_t;
[ALL  ]                     ^~~~~~~
[ERROR]      make[3]: *** [Makefile:174: /opt/ctng/ctng/.build/mipsel-unknown-linux-gnu/build/build-libc-startfiles/multilib/sunrpc/cross-rpc_parse.o] Error 1
[ERROR]      make[3]: *** Waiting for unfinished jobs....
[ALL  ]      make[3]: Leaving directory '/opt/ctng/ctng/.build/src/glibc-2.28/sunrpc'
[ERROR]      make[2]: *** [Makefile:258: sunrpc/install-headers] Error 2
[ALL  ]      make[2]: Leaving directory '/opt/ctng/ctng/.build/src/glibc-2.28'
[ERROR]      make[1]: *** [Makefile:9: install-headers] Error 2
[ALL  ]      make[1]: Leaving directory '/opt/ctng/ctng/.build/mipsel-unknown-linux-gnu/build/build-libc-startfiles/multilib'
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Building for multilib 1/1: '''
[ERROR]  >>        called in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'
...