Hi! On Sat, Jul 15, 2017 at 12:03:13AM +0200, John Paul Adrian Glaubitz wrote: > After fixing gnat in gcc-7 with the small patch provided in > #862927 [1], I have successfully bootstrapped gnat-7 for > m68k and uploaded the packages to unstable so that gnat-7 > can be used as a build dependency for gcc-7.
While the patch allowed me to cross-build a native gnat-7, native builds unfortunately currently fail with obscure linker errors [1]: /usr/lib/gcc/m68k-linux-gnu/7/../../../m68k-linux-gnu/crt1.o: In function `_start': (.text+0x1c): undefined reference to `main' ./xtreeprs.o: In function `_ada_xtreeprs': xtreeprs.adb:(.text+0x4a6): undefined reference to `xtreeprs__TnamesBIP.1929' xtreeprs.adb:(.text+0x4cc): undefined reference to `xtreeprs__TnamesBDI.1932' xtreeprs.adb:(.text+0x168c): undefined reference to `xtreeprs__put_line__2.2465' xtreeprs.adb:(.text+0x16b0): undefined reference to `xtreeprs__put_line__2.2465' xtreeprs.adb:(.text+0x17d0): undefined reference to `xtreeprs__put_line__2.2465' xtreeprs.adb:(.text+0x1802): undefined reference to `xtreeprs__put_line.2461' xtreeprs.adb:(.text+0x23f4): undefined reference to `xtreeprs__put_line__2.2465' xtreeprs.adb:(.text+0x26ae): undefined reference to `xtreeprs__put_line__2.2465' xtreeprs.adb:(.text+0x28de): undefined reference to `xtreeprs__put_line__2.2465' xtreeprs.adb:(.text+0x29a8): undefined reference to `xtreeprs__put_line.2461' xtreeprs.adb:(.text+0x29d8): undefined reference to `xtreeprs__put_line.2461' xtreeprs.adb:(.text+0x2a08): undefined reference to `xtreeprs__put_line.2461' xtreeprs.adb:(.text+0x2a38): undefined reference to `xtreeprs__put_line.2461' xtreeprs.adb:(.text+0x2cb2): undefined reference to `xtreeprs__put_line__2.2465' xtreeprs.adb:(.text+0x2fca): undefined reference to `xtreeprs__put_line__2.2465' xtreeprs.adb:(.text+0x309e): undefined reference to `xtreeprs__put_line.2461' xtreeprs.adb:(.text+0x30ce): undefined reference to `xtreeprs__put_line.2461' xtreeprs.adb:(.text+0x30ea): undefined reference to `xtreeprs___finalizer.1652' xtreeprs.adb:(.text+0x314e): undefined reference to `xtreeprs__TnamesBDF.1940' collect2: error: ld returned 1 exit status gnatlink-7: error when calling /usr/bin/gcc-7 gnatmake: *** link failed. /bin/bash: ./xtreeprs: No such file or directory ../../src/gcc/ada/Make-generated.in:28: recipe for target 'ada/treeprs.ads' failed make[5]: *** [ada/treeprs.ads] Error 127 make[5]: *** Waiting for unfinished jobs.... ../../src/gcc/doc/cpp.texi: warning: document without nodes ../../src/gcc/doc/install.texi: warning: document without nodes /usr/lib/gcc/m68k-linux-gnu/7/../../../m68k-linux-gnu/crt1.o: In function `_start': (.text+0x1c): undefined reference to `main' collect2: error: ld returned 1 exit status gnatlink-7: error when calling /usr/bin/gcc-7 gnatmake: *** link failed. /bin/bash: ./xsnamest: No such file or directory ../../src/gcc/ada/Make-generated.in:50: recipe for target 'ada/stamp-snames' failed make[5]: *** [ada/stamp-snames] Error 127 /usr/lib/gcc/m68k-linux-gnu/7/../../../m68k-linux-gnu/crt1.o: In function `_start': (.text+0x1c): undefined reference to `main' collect2: error: ld returned 1 exit status gnatlink-7: error when calling /usr/bin/gcc-7 gnatmake: *** link failed. /bin/bash: ./xeinfo: No such file or directory ../../src/gcc/ada/Make-generated.in:35: recipe for target 'ada/einfo.h' failed make[5]: *** [ada/einfo.h] Error 127 /usr/lib/gcc/m68k-linux-gnu/7/../../../m68k-linux-gnu/crt1.o: In function `_start': (.text+0x1c): undefined reference to `main' ./csinfo.o: In function `_ada_csinfo': csinfo.adb:(.text+0x3350): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x418a): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x443c): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x4b04): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x4dfa): undefined reference to `csinfo__next_line.2855' ./csinfo.o:csinfo.adb:(.text+0x54b6): more undefined references to `csinfo__next_line.2855' follow ./csinfo.o: In function `_ada_csinfo': csinfo.adb:(.text+0x633a): undefined reference to `csinfo__vstringaIP.2881' csinfo.adb:(.text+0x637e): undefined reference to `csinfo__vstringaDI.2884' csinfo.adb:(.text+0x653e): undefined reference to `csinfo__sort.2907' csinfo.adb:(.text+0x6550): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x6560): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x6570): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x65a0): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x69d8): undefined reference to `csinfo__next_line.2855' ./csinfo.o:csinfo.adb:(.text+0x7200): more undefined references to `csinfo__next_line.2855' follow ./csinfo.o: In function `_ada_csinfo': csinfo.adb:(.text+0x7654): undefined reference to `csinfo__vstringaIP.2881' csinfo.adb:(.text+0x7692): undefined reference to `csinfo__vstringaDI.2884' csinfo.adb:(.text+0x784c): undefined reference to `csinfo__sort.2907' csinfo.adb:(.text+0x785e): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x786e): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x787e): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x78ae): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x7b02): undefined reference to `csinfo__next_line.2855' csinfo.adb:(.text+0x8336): undefined reference to `csinfo___finalizer.1652' csinfo.adb:(.text+0xb482): undefined reference to `csinfo__vstringaDF.2892' csinfo.adb:(.text+0xbdc2): undefined reference to `csinfo__vstringaDF.2892' ./csinfo.o: In function `csinfo__B_12___finalizer.4194': csinfo.adb:(.text+0xe4e4): undefined reference to `csinfo__vstringaDF.2892' ./csinfo.o: In function `csinfo__B_17___finalizer.4562': csinfo.adb:(.text+0xf188): undefined reference to `csinfo__vstringaDF.2892' collect2: error: ld returned 1 exit status gnatlink-7: error when calling /usr/bin/gcc-7 gnatmake: *** link failed. /bin/bash: ./xsinfo: No such file or directory ../../src/gcc/ada/Make-generated.in:42: recipe for target 'ada/sinfo.h' failed make[5]: *** [ada/sinfo.h] Error 127 I have investigated the issue but so far I haven't found anything obvious that explains the problems. I'm not 100% sure whether this might be something that needs to be fixed in the packaging or whether this is another upstream bug. Either way, cross building a native gnat-7 with my patch works, a full native build fails as shown above. Adrian > [1] https://people.debian.org/~glaubitz/gcc-7_7.1.0-9+b2_m68k.build -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913