Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure: s390x-unknown-linux-gnu-stage-static-gcc-12.3.0 on cross compilation #249746

Closed
saschagrunert opened this issue Aug 17, 2023 · 2 comments

Comments

@saschagrunert
Copy link
Member

I'm trying to cross compile nixpkgs 6d00572 to s390x by:

(import ./nixpkgs.nix {
  crossSystem = {
    config = "s390x-unknown-linux-gnu";
  };
  overlays = [ (import ./overlay.nix) ];
}).callPackage ./derivation.nix
{ }

https://github.com/saschagrunert/cri-o/blob/s390x/nix/default-s390x.nix

The derivation /nix/store/7xx009zf56wjw20lacba5cmkh6spmnfs-s390x-unknown-linux-gnu-stage-static-gcc-12.3.0.drv fails with:

make[1]: *** No rule to make target '../../../gcc-12.3.0/libgcc/config/s390/crti.S', needed by 'crti.o'.  Stop.
make[1]: *** Waiting for unfinished jobs....
/nix/store/ir0j7zqlw9dc49grmwplppc7gh0s40yf-bash-5.2-p15/bin/bash ../../../gcc-12.3.0/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
echo timestamp > libgcc_tm.stamp
../../../gcc-12.3.0/libgcc/config/s390/morestack.S: Assembler messages:
../../../gcc-12.3.0/libgcc/config/s390/morestack.S:600: Warning: ignoring incorrect section type for .init_array.00000
make[1]: Leaving directory '/build/build/s390x-unknown-linux-gnu/libgcc'
make: *** [Makefile:12949: all-target-libgcc] Error 2
error: builder for '/nix/store/7xx009zf56wjw20lacba5cmkh6spmnfs-s390x-unknown-linux-gnu-stage-static-gcc-12.3.0.drv' failed with exit code 2;
       last 10 log lines:
       >        ../../../gcc-12.3.0/libgcc/mkheader.sh > tmp-libgcc_tm.h
       > /build/build/./gcc/xgcc -B/build/build/./gcc/    -O2  -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -mlong-double-128 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -fPIC -mlong-double-128 -I. -I. -I../.././gcc -I../../../gcc-12.3.0/libgcc -I../../../gcc-12.3.0/libgcc/. -I../../../gcc-12.3.0/libgcc/../gcc -I../../../gcc-12.3.0/libgcc/../include  -DHAVE_CC_TLS   -o morestack_s.o -MT morestack_s.o -MD -MP -MF morestack_s.dep -DSHARED -c -xassembler-with-cpp ../../../gcc-12.3.0/libgcc/config/s390/morestack.S
       > make[1]: *** No rule to make target '../../../gcc-12.3.0/libgcc/config/s390/crti.S', needed by 'crti.o'.  Stop.
       > make[1]: *** Waiting for unfinished jobs....
       > /nix/store/ir0j7zqlw9dc49grmwplppc7gh0s40yf-bash-5.2-p15/bin/bash ../../../gcc-12.3.0/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
       > echo timestamp > libgcc_tm.stamp
       > ../../../gcc-12.3.0/libgcc/config/s390/morestack.S: Assembler messages:
       > ../../../gcc-12.3.0/libgcc/config/s390/morestack.S:600: Warning: ignoring incorrect section type for .init_array.00000
       > make[1]: Leaving directory '/build/build/s390x-unknown-linux-gnu/libgcc'
       > make: *** [Makefile:12949: all-target-libgcc] Error 2
       For full logs, run 'nix log /nix/store/7xx009zf56wjw20lacba5cmkh6spmnfs-s390x-unknown-linux-gnu-stage-static-gcc-12.3.0.drv'.
error: 1 dependencies of derivation '/nix/store/zksbib2rfv6f3m833p8b4i18rbi2rxgv-s390x-unknown-linux-gnu-stage-static-gcc-wrapper-12.3.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/43lpbsp9l3saamdrnxdksmfgd4p4qzcb-libgcc-s390x-unknown-linux-gnu-12.3.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/v0qablxyr0v7v62r5s6svp31j8w6lsf7-stdenv-linux.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c1xwmnphd5y68hqajzfkr77cksxmxc2g-glibc-s390x-unknown-linux-gnu-2.37-8.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pfaf3aldyfhrsgr10rs5c5apzy7944sz-glibc-iconv-2.37.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0201cc968hp6ikrhnl20wap8avd1ms27-glibc-s390x-unknown-linux-gnu-2.37-8.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dfb03z1l7i2ds8id9rrj1il0lrk5lppf-s390x-unknown-linux-gnu-stage-final-gcc-wrapper-12.3.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c0ycp0x6y7d5vir8vsrfm48r9r1hmgmp-shadow-s390x-unknown-linux-gnu-4.13.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ysx7v0kczjgrkdacbmsbnv7aacr7vk3g-cri-o-s390x-unknown-linux-gnu.drv' failed to build

I think gcc 11 and 13 built successful, not sure what's wrong here. 🤔

@trofi
Copy link
Contributor

trofi commented Aug 18, 2023

../../../gcc-12.3.0/libgcc/config/s390/morestack.S:600: Warning: ignoring incorrect section type for .init_array.00000

Probably the same cause as in #238154 (comment)

@saschagrunert
Copy link
Member Author

Dup of #243614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants