From owner-freebsd-ports@freebsd.org Wed Jul 22 08:03:29 2020 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC9EC375DB0 for ; Wed, 22 Jul 2020 08:03:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-23.consmr.mail.gq1.yahoo.com (sonic311-23.consmr.mail.gq1.yahoo.com [98.137.65.204]) (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 4BBSdX5lwmz3bTc for ; Wed, 22 Jul 2020 08:03:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: ekuLU24VM1kO05efRoNtQYb0YugttBPbsXSHJ3BjlVlksDF17wpxqhXbfxDWtwM omCusJ3SUGn3FNsFsmHdT92m_Rh7ue98gTn7uZzHiy.Hx6foyCYVZa92vfqgGiII9gcAgVpOfn9M mZaSntGfXXP34Wr6kpJAm5SCxb9qQyS2IjP5hFFuWvYqsSfpV2zshDRgP.mXnClhwVgaMQYuUwZ0 AvBG9C5BNGyXyWNc5QgT6aI8cp7_._k9mH4ZAvbF5CoWlzFthayLwGYAt636NXlOZYdnkOar9qAD 8fi3BJGqOd.xP8fJRILpiiPwponpbs2t30EeoVblCrxpyosfoNpVRyk4LDjc1Yuo17z13DLtDhbm t6R4ampsYVZb7snhYksD5t2Hnoq7HFoc4HvrwiwJAY1hNb.nqUSF1odWtGcDYppC.Ge3_K.5xBLR 7CRfOIsFxVUivfyrLrhaVUVCsYZRrV9iF85KXHzLvEW_Q1qmaC4I2ouQWIN59mUlVUMMMI99DnGI V9pCJq543BRxtsnrcQ7.rvTUHTkmccjdZ9CpG.nCIyjS94GUWXF7IrFkEzJ7mfjnmhz4TiiS8Xkk IdTNCkmLP4PRMYrehpJzaC4uzOzaloFL2FxdfhEu5OVU1v3SW2TBDt2ppt0URHm8_YKgdFXMi08N .QloEKNKWoERWSS45x8wIJNNcJw7VvKqZsbk9oUyxXUPVkfo77L7BjCLxh6guGiaCbzfDcxSsxEx 16P2UyEDMruJTgYK4aKy4BL4nGgPRTv8a9eMg9wk9jgHWhre9JdESc8seGb0hKf6jrK.CawoP0Kq U9ZzYf8pTbvSMKuIFEJCRVDUKa5yS.csqLwpmm.waiZrt9r8hjV0fRfD_tme71eI7M7RmHs0zPi2 kcBQcJJ2h9xn8KwgWMABMxNgJ1o5z.0sYeE3YLNJI_jswXhvuatCpih8.1a0sQ68k_qOFj2vn5FU AN0RRL1DElMdg95Lq1XWMaEk0cx1.YH_BSwq9I.3LkDiiVLPouAs0qSxshWx1yb975l0RFCyU2bL f_cF_VfKOChZjb2Aa.lkem_eVkST00RtoHONsoVwCdm7SwNcK8TuGXPxauNMxXr99n64GfmP2JUb W7HtQegbcxo80r9ly7OcgQ5G_jB5L9b0UV_B_kfsIHn4z2wDf1t3WNFi0.bbsSU_c1gycy__5wwP ongQz0S44nQiKO8scIE.inJF5aKHjtiAjChcNf7gWO2EzZK7iI4Izzn4bCKc3sFDUpEgBNhCCKpw Ex07qB9LhJTOQ3xBwdPQC5_P8CDYPtAJt.S1OR26k7tlUMbB3nvcalHPIdjOP0ZTuJ8mdBsewjVK pK79ugIimAm4haSh3tsW7PlZ_f.pQ6TlfW.my7w77KWIbG.4qsj4M55dz4cAUy6hltjYmuTK8Sz3 iakXL6Ex8hbv74ytr65XAjZbUYTM- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.gq1.yahoo.com with HTTP; Wed, 22 Jul 2020 08:03:26 +0000 Received: by smtp423.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a37c0867da1ad973cd862b24e27c5b6b; Wed, 22 Jul 2020 08:03:25 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Why lang/gcc9 depends native-binutils ? From: Mark Millard In-Reply-To: <202007220723.06M7N3qm051026@kx.truefc.org> Date: Wed, 22 Jul 2020 01:03:24 -0700 Cc: FreeBSD ports Content-Transfer-Encoding: quoted-printable Message-Id: References: <6B21B9C0-62D5-4ED7-94EE-7715B002F160.ref@yahoo.com> <6B21B9C0-62D5-4ED7-94EE-7715B002F160@yahoo.com> <202007220723.06M7N3qm051026@kx.truefc.org> To: KIRIYAMA Kazuhiko X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4BBSdX5lwmz3bTc X-Spamd-Bar: - X-Spamd-Result: default: False [-1.94 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.42)[-0.424]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.019]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; NEURAL_HAM_LONG(-1.00)[-0.996]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.204:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.204:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2020 08:03:29 -0000 On 2020-Jul-22, at 00:23, KIRIYAMA Kazuhiko wrote: > Hi, Mark >=20 > On Tue, 21 Jul 2020 17:51:41 +0900, > Mark Millard via freebsd-ports wrote: >>=20 >> KIRIYAMA Kazuhiko kiri at truefc.org wrote on >> Tue Jul 21 02:33:25 UTC 2020 : >>=20 >>> checking for iconv declaration...=20 >>> extern size_t iconv (iconv_t cd, char * *inbuf, size_t = *inbytesleft, char * *outbuf, size_t *outbytesleft); >>> *** BFD does not support target native-unknown-freebsd13.0. >>> *** Look in bfd/config.bfd for supported targets. >>> gmake[3]: *** [Makefile:3563: configure-binutils] Error 1 >>> gmake[3]: Leaving directory = '/var/ports/work/usr/ports/devel/binutils/work-native/binutils-2.33.1' >>> gmake[2]: *** [Makefile:851: all] Error 2 >>> gmake[2]: Leaving directory = '/var/ports/work/usr/ports/devel/binutils/work-native/binutils-2.33.1' >>> =3D=3D=3D> Compilation failed unexpectedly. >>> Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the = failure to >>> the maintainer. >>> *** Error code 1 >>=20 >> lang/gcc9/Makefile references binutils via: >>=20 >> BUILD_DEPENDS+=3D ${LOCALBASE}/bin/as:devel/binutils >> RUN_DEPENDS+=3D ${LOCALBASE}/bin/as:devel/binutils >> . . . >> USE_BINUTILS=3D yes >>=20 >> The BUILD_DEPENDS and RUN_DEPENDS references to >> binutils are to the assembler that binutils >> generates and installs. So gcc9 needs to be able >> to use that assembler at both gcc9 build-time and >> gcc9 run-time. >>=20 >> The notation leaves the FLAVOR implicit/empty and >> so should lead to devel/binutils/Makefile using >> its line: >>=20 >> FLAVOR?=3D native >>=20 >> to assign the "native" for its own internal logic >> to use. >>=20 >>=20 >>=20 >> Hmm. The "target native-unknown-freebsd13.0" looks >> very odd to me. The only lines in the devel/binutils >> Makefile to deal with "unknown-" text directly are: >>=20 >> # grep -r unknown- /usr/ports/devel/binutils/ >> /usr/ports/devel/binutils/Makefile:BUTARGET?=3D = ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL} >> /usr/ports/devel/binutils/Makefile:BUTARGET=3D = x86_64-unknown-${OPSYS:tl}${OSREL} >>=20 >> (I'll later deal with an indirection where "_" is >> replaced by "-".) >>=20 >> Only the 1st line of that pair would potentially form >> "native-unknown-" text. >>=20 >> So looking at the context of the first line I find >> (". . ." for omitted lines): >>=20 >> FLAVOR?=3D native >> . . . >> .if ${FLAVOR} !=3D native >> PKGNAMEPREFIX=3D ${FLAVOR:C/_/-/g}- >> PLIST=3D ${PKGDIR}/pkg-plist-${FLAVOR:C/_/-/g} >>=20 >> .if ${PKGNAMEPREFIX:M*-*-} >> BUTARGET?=3D ${PKGNAMEPREFIX}${OPSYS:tl}${OSREL} >> .else >> BUTARGET?=3D ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL} >> .endif >>=20 >> . . . >>=20 >> CONFIGURE_ARGS+=3D --disable-shared \ >> --target=3D${BUTARGET} >> .endif >>=20 >>=20 >> (That is also the only instance of "--target=3D" in the >> Makefile.) >>=20 >> The ${FLAVOR} !=3D native test should mean that the code >> is not used for FLAVOR being exactly "native". >>=20 >> There is a separate code block for: >>=20 >> .if ${FLAVOR} =3D=3D native >> BUREMOVE=3D coffdump \ >> dlltool \ >> dllwrap \ >> nlmconv \ >> srconv \ >> sysdump \ >> windmc \ >> windres >> USES+=3D localbase >> CONFIGURE_ARGS+=3D --with-system-zlib \ >> --with-gmp=3D${LOCALBASE} \ >> --with-mpfr=3D${LOCALBASE} \ >> --enable-targets=3Dall \ >> --enable-threads=3Dyes >> INFO=3D as \ >> binutils \ >> gprof \ >> bfd \ >> ld >> .endif >>=20 >> But that code does not specify a specific target >> (instead: "--enable-targets=3Dall"). >>=20 >> There is the FLAVOR value "riscv32_unknown_elf" that >> could produce target "riscv32-unknown-elf-freebsd13.0" >> but that is not what was reported as involved. >>=20 >> I've ignored CROSS_TOOLCHAIN infrastructure as >> it was not mentioned as being in use. >>=20 >> I do not see how devel/binutils/Makefile would >> generate "native-unknown-freebsd13.0" text on >> its own. >>=20 >>=20 >> Sorry I've not been able to identify anything for >> the error. >>=20 >> I'll note that I build ports with poudriere (-devel >> variant) and have not had the problem in that >> context. >>=20 >=20 > I forgot to say that make target is `package-recursive'. I > tried to get PKGNAME with package-depends: >=20 >=20 > root@jdtpkxb:/usr/ports/lang/gcc9 # make -ki package-depends > gmp-6.2.0:math/gmp > indexinfo-0.3.1:print/indexinfo > mpfr-4.0.2:math/mpfr > mpc-1.1.0_2:math/mpc > native-binutils-2.33.1_2,1:devel/binutils > root@jdtpkxb:/usr/ports/lang/gcc9 #=20 >=20 >=20 > But PKGNAME in devel/binutils is: >=20 > root@jdtpkxb:/usr/ports/devel/binutils # make -VPKGNAME > binutils-2.33.1_2,1 > root@jdtpkxb:/usr/ports/devel/binutils #=20 >=20 > I don't know why it is. As far as I see > devel/binutils/Makefile, FLAVOR default is `native' and > PKGNAMEPREFIX should be null. >=20 > What happens ? Hmm. The list from -ki package-depends is not always specific to one specific use. For example, on a development machine where various flavors of binutils have been built and installed. First I show the list of various flavors installed: # pkg info "*binutils*" aarch64-binutils-2.33.1_2,1 aarch64-none-elf-binutils-2.33.1_2,1 amd64-binutils-2.33.1_2,1 binutils-2.33.1_2,1 powerpc-binutils-2.33.1_2,1 powerpc64-binutils-2.33.1_2,1 (If you do the above does one of the lines of output have "native-" as a prefix?) But here is what -ki package-depends reports for lang/gcc9: # cd /usr/ports/lang/gcc9/ # make -ki package-depends gmp-6.2.0:math/gmp indexinfo-0.3.1:print/indexinfo mpfr-4.1.0:math/mpfr mpc-1.1.0_2:math/mpc aarch64-binutils-2.33.1_2,1:devel/binutils aarch64-none-elf-binutils-2.33.1_2,1:devel/binutils amd64-binutils-2.33.1_2,1:devel/binutils binutils-2.33.1_2,1:devel/binutils powerpc-binutils-2.33.1_2,1:devel/binutils powerpc64-binutils-2.33.1_2,1:devel/binutils Note that I do not get a one prefixed with "native-" but I get every one of the installed flavors of binutils is listed, not just one. For reference, in my context: # make -VPKGNAME binutils-2.33.1_2,1 What happens if you try: # pkg info native-binutils ? For reference, my context gets: # pkg info native-binutils pkg: No package(s) matching native-binutils # pkg info binutils binutils-2.33.1_2,1 Name : binutils Version : 2.33.1_2,1 Installed on : Thu Jan 30 01:34:52 2020 PST Origin : devel/binutils Architecture : FreeBSD:13:amd64 Prefix : /usr/local Categories : devel Licenses : GPLv3, LGPL3 Maintainer : bapt@FreeBSD.org WWW : https://www.gnu.org/software/binutils/ Comment : GNU binary tools Options : NLS : on RELRO : off STATIC : off Shared Libs required: libintl.so.8 Annotations : FreeBSD_version: 1300075 cpe : = cpe:2.3:a:gnu:binutils:2.33.1:::::freebsd13:x64:2 flavor : native repo_type : binary repository : custom Flat size : 658MiB Description : The GNU Binutils are a collection of binary tools. The main ones are: * ld - the GNU linker. * as - the GNU assembler. Most of these programs use BFD, the Binary File Descriptor library, to = do low-level manipulation. Many of them also use the opcodes library to = assemble and disassemble machine instructions. This port may be used as a replacement for the system binutils and = support features from the latest versions of GCC. For cross-compilation, see the devel/cross-binutils port. WWW: https://www.gnu.org/software/binutils/ =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)