From owner-freebsd-pkg@freebsd.org Sat Feb 3 20:46:59 2018 Return-Path: Delivered-To: freebsd-pkg@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 84FA0EEB5C2 for ; Sat, 3 Feb 2018 20:46:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 091857A32D for ; Sat, 3 Feb 2018 20:46:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id BE906EEB5B8; Sat, 3 Feb 2018 20:46:58 +0000 (UTC) Delivered-To: pkg@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 8BBB7EEB5B5 for ; Sat, 3 Feb 2018 20:46:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 235D07A310 for ; Sat, 3 Feb 2018 20:46:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 5035613EBE for ; Sat, 3 Feb 2018 20:46:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w13KkvQn001786 for ; Sat, 3 Feb 2018 20:46:57 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w13KkvSV001783 for pkg@FreeBSD.org; Sat, 3 Feb 2018 20:46:57 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: [Bug 224217] [patch] Fix cross build of base/ ports Date: Sat, 03 Feb 2018 20:46:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Feb 2018 20:46:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224217 --- Comment #14 from Mark Millard --- (In reply to Steve Wills from comment #12) Context: # uname -apKU FreeBSD FBSDFSSD 12.0-CURRENT FreeBSD 12.0-CURRENT r327485M amd64 amd64 1200054 1200054 with cross build attempted for targeting powerpc64. base/binutils did not build once I got needed tools in place. This stage is tied to the README's: 4/ build the required port $ cd base/binutils make CROSS_TOOLCHAIN=3Dsparc64-gcc CROSS_SYSROOT=3D/sysroots/sparc64 package (but with powerpc64-gcc and my cross-sysroot path). Summary of failures: I had to install devel/bison and devel/gmake to even get started. devel/powerpc64-xtoolchain-gcc is insufficient. (I had it installed already.) It then looked for powerpc64-unknown-freebsd12.0-ar but no such exists. Instead there is: /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc-ar which is from: # pkg which /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc-ar /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc-ar was installed by package powerpc64-gcc-6.3.0 With that I stopped instead of providing a workaround this time. Detail steps/sequence for as far as I got: I used a pre-existing installworld : /usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils/ from having built with the system clang and devel/powerpc64-binutils instead of with gcc 4.2.1 . (I normally experiment with clang based targeting for powerpc64 and powerpc.) I reverted /usr/ports/base and then applied the patch. So: # svnlite status /usr/ports/base | sort M /usr/ports/base/gcc/Makefile M /usr/ports/base/gcc/distinfo M /usr/ports/base/gcc/pkg-plist became: # svnlite status /usr/ports/base/ M /usr/ports/base/binutils/Makefile M /usr/ports/base/gcc/Makefile M /usr/ports/base/gcc/distinfo ? /usr/ports/base/gcc/files/patch-Makefile.in ? /usr/ports/base/gcc/files/patch-gcc-Makefile.in ? /usr/ports/base/gcc/files/patch-gcc-configure M /usr/ports/base/gcc/pkg-plist For reference: # pkg info "powerpc64*" powerpc64-binutils-2.29.1,1 powerpc64-gcc-6.3.0 powerpc64-xtoolchain-gcc-0.2 I then: # make CROSS_TOOLCHAIN=3Dpowerpc64-gcc CROSS_SYSROOT=3D/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils package I left RELRO and STATIC unchecked. The result was: =3D=3D=3D> License GPLv3 LGPL3 accepted by the user =3D=3D=3D> freebsd-binutils-2.29.1 depends on file: /usr/local/sbin/pkg -= found =3D=3D=3D> Fetching all distfiles required by freebsd-binutils-2.29.1 for b= uilding =3D=3D=3D> Extracting for freebsd-binutils-2.29.1 =3D> SHA256 Checksum OK for binutils-2.29.1.tar.bz2. =3D=3D=3D> Patching for freebsd-binutils-2.29.1 =3D=3D=3D> Applying FreeBSD patches for freebsd-binutils-2.29.1 /usr/bin/sed -i.bak -e "s/-ldl//g" /wrkdirs/usr/ports/base/binutils/work/binutils-2.29.1/gold/testsuite/Makefi= le.in =3D=3D=3D> freebsd-binutils-2.29.1 depends on executable: bison - not fou= nd =3D=3D=3D> freebsd-binutils-2.29.1 depends on executable: bison - not fou= nd *** Error code 1 Stop. make[1]: stopped in /usr/ports/base/binutils *** Error code 1 Stop. make: stopped in /usr/ports/base/binutils Nothing in the README indicated to have bison ready first. So. . . # pkg install bison Trying again. . . Similar sequence for gmake: # pkg install gmake Finally . . . # make CROSS_TOOLCHAIN=3Dpowerpc64-gcc CROSS_SYSROOT=3D/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils package =3D=3D=3D> freebsd-binutils-2.29.1 depends on executable: bison - found =3D=3D=3D> freebsd-binutils-2.29.1 depends on executable: gmake - found =3D=3D=3D> Configuring for freebsd-binutils-2.29.1 configure: loading site script /usr/ports/Templates/config.site . . . checking for insque... yes checking for memchr... rm -f libz.a powerpc64-unknown-freebsd12.0-ar cru libz.a libz_a-adler32.o libz_a-compres= s.o libz_a-crc32.o libz_a-deflate.o libz_a-gzread.o libz_a-gzclose.o libz_a-gzwrite.o libz_a-gzlib.o libz_a-infback.o libz_a-inffast.o libz_a-inflate.o libz_a-inftrees.o libz_a-trees.o libz_a-uncompr.o libz_a-zutil.o=20 gmake[4]: powerpc64-unknown-freebsd12.0-ar: Command not found gmake[4]: *** [Makefile:401: libz.a] Error 127 gmake[4]: Leaving directory '/wrkdirs/usr/ports/base/binutils/work/binutils-2.29.1/zlib' gmake[3]: *** [Makefile:9026: all-zlib] Error 2 gmake[3]: *** Waiting for unfinished jobs.... yes . . . Using Make_JOBS_UNSAFE: # make MAKE_JOBS_UNSAFE=3Dyes CROSS_TOOLCHAIN=3Dpowerpc64-gcc CROSS_SYSROOT=3D/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils package . . . /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc -c -DHAVE_CONFIG_H -O2 -pi= pe=20 --sysroot=3D/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils -isy= stem /usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils/usr/include --sysroot=3D/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils -isy= stem /usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils/usr/include -g -fstack-protector -fno-strict-aliasing --sysroot=3D/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils -isy= stem /usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils/usr/include --sysroot=3D/usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils -isy= stem /usr/obj/DESTDIRs/clang-powerpc64-installworld_altbinutils/usr/include -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./strverscmp.c -o strverscmp.o rm -f ./libiberty.a pic/./libiberty.a noasan/./libiberty.a powerpc64-unknown-freebsd12.0-ar rc ./libiberty.a \ ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o ./sha1.o ./alloca.o ./arg= v.o ./choose-temp.o ./concat.o ./cp-demint.o ./crc32.o ./d-demangle.o ./dwarfnames.o ./dyn-string.o ./fdmatch.o ./fibheap.o ./filename_cmp.o ./floatformat.o ./fnmatch.o ./fopen_unlocked.o ./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o ./hashtab.o ./hex.o ./lbasename.o ./lrealpath.o ./make-relative-prefix.o ./make-temp-file.o ./objalloc.o ./obstack.o ./partition.o ./pexecute.o ./physmem.o ./pex-common.o ./pex-one.o ./pex-uni= x.o ./vprintf-support.o ./rust-demangle.o ./safe-ctype.o ./simple-object.o ./simple-object-coff.o ./simple-object-elf.o ./simple-object-mach-o.o ./simple-object-xcoff.o ./sort.o ./spaces.o ./splay-tree.o ./stack-limit.o ./strerror.o ./strsignal.o ./timeval-utils.o ./unlink-if-ordinary.o ./xasprintf.o ./xatexit.o ./xexit.o ./xmalloc.o ./xmemdup.o ./xstrdup.o ./xstrerror.o ./xstrndup.o ./xvasprintf.o ./mempcpy.o ./strverscmp.o gmake[4]: powerpc64-unknown-freebsd12.0-ar: Command not found gmake[4]: *** [Makefile:250: libiberty.a] Error 127 gmake[4]: Leaving directory '/wrkdirs/usr/ports/base/binutils/work/binutils-2.29.1/libiberty' gmake[3]: *** [Makefile:8013: all-libiberty] Error 2 gmake[3]: Leaving directory '/wrkdirs/usr/ports/base/binutils/work/binutils-2.29.1' gmake[2]: *** [Makefile:849: all] Error 2 gmake[2]: Leaving directory '/wrkdirs/usr/ports/base/binutils/work/binutils-2.29.1' *** Error code 1 Stop. make[1]: stopped in /usr/ports/base/binutils *** Error code 1 Stop. make: stopped in /usr/ports/base/binutils # find /usr/local/bin/ -name "*powerpc64*-ar*" -print /usr/local/bin/powerpc64-freebsd-ar /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc-ar I've not done any work arounds to get farther into the sequence to get other evidence for how things would go. --=20 You are receiving this mail because: You are on the CC list for the bug.=