From owner-svn-src-head@freebsd.org Fri Jun 2 00:19:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAE4EB95822; Fri, 2 Jun 2017 00:19:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B547E73E4F; Fri, 2 Jun 2017 00:19:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id CD9C4B59F; Fri, 2 Jun 2017 00:19:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 60BB075AB; Fri, 2 Jun 2017 00:19:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id q7p7as36gQAP; Fri, 2 Jun 2017 00:19:13 +0000 (UTC) Subject: Re: svn commit: r318750 - in head/contrib: binutils/bfd binutils/ld binutils/ld/emulparams gcc gcc/config/s390 DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 7CB0675A6 To: "O. Hartmann" , Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar 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> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <768df353-3e43-1da7-4a94-0acc1c741ad4@FreeBSD.org> Date: Thu, 1 Jun 2017 17:18:51 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170523210039.555a2f41@thor.intern.walstatt.dynvpn.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="V1icEwmXx3OlJCduuuPnMlWWOmacs37qK" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 00:19:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --V1icEwmXx3OlJCduuuPnMlWWOmacs37qK Content-Type: multipart/mixed; boundary="mT8j5N0At4DUgVariKKhLPGTGoVCmmqqc"; protected-headers="v1" From: Bryan Drewery To: "O. Hartmann" , Pedro Giffuni Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Navdeep Parhar 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 schrieb: >=20 >> On 23/05/2017 12:12, O. Hartmann wrote: >>> Am Tue, 23 May 2017 16:38:10 +0000 (UTC) >>> "Pedro F. Giffuni" 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--