Date: Thu, 1 Jun 2017 17:18:51 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: "O. Hartmann" <ohartmann@walstatt.org>, Pedro Giffuni <pfg@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar <np@FreeBSD.org> Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 Message-ID: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> In-Reply-To: <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V1icEwmXx3OlJCduuuPnMlWWOmacs37qK Content-Type: multipart/mixed; boundary="mT8j5N0At4DUgVariKKhLPGTGoVCmmqqc"; protected-headers="v1" From: Bryan Drewery <bdrewery@FreeBSD.org> To: "O. Hartmann" <ohartmann@walstatt.org>, Pedro Giffuni <pfg@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar <np@FreeBSD.org> Message-ID: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 References: <201705231638.v4NGcAq1005935@repo.freebsd.org> <20170523191129.57183b1c@thor.intern.walstatt.dynvpn.de> <5d1d0149-7994-a870-0f6d-1499a9efba75@FreeBSD.org> <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> In-Reply-To: <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> --mT8j5N0At4DUgVariKKhLPGTGoVCmmqqc Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/23/2017 12:00 PM, O. Hartmann wrote: > Am Tue, 23 May 2017 12:52:35 -0500 > Pedro Giffuni <pfg@FreeBSD.org> schrieb: >=20 >> On 23/05/2017 12:12, O. Hartmann wrote: >>> Am Tue, 23 May 2017 16:38:10 +0000 (UTC) >>> "Pedro F. Giffuni" <pfg@FreeBSD.org> schrieb: >>> =20 >>>> Author: pfg >>>> Date: Tue May 23 16:38:10 2017 >>>> New Revision: 318750 >>>> URL: https://svnweb.freebsd.org/changeset/base/318750 >>>> >>>> Log: >>>> Bring some rough support for FreeBSD S/390 to the GNU toolchain. >>>> =20 >>>> This is no-op and only for reference: the S/390 port seems to be = elusive >>>> in the BSDs so it is convenient to keep some trace from past effo= rts. >>>> It is likely newer attempts will focus on a newer toolchain using= clang >>>> instead. >>>> =20 >>>> Obtained from: Perforce depot/projects/s390 >>>> >>>> Added: >>>> head/contrib/binutils/ld/emulparams/elf64_s390_fbsd.sh (content= s, props changed) >>>> head/contrib/binutils/ld/emulparams/elf_s390_fbsd.sh (contents,= props changed) >>>> head/contrib/gcc/config/s390/freebsd.h >>>> - copied, changed from r318546, head/contrib/gcc/config/s390/l= inux.h >>>> Modified: >>>> head/contrib/binutils/bfd/config.bfd >>>> head/contrib/binutils/ld/configure.tgt >>>> head/contrib/gcc/config.gcc =20 >> ... >>>> Buildworld fails on r318751 with a "Segmentation fault" error as sho= wn below: >>>> >>>> Building /usr/obj/usr/src/lib/libkiconv/_libinstall >>>> --- lib/libmd__L --- >>>> --- skein_block_asm.o --- >>>> Segmentation fault >>>> *** [skein_block_asm.o] Error code 139 >>>> >>>> make[4]: stopped in /usr/src/lib/libmd >>>> .ERROR_TARGET=3D'skein_block_asm.o' >>>> .ERROR_META_FILE=3D'/usr/obj/usr/src/lib/libmd/skein_block_asm.o.met= a' >>>> .MAKE.LEVEL=3D'4' >>>> MAKEFILE=3D'' >>>> >>>> >>>> Host is running recent CURRENT: FreeBSD 12.0-CURRENT #124 r318748: T= ue May 23 >>>> 18:52:59 CEST 2017 amd64 =20 >> >> It shouldn't be related to this change: >> >> 1) This only affects s390 configuration which is never activated >> 2) I did run a tinderbox build to make sure nothing was affected (the = >> only thing failing was an unrelated powerpc warning that was fixed). >> >> Pedro. >=20 > Hello, >=20 > the problem could be resolved by deleting the /usr/obj folder and start= a clean build > again. >=20 I think this is fallout from ino64 combined with META_MODE. META_MODE assumes that host tools will be ABI-compatible and generally does not [force] rebuild them very often. So the act of upgrading to ino64 host and then doing another build, your ld and various other host tools will still be running pre-ino64 binaries via COMPAT_FREEBSD11. I think the bug in this system is that it is possible for some of these tools to get mixed-ABI objects linked together resulting in differing ideas of what 'struct stat' is for example. This could be possible since META_MODE won't force rebuild all objects for a directory/tool but it may rebuild 1 object for some reason or just relink the resulting binary. Here's an example of what I'm talking about with the host ld object files= : > -rwxr-xr-x 1 root wheel 1857312 Jun 1 12:59 ld.bfd* =20 > -rwxr-xr-x 1 root wheel 931304 Jun 1 12:59 ld.bfd.debug* =20 > -rw-r--r-- 1 root wheel 978 Jun 1 12:59 ld.bfd.debug.meta =20 > -rwxr-xr-x 1 root wheel 2600311 Jun 1 12:59 ld.bfd.full* =20 > -rw-r--r-- 1 root wheel 3988 Jun 1 12:59 ld.bfd.full.meta =20 > -rw-r--r-- 1 root wheel 999 Jun 1 12:59 ld.bfd.meta =20 > -rw-r--r-- 1 root wheel 154400 Apr 18 16:12 ldcref.o =20 > -rw-r--r-- 1 root wheel 4553 Apr 18 16:12 ldcref.o.meta =20 > -rw-r--r-- 1 root wheel 137088 May 11 14:14 ldctor.o =20 > -rw-r--r-- 1 root wheel 4348 May 11 14:14 ldctor.o.meta =20 > -rw-r--r-- 1 root wheel 205 Oct 11 2016 ldemul-list.h =20 > -rw-r--r-- 1 root wheel 814 Oct 11 2016 ldemul-list.h.meta =20 > -rw-r--r-- 1 root wheel 144088 Oct 13 2016 ldemul.o =20 > -rw-r--r-- 1 root wheel 4374 Oct 13 2016 ldemul.o.meta =20 The object files predate ino64 but the linked binaries do not. I did not dig into these object files more but I suspect somewhere there are mixed-ABI object files hitting this bug or that just linking pre-ino64 objects may cause a problem. I don't think linking would be a problem though. Anyway the fix for this would be to either 'make cleanworld' after upgrading to ino64, use -DNO_META_IGNORE_HOST for the first build after, or wait for my fix. I will commit a fix to force rebuild host tools through known major ABI changes to avoid this problem. For discussion of why META_MODE tries to not rebuild host tools see r301467. The gist is that a simple 'buildworld->installworld->buildworld' causes everything to rebuild due to changed host file timestamps. Really it would be better if filemon/META_MODE used file content hashing like ccache did. Then timestamps wouldn't cause such a problem here. --=20 Regards, Bryan Drewery --mT8j5N0At4DUgVariKKhLPGTGoVCmmqqc-- --V1icEwmXx3OlJCduuuPnMlWWOmacs37qK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJZMK7vAAoJEDXXcbtuRpfPKAMH/Rj4xVb3O4EZMzBZdCQmR7Uz T7w4qB39FNFIaq6gZ4hMclAdAAVBl2T8vdk9KleTo3c+hggabLLf7JI/ZVKQvVct sG7cEYSBipWLVPzoN6d+M7vBj5yQ2958qhWi+UFn9NctwS/kUOW0CIWv9g5zGZtp ZQVpDmFCZ5/FNtPpvDHN3ADzULfgPIqRnk3WYOWwg3XZ7s0nVjP0aLBmu/Bj/IGX Q1kxUbif5sXvQ6LReEWzIH+orwJsqoIdaA6k6JaBD4pvRIZs8E4N7FBhaOmmbfnx J9AZfpycF7Ii8eIsP6jmuvZplBZ4ax8dPq07K2/VlgVXOCTXqa5LynCtMiYcY84= =FryF -----END PGP SIGNATURE----- --V1icEwmXx3OlJCduuuPnMlWWOmacs37qK--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?768df353-3e43-1da7-4a94-0acc1c741ad4>