From owner-freebsd-ppc@freebsd.org Sat Oct 6 06:10:38 2018 Return-Path: Delivered-To: freebsd-ppc@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 67A8510CA31C for ; Sat, 6 Oct 2018 06:10:38 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-20.consmr.mail.ne1.yahoo.com (sonic306-20.consmr.mail.ne1.yahoo.com [66.163.189.82]) (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 0536A84B82 for ; Sat, 6 Oct 2018 06:10:37 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 0FUEkoIVM1mO4ce7.LY0RVvh6d51ysPo27mmEIChH_LuFn2rgCvvTAznEwrPCwf OEvmT3jn9vs1PLNL0xskTOetFz03DTn8a6EqzN.3aH8G_8xRkZ85HFt_NfmLhuBjBCL9b9nuFGkA BLo1uCEBroKYfM5r2qhZ3LL3QbPNY1l._ld1AwWbPrCQnMvQMPLPH68ybBJfbHr2jMYiNF5FKfPM WQJNmRMeTChLxEBnd7OoTefu3ehRjvVokfz7a1ind.xOsSnwlSaFwRPqPkvR3h78FuNqLE27Ry5h OiGtzhDfVECHZ5wXKaX.Kg89bk7io9VUMoVQ6mbO.PgzPgq09LNXMmBsTGx4XDTyeYNcUyV2azc0 CdV1Z.OdkPktYzqASJQQmfihqB3cSlOhqv_EYMKhOLRrCcl2bKvHntE9oaSfdqdkTRkpsigHsdnd FFP33K4otFVhF73GOzEhSKv85KyBbUYSl0Q8cAmzNA7MgL8lwZnxXJ5QIvCRNPqalUExGAiR8NNh YwRX1mYsnGaVxeNSf6cXrRVAhRI7zW6Zb6oAOe8I93pN13zC_dVi8pMSgJ48BgyCDYGL.Wauj5YX _I32sLhTABpsfxULsDQBExpkW5Vvd24xdBdTH2zdvyjNkxY1l_FVAvLmc70s3avprwzKcMDZ2v6s ixfdmKtOsqcYUTNicuE43UkjFG1H5tiJiZDm6roaDgpeUFiUMDJRH4V4O_jLHsL0tZTh6hBzHfD. 1b8myVEFQBhAQJ9LKRcomzlOK_8MLLorJnvSck4gMgWAgsjcAAjL1EQre4XV2NuNbMstemmHa5Cg VdU1Hrj_ryLhfh3Ljl2YalxbQJ2rd4rXBR5B12OKwf1KZDEnbUiZ1SVuGr0FHc8PRrb561n8HBNv kz7FXnhv9OZzDlMvabDZueNXyxYBJztHJrJs8Aw1Axbn4ZU.4d4qRigccJc.1tffGt4sWbJtFnwR V3YRh1JwsTC5RtoZbmtmHx8NF.trEhlI1H4UhuIx__A25YeaS6Yy_lqSVIBGj2QOPSLgLuup7RBZ .vumqsH8XiepJj.EjuIkaDEGSQRTCSfH5WYeXGcikRyvuuuyJPQdpg7dWBG8pC0Xb7w-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ne1.yahoo.com with HTTP; Sat, 6 Oct 2018 06:10:30 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.101]) ([76.115.7.162]) by smtp426.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 1ff73baf47add1e17f628df79a51eb2e; Sat, 06 Oct 2018 06:00:19 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: base/binutils vs. /usr/local/lib references and also: undefined reference to `pthread_create' (powerpc64 targeting example) Message-Id: <4C338B84-1179-4569-A964-CA18A22AF1D7@yahoo.com> Date: Fri, 5 Oct 2018 23:00:18 -0700 To: FreeBSD Toolchain , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2018 06:10:38 -0000 In trying to follow the base/binutils part of = https://wiki.freebsd.org/ExternalGCC (or /usr/ports/base/README) for targeting powerpc64 I got: ( My /etc/make.conf has: WRKDIRPREFIX?=3D/wrkdirs .) # cd ../../base/binutils/ # make CROSS_TOOLCHAIN=3Dpowerpc64-gcc = CROSS_SYSROOT=3D/usr/obj/DESTDIRs/xtcgcc-powerpc64-installworld package . . . --- recode-sr-latin --- /bin/sh ../libtool --tag=3DCC --mode=3Dlink = /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc = --sysroot=3D/usr/obj/DESTDIRs/xtcgcc-powerpc64-installworld -O2 -pipe = -DLIBICONV_PLUG -g -fno-strict-aliasing -o recode-sr-latin = recode_sr_latin-recode-sr-latin.o recode_sr_latin-filter-sr-latin.o = ../gnulib-lib/libgettextlib.la ../intl/libintl.la -L/usr/local/lib --- cldr_plurals-cldr-plural.o --- . . . --- recode-sr-latin --- libtool: link: /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc = --sysroot=3D/usr/obj/DESTDIRs/xtcgcc-powerpc64-installworld -O2 -pipe = -DLIBICONV_PLUG -g -fno-strict-aliasing -o .libs/recode-sr-latin = recode_sr_latin-recode-sr-latin.o recode_sr_latin-filter-sr-latin.o = ../gnulib-lib/.libs/libgettextlib.so = /wrkdirs/usr/ports/devel/gettext-tools/work/gettext-0.19.8.1/gettext-tools= /intl/.libs/libintl.so -L/usr/local/lib ../intl/.libs/libintl.so -lm = -lncurses -Wl,-rpath -Wl,/usr/local/lib --- hostname --- . . . --- recode-sr-latin --- = /wrkdirs/usr/ports/devel/gettext-tools/work/gettext-0.19.8.1/gettext-tools= /intl/.libs/libintl.so: undefined reference to `pthread_create' collect2: error: ld returned 1 exit status *** [recode-sr-latin] Error code 1 make[16]: stopped in = /wrkdirs/usr/ports/devel/gettext-tools/work/gettext-0.19.8.1/gettext-tools= /src The use of -L/usr/local/lib and -Wl,-rpath -Wl,/usr/local/lib look suspect for such cross builds: # ls /usr/obj/DESTDIRs/xtcgcc-powerpc64-installworld/usr/local/lib/ ls: /usr/obj/DESTDIRs/xtcgcc-powerpc64-installworld/usr/local/lib/: No = such file or directory Then there is also: undefined reference to `pthread_create'. Is there a missing -pthread or some such? (Or is the /usr/local/lib reference a cause?) [FYI: The earlier pkg build seem to have worked.] Looks like this way of getting to 12 or later for powerpc64 without use of gcc 4.2.1 is currently blocked. (The issue may not be limited to powerpc64.) (It is also unclear how the process involving base/* mixes with doing later FreeBSD updates from source --including any use of a delete-old step if WITHOUT_BINUTILS=3D is used at the time. For the cross = buildworld itself it is not clear what options are intended.) Notes about some typos on: https://wiki.freebsd.org/ExternalGCC /usr/ports/devel/ports-mgmt/pkg should be: /usr/ports/ports-mgmt/pkg 3 examples of CROSS_TOOCLAHIN should be: CROSS_TOOLCHAIN Notes about the /usr/ports/base/README : No mention is made of the pkg build so that it can be set up on the target. Only https://wiki.freebsd.org/ExternalGCC has that information. /usr/ports/base/README does not reference https://wiki.freebsd.org/ExternalGCC either. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)