From owner-freebsd-ports@freebsd.org Wed Jul 22 07:23:16 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 4C253375282 for ; Wed, 22 Jul 2020 07:23:16 +0000 (UTC) (envelope-from kiri@truefc.org) Received: from kx.truefc.org (1.212.52.36.ap.yournet.ne.jp [36.52.212.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp", Issuer "smtp" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BBRl61xJdz3Z69 for ; Wed, 22 Jul 2020 07:23:13 +0000 (UTC) (envelope-from kiri@truefc.org) Received: from kx.truefc.org (kx.truefc.org [36.52.212.1]) by kx.truefc.org (8.15.2/8.15.2) with ESMTP id 06M7N3qm051026; Wed, 22 Jul 2020 16:23:03 +0900 (JST) (envelope-from kiri@kx.truefc.org) Message-Id: <202007220723.06M7N3qm051026@kx.truefc.org> Date: Wed, 22 Jul 2020 16:23:03 +0900 From: KIRIYAMA Kazuhiko To: Mark Millard Cc: FreeBSD ports Subject: Re: Why lang/gcc9 depends native-binutils ? In-Reply-To: <6B21B9C0-62D5-4ED7-94EE-7715B002F160@yahoo.com> References: <6B21B9C0-62D5-4ED7-94EE-7715B002F160.ref@yahoo.com> <6B21B9C0-62D5-4ED7-94EE-7715B002F160@yahoo.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 MULE XEmacs/21.4 (patch 24) (Standard C) (amd64--freebsd) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BBRl61xJdz3Z69 X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of kiri@truefc.org has no SPF policy when checking 36.52.212.1) smtp.mailfrom=kiri@truefc.org X-Spamd-Result: default: False [3.95 / 15.00]; R_SPF_NA(0.00)[no SPF record]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.53)[0.528]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[truefc.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.66)[0.661]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.66)[0.664]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_TO(0.00)[yahoo.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:10013, ipnet:36.52.208.0/21, country:JP]; SUBJECT_ENDS_QUESTION(1.00)[]; ONCE_RECEIVED(0.10)[] 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 07:23:16 -0000 Hi, Mark On Tue, 21 Jul 2020 17:51:41 +0900, Mark Millard via freebsd-ports wrote: > > KIRIYAMA Kazuhiko kiri at truefc.org wrote on > Tue Jul 21 02:33:25 UTC 2020 : > > > checking for iconv declaration... > > 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' > > ===> Compilation failed unexpectedly. > > Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to > > the maintainer. > > *** Error code 1 > > lang/gcc9/Makefile references binutils via: > > BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils > RUN_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils > . . . > USE_BINUTILS= yes > > 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. > > The notation leaves the FLAVOR implicit/empty and > so should lead to devel/binutils/Makefile using > its line: > > FLAVOR?= native > > to assign the "native" for its own internal logic > to use. > > > > 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: > > # grep -r unknown- /usr/ports/devel/binutils/ > /usr/ports/devel/binutils/Makefile:BUTARGET?= ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL} > /usr/ports/devel/binutils/Makefile:BUTARGET= x86_64-unknown-${OPSYS:tl}${OSREL} > > (I'll later deal with an indirection where "_" is > replaced by "-".) > > Only the 1st line of that pair would potentially form > "native-unknown-" text. > > So looking at the context of the first line I find > (". . ." for omitted lines): > > FLAVOR?= native > . . . > .if ${FLAVOR} != native > PKGNAMEPREFIX= ${FLAVOR:C/_/-/g}- > PLIST= ${PKGDIR}/pkg-plist-${FLAVOR:C/_/-/g} > > .if ${PKGNAMEPREFIX:M*-*-} > BUTARGET?= ${PKGNAMEPREFIX}${OPSYS:tl}${OSREL} > .else > BUTARGET?= ${PKGNAMEPREFIX}unknown-${OPSYS:tl}${OSREL} > .endif > > . . . > > CONFIGURE_ARGS+= --disable-shared \ > --target=${BUTARGET} > .endif > > > (That is also the only instance of "--target=" in the > Makefile.) > > The ${FLAVOR} != native test should mean that the code > is not used for FLAVOR being exactly "native". > > There is a separate code block for: > > .if ${FLAVOR} == native > BUREMOVE= coffdump \ > dlltool \ > dllwrap \ > nlmconv \ > srconv \ > sysdump \ > windmc \ > windres > USES+= localbase > CONFIGURE_ARGS+= --with-system-zlib \ > --with-gmp=${LOCALBASE} \ > --with-mpfr=${LOCALBASE} \ > --enable-targets=all \ > --enable-threads=yes > INFO= as \ > binutils \ > gprof \ > bfd \ > ld > .endif > > But that code does not specify a specific target > (instead: "--enable-targets=all"). > > 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. > > I've ignored CROSS_TOOLCHAIN infrastructure as > it was not mentioned as being in use. > > I do not see how devel/binutils/Makefile would > generate "native-unknown-freebsd13.0" text on > its own. > > > Sorry I've not been able to identify anything for > the error. > > I'll note that I build ports with poudriere (-devel > variant) and have not had the problem in that > context. > I forgot to say that make target is `package-recursive'. I tried to get PKGNAME with package-depends: 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 # But PKGNAME in devel/binutils is: root@jdtpkxb:/usr/ports/devel/binutils # make -VPKGNAME binutils-2.33.1_2,1 root@jdtpkxb:/usr/ports/devel/binutils # I don't know why it is. As far as I see devel/binutils/Makefile, FLAVOR default is `native' and PKGNAMEPREFIX should be null. What happens ? > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" >