From owner-freebsd-ports@freebsd.org Tue Dec 12 10:26:34 2017 Return-Path: Delivered-To: freebsd-ports@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 83C22E93918 for ; Tue, 12 Dec 2017 10:26:34 +0000 (UTC) (envelope-from oliver@schonrocks.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 60770752C8 for ; Tue, 12 Dec 2017 10:26:34 +0000 (UTC) (envelope-from oliver@schonrocks.com) Received: by mailman.ysv.freebsd.org (Postfix) id 5CBB8E93917; Tue, 12 Dec 2017 10:26:34 +0000 (UTC) Delivered-To: ports@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 5A841E93916 for ; Tue, 12 Dec 2017 10:26:34 +0000 (UTC) (envelope-from oliver@schonrocks.com) Received: from smtp.schonrocks.com (smtp.schonrocks.com [109.73.123.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB9FD752C7; Tue, 12 Dec 2017 10:26:33 +0000 (UTC) (envelope-from oliver@schonrocks.com) Received: from [192.168.40.60] (home.zaheer.org.uk [81.187.127.171]) by smtp.schonrocks.com (Postfix) with ESMTPA id B7A59506C25; Tue, 12 Dec 2017 10:26:24 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schonrocks.com; s=default; t=1513074384; bh=p1o0RP9zFMjwA+q6/Toa96w6JAelJTQRNWlJ0PZK0EU=; h=Subject:From:To:Cc:References:Date:In-Reply-To; b=ITICvVJPkvWEb6nSECK4jYEr6SUS6ffiOsmYdRS99t4rQ/PdpZs9iCR4RDXkbLzfO jhTvumfR9oM5yvc5xgHsFxVWcKRwUGKyfV3AkKpMwTQukL7fROmSjdQlJSaSoBmajh tXmcp/dNkSUd3l1MWdFOjtUAd4rVchG9lDmLj5Yc= Subject: Re: FreeBSD Port: php72-7.2.0 : trouble with lang/php72 & libargon2 From: Oliver Schonrock To: "Matthew D. Fuller" Cc: ports , tz@FreeBSD.org References: <6a2752ce-ee15-84a4-bd2b-150f614cf1a2@schonrocks.com> <20171211232847.GO1783@over-yonder.net> <9b51f4f4-8380-9bd3-37ee-e166939c16c4@schonrocks.com> <20171211234106.GP1783@over-yonder.net> <1b69f03c-fe9f-ad9f-a314-395c713d2329@schonrocks.com> Message-ID: Date: Tue, 12 Dec 2017 10:26:23 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1b69f03c-fe9f-ad9f-a314-395c713d2329@schonrocks.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HTiBvXkJLRC2i9Jubcm6405IPohit3fRh" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2017 10:26:34 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HTiBvXkJLRC2i9Jubcm6405IPohit3fRh Content-Type: multipart/mixed; boundary="mq6r9XI0TFM2h2QLKCTsqcnls7cpKiAoD"; protected-headers="v1" From: Oliver Schonrock To: "Matthew D. Fuller" Cc: ports , tz@FreeBSD.org Message-ID: Subject: Re: FreeBSD Port: php72-7.2.0 : trouble with lang/php72 & libargon2 References: <6a2752ce-ee15-84a4-bd2b-150f614cf1a2@schonrocks.com> <20171211232847.GO1783@over-yonder.net> <9b51f4f4-8380-9bd3-37ee-e166939c16c4@schonrocks.com> <20171211234106.GP1783@over-yonder.net> <1b69f03c-fe9f-ad9f-a314-395c713d2329@schonrocks.com> In-Reply-To: <1b69f03c-fe9f-ad9f-a314-395c713d2329@schonrocks.com> --mq6r9XI0TFM2h2QLKCTsqcnls7cpKiAoD Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 12/12/17 00:29, Oliver Schonrock wrote: >> Well, maybe. From your mail, though, it looks like you did that >> testing by rebuilding/installing the ports _on the local machine_, >> rather than rebuilding in poudriere. If the poudriere box was >> building binaries with instructions not in your local machine, that >> local build would bypass that issue, so it may still be there. >> "Illegal instruction" seems like an odd presentation for "missing >> file". > It's a good point, I get ya. You're right, I did not retest the > poudriere build. >=20 > The Poudriere machine has a: >=20 > Intel(R) Core(TM) i3-4130T: Haswell (4th gen) >=20 > The machine that is throwing the "Illegal instruction" error, is a > VirtualBox VM running on an: > Intel(R) Core(TM) i7-2600 CPU: Sandy Bridge (2nd gen) >=20 > Our production machines are all: > CPU: AMD Opteron(tm) Processor 4386: "Seoul" (32 nm) >=20 > Ideally I would like to be able to use the packages built by the i3-413= 0 > machine to run without hitches across all 3 CPU types, while still > taking advantage of their features for openssl/TLS, etc. >=20 > What would be a good CPUTYPE line for make.conf? >=20 > I am non-the-wiser from the docs in /usr/share/examples/etc/make.conf Right, nothing like scouring source code: I noticed that while compiling libargon2 it was showing -march=3Dnative. I found that clang -E - -march=3Dnative -### can give you list of features which the compiler will use for that arch. I ran that on the haswell and the sandybridge machines and cleaned it up and diff'd it. Yes there are features missing on sandybridge as far as clang is concerned. Haswell has these (and sandybridge not): "+avx2" "+bmi" "+bmi2" "+f16c" "+fma" "+fsgsbase" "+invpcid" "+lzcnt" "+movbe" "+rdrnd" "+xsaveopt" Out of those avx2 seems like a likely candidate (see below!), but lets find out what CPUTYPE=3D... actually does. It seems that this file has th= e answer: /usr/src/share/mk/bsd.cpu.mk Here are the relevant lines, for my 3 architectures: (..under amd64 ..near L247 ) =2E elif ${CPUTYPE} =3D=3D "ivybridge" || ${CPUTYPE} =3D=3D "sandybridge= " MACHINE_CPU =3D avx sse42 sse41 ssse3 sse3 =2E elif ${CPUTYPE} =3D=3D "broadwell" || ${CPUTYPE} =3D=3D "haswell" MACHINE_CPU =3D avx2 avx sse42 sse41 ssse3 sse3 =2E elif ${CPUTYPE} =3D=3D "bdver3" || ${CPUTYPE} =3D=3D "bdver2" || ${C= PUTYPE} =3D=3D "bdver1" MACHINE_CPU =3D xop avx sse42 sse41 ssse3 sse4a sse3 I wasn't sure what bdverX translates into, but I know my 4386 opteron does not have avx2, so it must be bdver3 on this scale. so for those 3 CPU types, I find the highest common denominator as: avx sse42 sse41 ssse3 sse3 which is exactly the setting for "sandybridge" So I should be able to put CPUTYPE=3Dsandybridge into /etc/make.conf and...happy days? No more nasty surprises? I will wait for that libargon2 patch to be committed to svn.ports and then retest on the "haswell" poudriere server to see if I can get it to build "sandybridge" (and bdver3) compat binaries.... --=20 Oliver Sch=C3=B6nrock email : oliver@schonrocks.com --mq6r9XI0TFM2h2QLKCTsqcnls7cpKiAoD-- --HTiBvXkJLRC2i9Jubcm6405IPohit3fRh 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 iQEcBAEBCAAGBQJaL67PAAoJEF6SumULDx4PtqoH+QFX2+97tSQlIvLWSjZBPpI8 FzFddOL1GbCGeIyJt/H4NbX3aAC2VasrXVLncJaczfoFyRmhMthO4QYUCuYV5pDz jz3usUYF1UytSIXs19PJ+IUNQueyKUUzZG4dmrQYYcrLlJIF4NLQMVSmGrN2gW6d hzUDyDPpdYl26cmFAaMQnFRY/+yQuBTEWM+AY8I+ByLdwqzqJ34z7OOY8xGNmF3z YpOF0VOz9SoykmoIPT1jNaZUbUKrb45UV1B/U2KbvWSIFpa3X4n/J15bBwDkN7kE QjcHurqWtoJCrH9Qf4P1h1EmI5gUw2VL9bvxdfNstHkR0T3H/j8f1yXSh1MeZaQ= =DqCi -----END PGP SIGNATURE----- --HTiBvXkJLRC2i9Jubcm6405IPohit3fRh--