From owner-freebsd-ports@freebsd.org Fri Nov 16 22:35:06 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8CB5110689C for ; Fri, 16 Nov 2018 22:35:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FCCC6C819 for ; Fri, 16 Nov 2018 22:35:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: WZ9kRREVM1mUDjEqldpiI4gTut9AUMjguwm0mFEazil2qe10b_qL9eB_zvbeOJ. 39VrIKAclmK2DVGtR5Mn8ogRlB3UFgJen1fG5aY8arHPEZatyu6d1XNQwxcLhGfwT8Qis_aj5Cm8 pqJW1JRLn9APJ3Zhw.74xFMhCVLSic1ROCXXA9EEpRg1GysFcRMuHdcwa_mP1psC_42OzjDVQnbw 4OfvgB8KYxZRx5HcC1pYxOU.UR9GQTX2XsZIwt6fCxjoinqCto9q_vrg0kFGIT8Vd2nP.4h.nojX aPZBj1CuSlc4lwyFwPlfa4pXCEB6pdwc3XurCkYpza_AymEFLBDvFAkbv4hk_qaXTtDohtFCsJpI 11f9NsZNuGZiHR3ishK.s1HxRalA_uIOc9eSGlIiPg0BbJTs6h7caAY2D1HSWBT.F9zTFx3QQPYs m6TEQJB.Fmfc4dY7ca0lmsoK4aPX2sTcGA5RSqgZO2NAATHPiRdsTLkG7oGMspeSl1YWE7QqPeHa 4Nf7Nd6Y1msL5ROf4jVp93wHvVU9cJmpyToSinr1ZRCu7kPi9E6e5ZbSfgxY1193MKMqTPPSLIL3 8ZbvkKIb7ftArSSSehZvKBbojsOIkJEE0gfFIn1QClxYiGFLozLOqJcrinedv0RwdALkwOTub3QX 55saDrXPddy5C89e7NdtHn1M4Air.CSg2YcckR1c3v9dIqCpop7y6ZIhJstVJrHabSgTi3zDyrGR dX4.Ro9QaiAxciWSS2VT4y.HI8MilP1QnMI81gRgyQeXWZ3hHVXI6plOFHmX7q96iZh.oytR.ZEJ J97My4MfxZrMy2MQQ7ziTbSUvUWIZxwjlBeGy45rg4T_ODKRixNkRSu.1uBI_.07Lpcne7.aBbbi CUh0bDuP87k0xAl8TGEk5diXRCDaCr8JtS2t8WSAOKXdCQN9KO.glkk6JDSDTOIq6iwQiB0EyfH. zhgyr3b.hyQ1U70G8Qw.l.S0GUmduN2DEtIRwSGgM6nohO8NzvVEEvCMOob16kw85YeZUnNFLCSt rEPTkToloUTBTFRyqyEhhh0X62WPdZd8kTpAKBxXdwDjJUf349uB5d4tTCVCXADcH Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Fri, 16 Nov 2018 22:35:03 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.25]) ([76.115.7.162]) by smtp423.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 7adc01c1c45b27ca153efd131a75b8e2; Fri, 16 Nov 2018 22:35:02 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Subject: Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC From: Mark Millard In-Reply-To: Date: Fri, 16 Nov 2018 14:35:02 -0800 Cc: ports-list freebsd Content-Transfer-Encoding: quoted-printable Message-Id: <03FFE5BB-777D-40D3-9AA3-C8C359BE1F2B@yahoo.com> References: To: Jan Beich X-Mailer: Apple Mail (2.3445.101.1) X-Rspamd-Queue-Id: 0FCCC6C819 X-Spamd-Result: default: False [-3.11 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com]; NEURAL_HAM_MEDIUM(-0.98)[-0.982,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_FROM(0.00)[yahoo.com]; NEURAL_HAM_LONG(-0.97)[-0.971,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCVD_IN_DNSWL_NONE(0.00)[84.64.137.98.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.89)[-0.888,0]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(0.24)[ipnet: 98.137.64.0/21(0.73), asn: 36647(0.58), country: US(-0.10)]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2018 22:35:06 -0000 On 2018-Nov-16, at 12:58, Jan Beich wrote: > Mark Millard writes: >=20 >> Jan Beich jbeich at FreeBSD.org wrote on >> Fri Nov 16 02:15:57 UTC 2018 : >>=20 >>> Mark Millard via freebsd-x11 writes: >>>=20 >>>> [Added: The original cross-build via poudriere-devel and = qemu-user-static >>>> did not get this problem. I give details later. Sumamry: Looks like = -O2 >>>> was used for the cross build and -O was used for armv7 native. The >>>> difference is likely(?) from my materials but not supporting both = ways of >>>> building is likely a problem with the port(?).] >>>=20 >>> x11/pixman builds fine on armv7 even with -O. Tested both Clang/LLD = 6.0 >>> and 7.0 after forcing MACHINE_CPUARCH=3Darm on command line. > [...] >> Do you have a log that would show the commands that were used to = produce >> the things that were listed in my original report for the "R_ARM_V4BX >> against local in readonly segment": >=20 > Build logs: > - clang/lld 6.0: https://ptpb.pw/5dip (via devel/llvm60) > - clang/lld 7.0: https://ptpb.pw/wwi9 (via native-xtools) > - -mcpu=3Dcortex-a7: https://ptpb.pw/_zAP Thanks. You tried a cross-build via QEMU_EMULATING=3D1 with CC=3Dclang60 and links using -fuse-ld=3D/usr/local/bin/ld.lld60 and -O instead of -O2 . Looks like /nxb-bin/. . . was not involved. No -mcpu in use. Using pixman-arm-simd-asm-scaled as an example: I do not see other differences in the command used to produce .libs/pixman-arm-simd-asm-scaled.o . That still leave system clang/llvm vs. devel/llvm60 patch levels or configuration vs. system clang/llvm and such as possibilities for variations. clang/llvm 7 material are definitely more recent than anything that I've used. Again I do not see any other differences in command used to produce .libs/pixman-arm-simd-asm-scaled.o . And nothing when -mcpu=3Dcortex-a7 is in your test either. So far all tests via amd64->armv7 cross-builds do not report the problem, yours and mine. Only a native build on armv7 has generated the messages. So far I'm the only one that has tried that sort of context in this investigation as far as I know. We do have https://bugs.llvm.org/show_bug.cgi?id=3D38303 as a report from a linux context for cross-building to Android, specifically for a pixman example for the same problem. So, whatever the issue is, it is not strictly local to my context. But the question is probably more "why was R_ARM_V4BX relocation record generated at all?" than the messages produced when the relocation records are discovered by lld. Does the llvm60 and llvm70 configuration deal with older arm's that do not have bx instructions? Might the system clang/llvm have enabled supporting such so that it outputs the V_ARM_V4BX relocation records? (Just pondering.) If yes: This seems to imply lld is then to be avoided, at least when there may be bx lr code (and so the V_ARM_V4BX use). My native armv7 configuration's system clang/llvm was in use and is still at: # cc -v FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on = LLVM 6.0.1) Target: armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: /usr/bin # ld -v LLD 6.0.1 (FreeBSD 335540-1300000) (compatible with GNU linkers) But the cross-build /nxb-bin/. . . was also based on the building the same sources. The whole buildworlds were based on the same sources. I'm still no closer to correctly identifying what makes the difference for my native build vs. cross building. So far the effort has just eliminated various ideas for possibilities. (It also lead to the poudriere/nxb-bin/ discovery of the -O2 vs. -O sys.mk code not picking the intended -O for arm*, including armv6 and armv7.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)