guix: building for aarch64-linux-gnu on aarch64 fails #22458

issue fanquake openend this issue on July 15, 2021
  1. fanquake commented at 1:22 pm on July 15, 2021: member

    Running a Guix build of master (f002f8a0e76bd5abd60ef6809b1ff2b4c2d56071) using:

    0HOSTS="aarch64-linux-gnu" ./contrib/guix/guix-build
    

    on aarch64 hardware (Alpine Docker container, running on Apple M1) currently fails with the following:

     0cc1: error: no include path in which to search for stdc-predef.h
     1/gnu/store/lzf5zg0diw2bhh2qji4bl2v46wd8pylc-bash-minimal-5.1.8/bin/bash ../../gcc-10.3.0/gcc/../move-if-change tmp-macro_list macro_list
     2echo timestamp > s-macro_list
     3rm -rf include-fixed; mkdir include-fixed
     4chmod a+rx include-fixed
     5if [ -d ../prev-gcc ]; then \
     6  cd ../prev-gcc && \
     7  make real-install-headers-tar DESTDIR=`pwd`/../gcc/ \
     8    libsubdir=. ; \
     9else \
    10  set -e; for ml in `cat fixinc_list`; do \
    11    sysroot_headers_suffix=`echo ${ml} | sed -e 's/;.*$//'`; \
    12    multi_dir=`echo ${ml} | sed -e 's/^[^;]*;//'`; \
    13    fix_dir=include-fixed${multi_dir}; \
    14    if ! false && test ! -d `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`; then \
    15      echo The directory that should contain system headers does not exist: >&2 ; \
    16      echo "  `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" >&2 ; \
    17      tooldir_sysinc=`echo "/gnu/store/bp869rrz2z24yvjyma9kkj0alzxvqkc2-gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0-lib/lib/gcc/aarch64-linux-gnu/10.3.0/../../../../../../../aarch64-linux-gnu/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`; \
    18      if test "x`echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`" = "x${tooldir_sysinc}"; \
    19      then sleep 1; else exit 1; fi; \
    20    fi; \
    21    /gnu/store/lzf5zg0diw2bhh2qji4bl2v46wd8pylc-bash-minimal-5.1.8/bin/bash ../../gcc-10.3.0/gcc/../mkinstalldirs ${fix_dir}; \
    22    chmod a+rx ${fix_dir} || true; \
    23    (TARGET_MACHINE='aarch64-unknown-linux-gnu'; srcdir=`cd ../../gcc-10.3.0/gcc; ${PWDCMD-pwd}`; \
    24      SHELL='/gnu/store/lzf5zg0diw2bhh2qji4bl2v46wd8pylc-bash-minimal-5.1.8/bin/bash'; MACRO_LIST=`${PWDCMD-pwd}`/macro_list ; \
    25      gcc_dir=`${PWDCMD-pwd}` ; \
    26      export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
    27      cd ../build-aarch64-unknown-linux-gnu/fixincludes && \
    28      /gnu/store/lzf5zg0diw2bhh2qji4bl2v46wd8pylc-bash-minimal-5.1.8/bin/bash ./fixinc.sh "${gcc_dir}/${fix_dir}" \
    29        `echo /usr/include | sed -e :a -e 's,[^/]*/\.\.\/,,' -e ta`  ); \
    30    rm -f ${fix_dir}/syslimits.h; \
    31    if [ -f ${fix_dir}/limits.h ]; then \
    32      mv ${fix_dir}/limits.h ${fix_dir}/syslimits.h; \
    33    else \
    34      cp ../../gcc-10.3.0/gcc/gsyslimits.h ${fix_dir}/syslimits.h; \
    35    fi; \
    36    chmod a+r ${fix_dir}/syslimits.h; \
    37  done; \
    38fi
    39The directory that should contain system headers does not exist:
    40  /usr/include
    41make[3]: *** [Makefile:3172: stmp-fixinc] Error 1
    42make[3]: *** Waiting for unfinished jobs....
    43make[3]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0.drv-0/build/gcc'
    44make[2]: *** [Makefile:4688: all-stage1-gcc] Error 2
    45make[2]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0.drv-0/build'
    46make[1]: *** [Makefile:18381: stage1-bubble] Error 2
    47make[1]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0.drv-0/build'
    48make: *** [Makefile:946: all] Error 2
    

    Full build log.

  2. fanquake added the label Bug on Jul 15, 2021
  3. fanquake added the label Build system on Jul 15, 2021
  4. MarcoFalke commented at 2:39 pm on July 15, 2021: member
    See also #21194
  5. dongcarl commented at 2:02 am on July 16, 2021: contributor
    @fanquake Looks like the build log was truncated, can you send the full one?
  6. fanquake commented at 2:07 am on July 16, 2021: member

    @fanquake Looks like the build log was truncated, can you send the full one?

    If you click “raw” when looking at the gist, it should show you the full log.

  7. dongcarl commented at 2:12 am on July 16, 2021: contributor
    Ah thanks!
  8. dongcarl commented at 2:52 am on July 16, 2021: contributor

    @fanquake Could you try out this patch for me?

     0diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm
     1index 5805006053..414a596f17 100644
     2--- a/contrib/guix/manifest.scm
     3+++ b/contrib/guix/manifest.scm
     4@@ -93,9 +93,11 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
     5   (let* ((xbinutils (cross-binutils target))
     6          ;; 1. Build a cross-compiling gcc without targeting any libc, derived
     7          ;; from BASE-GCC-FOR-LIBC
     8-         (xgcc-sans-libc (cross-gcc target
     9-                                    #:xgcc base-gcc-for-libc
    10-                                    #:xbinutils xbinutils))
    11+         (xgcc-sans-libc (package-with-extra-configure-variable
    12+                          (cross-gcc target
    13+                                     #:xgcc base-gcc-for-libc
    14+                                     #:xbinutils xbinutils)
    15+                          "inhibit_libc" "true"))
    16          ;; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived
    17          ;; from BASE-KERNEL-HEADERS
    18          (xkernel (cross-kernel-headers target
    
  9. fanquake referenced this in commit ffd1b1240f on Jul 16, 2021
  10. fanquake referenced this in commit 29a6d264ed on Jul 16, 2021
  11. fanquake commented at 6:15 am on July 16, 2021: member

    @fanquake Could you try out this patch for me?

    Thanks for taking a look. I’ve just tried the patch, branch here, and it looks like it’s failing in the same way, however the full build log is available here: https://gist.github.com/fanquake/20487ae1b64cc57c215e7ce590501b92.

  12. dongcarl commented at 6:19 am on July 16, 2021: contributor
    @fanquake Might be a mistake on my end but wanted to verify: are you sure that you didn’t accidentally make it “inhibit_libcc” (with an extra c?) That’s what I’m seeing in the logs right now.
  13. fanquake referenced this in commit a9f9e4caf0 on Jul 16, 2021
  14. fanquake commented at 7:10 am on July 16, 2021: member

    Might be a mistake on my end but wanted to verify:

    Ugh, nope, that was my bad. Fixed up the patch and re-ran the build: https://gist.github.com/fanquake/c372618a8cf9a0445d1930e00744f1b4. Note that I also ran a guix gc and guix pull between this and the last build.

  15. dongcarl commented at 7:33 am on July 16, 2021: contributor
    @fanquake Huh… Do you mind building that specific derivation with --keep-failed and sending me the build directory as well? Gotta dig a bit.
  16. dongcarl commented at 11:40 pm on July 16, 2021: contributor

    Dug a bit, try:

     0diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm
     1index 5805006053..be556fc522 100644
     2--- a/contrib/guix/manifest.scm
     3+++ b/contrib/guix/manifest.scm
     4@@ -84,6 +84,16 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
     5   (package-with-extra-patches xbinutils
     6     (search-our-patches "binutils-mingw-w64-disable-flags.patch")))
     7 
     8+(define (bitcoin-cross-gcc-sans-libc target xgcc xbinutils)
     9+  (package
    10+    (inherit (cross-gcc target
    11+                        #:xgcc xgcc
    12+                        #:xbinutils xbinutils))
    13+    (arguments
    14+     (substitute-keyword-arguments (package-arguments xgcc)
    15+       ((#:make-flags flags)
    16+        `(cons "inhibit_libc=true" ,flags))))))
    17+
    18 (define (make-cross-toolchain target
    19                               base-gcc-for-libc
    20                               base-kernel-headers
    21@@ -93,9 +103,9 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
    22   (let* ((xbinutils (cross-binutils target))
    23          ;; 1. Build a cross-compiling gcc without targeting any libc, derived
    24          ;; from BASE-GCC-FOR-LIBC
    25-         (xgcc-sans-libc (cross-gcc target
    26-                                    #:xgcc base-gcc-for-libc
    27-                                    #:xbinutils xbinutils))
    28+         (xgcc-sans-libc (bitcoin-cross-gcc-sans-libc target
    29+                                                      base-gcc-for-libc
    30+                                                      xbinutils))
    31          ;; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived
    32          ;; from BASE-KERNEL-HEADERS
    33          (xkernel (cross-kernel-headers target
    
  17. sipa commented at 11:51 pm on July 16, 2021: member
    @dongcarl Have a branch?
  18. fanquake referenced this in commit e30f194b11 on Jul 16, 2021
  19. fanquake commented at 11:56 pm on July 16, 2021: member

    Have a branch?

    I’ve just updated https://github.com/fanquake/bitcoin/tree/test_22458_patch.

  20. dongcarl commented at 0:02 am on July 17, 2021: contributor

    Writing down some context for myself so I don’t forget:

    1. inhibit_libc is only AC_SUBST’d at the gcc/ sub-directory, but NOT at the top directory of the gcc repository
    2. GCC does not use AC_CONFIG_SUBDIRS for its subdirectories, rather, it runs ./configure for its subdirectories at make-time, this means that a flag supplied at ./configure-time at the top directory and not AC_SUBST’d would not be passed to ./configure at the subdirectory level.
  21. dongcarl commented at 0:03 am on July 17, 2021: contributor
    Also… I should get myself an aarch64 build box……
  22. fanquake commented at 1:31 am on July 17, 2021: member

    Tested with the updated patch:

     0make[3]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/gcc'
     1mkdir -p -- aarch64-unknown-linux-gnu/libgcc
     2Checking multilib configuration for libgcc...
     3Configuring stage 1 in aarch64-unknown-linux-gnu/libgcc
     4configure: creating cache ./config.cache
     5checking build system type... aarch64-unknown-linux-gnu
     6checking host system type... aarch64-unknown-linux-gnu
     7checking for --enable-version-specific-runtime-libs... no
     8checking for a BSD-compatible install... /gnu/store/wiv74mq31s0vppzm99qwnjkd8xa3albw-coreutils-8.32/bin/install -c
     9checking for gawk... gawk
    10checking for aarch64-unknown-linux-gnu-ar... ar
    11checking for aarch64-unknown-linux-gnu-lipo... lipo
    12checking for aarch64-unknown-linux-gnu-nm... /tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/./gcc/nm
    13checking for aarch64-unknown-linux-gnu-ranlib... ranlib
    14checking for aarch64-unknown-linux-gnu-strip... strip
    15checking whether ln -s works... yes
    16checking for aarch64-unknown-linux-gnu-gcc... /tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/./gcc/xgcc -B/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/./gcc/ -B/gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/bin/ -B/gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/lib/ -isystem /gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/include -isystem /gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/sys-include   
    17checking for suffix of object files... o
    18checking whether we are using the GNU C compiler... yes
    19checking whether /tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/./gcc/xgcc -B/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/./gcc/ -B/gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/bin/ -B/gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/lib/ -isystem /gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/include -isystem /gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/sys-include    accepts -g... yes
    20checking for /tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/./gcc/xgcc -B/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/./gcc/ -B/gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/bin/ -B/gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/lib/ -isystem /gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/include -isystem /gnu/store/0x6x96gvifjp5zhcj48s9cf29zb0ffil-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0/aarch64-unknown-linux-gnu/sys-include    option to accept ISO C89... none needed
    21checking how to run the C preprocessor... /lib/cpp
    22configure: error: in `/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build/aarch64-unknown-linux-gnu/libgcc':
    23configure: error: C preprocessor "/lib/cpp" fails sanity check
    24See `config.log' for more details.
    25make[2]: *** [Makefile:16831: configure-stage1-target-libgcc] Error 1
    26make[2]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build'
    27make[1]: *** [Makefile:21251: stage1-bubble] Error 2
    28make[1]: Leaving directory '/tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-0/build'
    29make: *** [Makefile:932: all] Error 2
    30command "make" "-j" "7" "inhibit_libc=true" "LDFLAGS_FOR_TARGET=-B/gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib -Wl,-dynamic-linker -Wl,/gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/ld-linux-aarch64.so.1" "LDFLAGS=-Wl,-rpath=/gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib -Wl,-dynamic-linker -Wl,/gnu/store/cb88z63hyg1icd2kkahiink2p291mhr2-glibc-2.31/lib/ld-linux-aarch64.so.1" "BOOT_CFLAGS=-O2 -g0" failed with status 2
    

    Full log.

    Then ran:

    0guix build /gnu/store/1rmh3vsc39ls8q5zqx9pn6613h5avpay-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv --keep-failed
    

    The contents of that directory (tmp/guix-build-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0.drv-6/) is available here: https://github.com/fanquake/build_artifacts/releases/tag/guix_22458.

  23. dongcarl commented at 9:43 pm on July 21, 2021: contributor
  24. fanquake referenced this in commit fe5fdbd687 on Mar 9, 2022
  25. hebasto commented at 9:47 am on May 19, 2022: member
    FWIW, I’ve tried another approach, but it also fails. The error differs from the initial one though.
  26. hebasto commented at 12:09 pm on May 21, 2022: member

    FWIW, I’ve tried another approach, but it also fails. The error differs from the initial one though.

    Following this rabbit hole, I found that the --build=aarch64-unknown-linux-gnu and --target=aarch64-linux-gnu configure flags change the build system behavior in the following way.

    For the mentioned set of flags, which is broken:

     0... | grep -e 'in \./'
     1Configuring stage 1 in ./libiberty
     2Configuring stage 1 in ./intl
     3Configuring stage 1 in ./libbacktrace
     4Configuring stage 1 in ./libdecnumber
     5Configuring stage 1 in ./gcc
     6Configuring stage 1 in ./libcpp
     7Configuring stage 2 in ./libiberty
     8Configuring stage 2 in ./intl
     9Configuring stage 2 in ./libbacktrace
    10Configuring stage 2 in ./libdecnumber
    

    and the “stage 2” fails in each directory.

    For any other set of flags, which works fine:

    0... | grep -e 'in \./'
    1Configuring in ./libiberty
    2Configuring in ./fixincludes
    3Configuring in ./libbacktrace
    4Configuring in ./intl
    5Configuring in ./libdecnumber
    6Configuring in ./gcc
    7Configuring in ./libcpp
    8Configuring in ./libcc1
    
  27. hebasto commented at 8:36 am on May 22, 2022: member

    FWIW, I’ve managed to build gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0 with this branch. :pizza:

    Unfortunately, the following glibc-cross-aarch64-linux-gnu-2.24 fails.

    UPDATE: the full log is available here.

  28. hebasto commented at 11:07 am on May 22, 2022: member

    FWIW, I’ve managed to build gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0 with this branch.

    Unfortunately, the following glibc-cross-aarch64-linux-gnu-2.24 fails.

    UPDATE: the full log is available here.

    The error:

    0aarch64-linux-gnu-gcc   -D_RPC_THREAD_SAFE_ -D_GNU_SOURCE -DIS_IN_build -include /tmp/guix-build-glibc-cross-aarch64-linux-gnu-2.24.drv-0/build/config.h rpc_main.c \
    1	-o /tmp/guix-build-glibc-cross-aarch64-linux-gnu-2.24.drv-0/build/sunrpc/cross-rpc_main.o -MMD -MP -MF /tmp/guix-build-glibc-cross-aarch64-linux-gnu-2.24.drv-0/build/sunrpc/cross-rpc_main.o.dt -MT /tmp/guix-build-glibc-cross-aarch64-linux-gnu-2.24.drv-0/build/sunrpc/cross-rpc_main.o -c
    2rpc_main.c:37:10: fatal error: errno.h: No such file or directory
    3   37 | #include <errno.h>
    4      |          ^~~~~~~~~
    5compilation terminated.
    6make[2]: *** [Makefile:171: /tmp/guix-build-glibc-cross-aarch64-linux-gnu-2.24.drv-0/build/sunrpc/cross-rpc_main.o] Error 1
    

    looks weird because the errno.h header is available in many places. For example, ../source/include/errno.h

  29. laanwj referenced this in commit b04f42efe3 on Jul 1, 2022
  30. fanquake commented at 5:09 pm on July 18, 2022: member
    Updated the build logs / failures in the issue description, as of master (f002f8a0e76bd5abd60ef6809b1ff2b4c2d56071).
  31. bitcoin deleted a comment on Jul 18, 2022
  32. fanquake referenced this in commit fe57cd7a1b on Aug 2, 2022
  33. hebasto commented at 10:53 am on August 4, 2022: member

    FWIW, I’ve managed to build gcc-cross-sans-libc-aarch64-linux-gnu-10.3.0 with this branch. 🍕

    Unfortunately, the following glibc-cross-aarch64-linux-gnu-2.24 fails.

    UPDATE: the full log is available here.

    Another step has been made. Now the following packages are being built successfully:

    • gcc-cross-sans-libc-aarch64-linux-gnu
    • glibc-cross-aarch64-linux-gnu

    Building of gcc-cross-aarch64-linux-gnu fails with the following error:

     0/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/./prev-gcc/xg++ -B/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/./prev-gcc/ -B/gnu/store/x4r97fc5k2d2h44nh6gq1dyw9k85m7kx-gcc-cross-aarch64-linux-gnu-10.3.0/aarch64-linux-gnu/bin/ -nostdinc++ -B/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/src/.libs -B/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/libsupc++/.libs  -I/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/include/aarch64-linux-gnu  -I/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/include  -I/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/gcc-10.3.0/libstdc++-v3/libsupc++ -L/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/src/.libs -L/tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/libsupc++/.libs -c   -g -O2 -fno-checking -gtoggle -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H  -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../../gcc-10.3.0/gcc -I../../gcc-10.3.0/gcc/build -I../../gcc-10.3.0/gcc/../include  -I../../gcc-10.3.0/gcc/../libcpp/include  \
     1	-o build/gengtype-parse.o ../../gcc-10.3.0/gcc/gengtype-parse.c
     2In file included from ./bconfig.h:3,
     3                 from ../../gcc-10.3.0/gcc/genchecksum.c:20:
     4./auto-host.h:2448:16: error: declaration does not declare anything [-fpermissive]
     5 2448 | #define rlim_t long
     6      |                ^~~~
     7In file included from ../../gcc-10.3.0/gcc/genchecksum.c:21:
     8../../gcc-10.3.0/gcc/system.h:488:14: error: conflicting declaration of C function void* sbrk(int)
     9  488 | extern void *sbrk (int);
    10      |              ^~~~
    11In file included from ../../gcc-10.3.0/gcc/system.h:294,
    12                 from ../../gcc-10.3.0/gcc/genchecksum.c:21:
    13/gnu/store/y8x9n30a8lb18qz9757phgjg6kmp0zzf-glibc-cross-aarch64-linux-gnu-2.32/include/unistd.h:1055:14: note: previous declaration void* sbrk(intptr_t)
    14 1055 | extern void *sbrk (intptr_t __delta) __THROW;
    15      |              ^~~~
    16In file included from ../../gcc-10.3.0/gcc/genchecksum.c:21:
    17../../gcc-10.3.0/gcc/system.h:496:14: error: ambiguating new declaration of char* strstr(const char*, const char*)
    18  496 | extern char *strstr (const char *, const char *);
    19      |              ^~~~~~
    20In file included from /tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/include/cstring:42,
    21                 from ../../gcc-10.3.0/gcc/system.h:235,
    22                 from ../../gcc-10.3.0/gcc/genchecksum.c:21:
    23/gnu/store/y8x9n30a8lb18qz9757phgjg6kmp0zzf-glibc-cross-aarch64-linux-gnu-2.32/include/string.h:327:1: note: old declaration const char* strstr(const char*, const char*)
    24  327 | strstr (const char *__haystack, const char *__needle) __THROW
    25      | ^~~~~~
    26In file included from ../../gcc-10.3.0/gcc/genchecksum.c:21:
    27../../gcc-10.3.0/gcc/system.h:544:20: error: conflicting declaration of C function const char* strsignal(int)
    28  544 | extern const char *strsignal (int);
    29      |                    ^~~~~~~~~
    30In file included from /tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/include/cstring:42,
    31                 from ../../gcc-10.3.0/gcc/system.h:235,
    32                 from ../../gcc-10.3.0/gcc/genchecksum.c:21:
    33/gnu/store/y8x9n30a8lb18qz9757phgjg6kmp0zzf-glibc-cross-aarch64-linux-gnu-2.32/include/string.h:462:14: note: previous declaration char* strsignal(int)
    34  462 | extern char *strsignal (int __sig) __THROW;
    35      |              ^~~~~~~~~
    36In file included from ../../gcc-10.3.0/gcc/system.h:695,
    37                 from ../../gcc-10.3.0/gcc/genchecksum.c:21:
    38../../gcc-10.3.0/gcc/../include/libiberty.h:112:14: error: ambiguating new declaration of char* basename(const char*)
    39  112 | extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
    40      |              ^~~~~~~~
    41In file included from /tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/include/cstring:42,
    42                 from ../../gcc-10.3.0/gcc/system.h:235,
    43                 from ../../gcc-10.3.0/gcc/genchecksum.c:21:
    44/gnu/store/y8x9n30a8lb18qz9757phgjg6kmp0zzf-glibc-cross-aarch64-linux-gnu-2.32/include/string.h:508:26: note: old declaration const char* basename(const char*)
    45  508 | extern "C++" const char *basename (const char *__filename)
    46      |                          ^~~~~~~~
    47In file included from ./bconfig.h:3,
    48                 from ../../gcc-10.3.0/gcc/genhooks.c:20:
    49./auto-host.h:2448:16: error: declaration does not declare anything [-fpermissive]
    50 2448 | #define rlim_t long
    51      |                ^~~~
    52In file included from ../../gcc-10.3.0/gcc/genhooks.c:21:
    53../../gcc-10.3.0/gcc/system.h:488:14: error: conflicting declaration of C function void* sbrk(int)
    54  488 | extern void *sbrk (int);
    55      |              ^~~~
    56In file included from ../../gcc-10.3.0/gcc/system.h:294,
    57                 from ../../gcc-10.3.0/gcc/genhooks.c:21:
    58/gnu/store/y8x9n30a8lb18qz9757phgjg6kmp0zzf-glibc-cross-aarch64-linux-gnu-2.32/include/unistd.h:1055:14: note: previous declaration void* sbrk(intptr_t)
    59 1055 | extern void *sbrk (intptr_t __delta) __THROW;
    60      |              ^~~~
    61In file included from ../../gcc-10.3.0/gcc/genhooks.c:21:
    62../../gcc-10.3.0/gcc/system.h:496:14: error: ambiguating new declaration of char* strstr(const char*, const char*)
    63  496 | extern char *strstr (const char *, const char *);
    64      |              ^~~~~~
    65In file included from /tmp/guix-build-gcc-cross-aarch64-linux-gnu-10.3.0.drv-0/build/prev-aarch64-linux-gnu/libstdc++-v3/include/cstring:42,
    66                 from ../../gcc-10.3.0/gcc/system.h:235,
    67                 from ../../gcc-10.3.0/gcc/genhooks.c:21:
    68/gnu/store/y8x9n30a8lb18qz9757phgjg6kmp0zzf-glibc-cross-aarch64-linux-gnu-2.32/include/string.h:327:1: note: old declaration const char* strstr(const char*, const char*)
    69  327 | strstr (const char *__haystack, const char *__needle) __THROW
    70      | ^~~~~~
    71make[3]: *** [Makefile:2723: build/genchecksum.o] Error 1
    
  34. fanquake commented at 12:36 pm on August 4, 2022: member

    Another step has been made. Now the following packages are being built successfully:

    The reason you’re no-longer seeing the previous issue is because by bumping to the newer glibc, that code that was failing to compile (sunrpc) has been obseleted and removed. In any case, bumping to a much newer glibc is not going to be an appropriate fix. I had patched around the sunrpc issue by backporting a glibc commit, see here so no need for a bump, but had stopped looking again after running into the above.

    The new issue is this one: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56954. However I think the actual problem here is to do with the fact that this is a cross-compilation, but less so compared to our other cross-compiles. i.e it’s more like x86_64 on x86_64, and something in cross-compilation detection is getting confused.

  35. fanquake referenced this in commit aedbfa3d36 on Aug 17, 2022
  36. fanquake referenced this in commit f98d7d5435 on Aug 18, 2022
  37. fanquake referenced this in commit a09860176c on Aug 19, 2022
  38. fanquake referenced this in commit a825457ece on Aug 19, 2022
  39. fanquake referenced this in commit 501615373c on Aug 19, 2022
  40. fanquake added this to the milestone 24.0 on Aug 19, 2022
  41. hebasto referenced this in commit a6882b0bc6 on Aug 22, 2022
  42. fanquake referenced this in commit c7d6724658 on Aug 22, 2022
  43. fanquake referenced this in commit eb08c59aea on Aug 23, 2022
  44. fanquake referenced this in commit 66117cc706 on Aug 24, 2022
  45. fanquake referenced this in commit f985ef3744 on Aug 24, 2022
  46. fanquake referenced this in commit 0faf2029a0 on Aug 24, 2022
  47. fanquake referenced this in commit 56e79fe683 on Aug 31, 2022
  48. fanquake closed this on Sep 4, 2022

  49. fanquake referenced this in commit df31e468b9 on Sep 4, 2022
  50. fanquake referenced this in commit b41fd3369d on Sep 4, 2022
  51. sidhujag referenced this in commit 2633ef7047 on Sep 4, 2022
  52. fanquake referenced this in commit 5465f7f9a5 on Oct 10, 2022
  53. dekm referenced this in commit 742d34acb4 on Oct 27, 2022
  54. dekm referenced this in commit 6feb67d850 on Oct 27, 2022
  55. dekm referenced this in commit 803da2b042 on Oct 27, 2022
  56. dekm referenced this in commit 7be91387dd on Nov 7, 2022
  57. fanquake referenced this in commit a59dd16cf5 on Nov 8, 2022
  58. fanquake referenced this in commit 0f4583e5c1 on Nov 8, 2022
  59. dekm referenced this in commit 70b22f0f88 on Nov 12, 2022
  60. dekm referenced this in commit 563e5c6d31 on Apr 6, 2023
  61. PastaPastaPasta referenced this in commit 325f0f5e07 on Apr 16, 2023
  62. PastaPastaPasta referenced this in commit e4a6ea6032 on Apr 16, 2023
  63. dekm referenced this in commit 4eef3195af on Jun 26, 2023
  64. dekm referenced this in commit 1cc903a5e5 on Jun 26, 2023
  65. bitcoin locked this on Sep 4, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me