From owner-freebsd-ppc@FreeBSD.ORG Sun Jun 29 23:44:06 2014 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CD1E202 for ; Sun, 29 Jun 2014 23:44:06 +0000 (UTC) Received: from asp.reflexion.net (outbound-245.asp.reflexion.net [69.84.129.245]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4ED624B8 for ; Sun, 29 Jun 2014 23:44:05 +0000 (UTC) Received: (qmail 15047 invoked from network); 29 Jun 2014 23:43:58 -0000 Received: from unknown (HELO mail-cs-05.app.dca.reflexion.local) (10.81.19.5) by 0 (rfx-qmail) with SMTP; 29 Jun 2014 23:43:58 -0000 Received: by mail-cs-05.app.dca.reflexion.local (Reflexion email security v7.30.3) with SMTP; Sun, 29 Jun 2014 19:43:58 -0400 (EDT) Received: (qmail 3405 invoked from network); 29 Jun 2014 23:43:57 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (DHE-RSA-AES256-SHA encrypted) SMTP; 29 Jun 2014 23:43:57 -0000 X-No-Relay: not in my network Received: from [192.168.1.8] (c-98-246-178-138.hsd1.or.comcast.net [98.246.178.138]) by iron2.pdx.net (Postfix) with ESMTPSA id 897341C43A2 for ; Sun, 29 Jun 2014 16:43:52 -0700 (PDT) From: Mark Millard Message-Id: <5FE198AB-4C23-40B4-A177-A06C36FC920B@dsl-only.net> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: powerpc64 10.0-STABLE's clang 3.4.1: also successfully built devel/libcxxrt , devel/libc++ , and nearly devel/boost-all Date: Sun, 29 Jun 2014 16:43:56 -0700 References: <5E467F62-3CED-4255-B3F7-02877AE4FB37@dsl-only.net> <6AE7061F-F4BD-461D-A50B-FF896B3CB85F@dsl-only.net> To: freebsd-ppc@freebsd.org In-Reply-To: X-Mailer: Apple Mail (2.1878.2) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2014 23:44:06 -0000 The same small Makefile change for libc++ and 3 small compiled.mk = changes for boost-all (well, boost-libs's use of boost-all materials) = get the same result for powerpc64 10.0-STABLE's clang 3.4.1 = compiling/linking devel/libcxxrt , devel/libc++, and boost-all (well = boost-libs) that powerpc 10.0-STABLE's clang 3.4.1 got (again based on = the older /usr/ports/Mk/Uses/compiler.mk so that clang would be used): = the lack of a binary compatible icu/iconv is the first thing to stop it = and 10849 boost-targets build before that happens. No = libboost_locale.*'s builds are attempted but the install stage fails = from not finding them. (Of course, without powerpc64 packages being available, the list of = prerequisites was built based on using portmaster for all of them (but = itself). print/textinfo also showed up in the list. The history below is = from the prior powerpc material.) Side note: I had to sidestep the problem with = FreeBSD-10.0-STABLE-powerpc-powerpc64-20140622-r267746-disk1.iso based = CDs on the PowerMac G5's I have hanging on boot --the hang being between Loading /build/defaults/loader.conf that was displayed and the never displayed /build/kernel/kernel data=3D... src=3D[...] line (not even the /b shows up). My pure hack was to use two SSD's, boot = one for powerpc (not 64), use bsdinstall to quickly get a partial = powerpc64 environment on the other SSD, boot starting from this other = SSD but when it reported not being able to use/mount the root file = system form the SSD, answer its prompt by telling it to boot the root = file system from the CD instead. After that things went fine even though = it involved deleting and re-creating the partition(s) on the involved = SSD. Every 10.0-stable .iso that I've tried had the same hang at the same = point. But before the last several there are many that I'd not tried: I = skipped many between attempts back then. 10.0-RELEASE did not have the = problem and installed fine when I tried it. 9.3-RC2 and other 9.3's and = 9.2-STABLE's that I've tried also did not have the problem: Only = 10.0-STABLE so far. (I've not tried 11.0-CURRENT at all.) Two different = vintages of PowerMac G5's, multiple CD's, and fully uniform results. Mac = OS X 10.5 and its installation media had no problems. Nor did lubuntu = 14.04 when I tried it as a cross check. Only 10.0-STABLE. =3D=3D=3D Mark Millard markmi@dsl-only.net On Jun 27, 2014, at 11:08 AM, Mark Millard wrote: I had noted the icu (and iconv) vs. the "no" status boost lists and... Looking around: boost tries to compile/link/run examples bound to icu = and iconv to determine if they are usable. The gcc based ones for = powerpc are apparently not binary compatible with clang so = libboost_locale.* can not use them and so as stands no attempt is made = to build the various libboost_locale.* when boost is built. But the = port's install action is not conditional and notices the incompleteness. =46rom a particular point of view it is too bad that libboost_locale.* = not matching icu and/or iconv blocks other parts of boost from being = installed that would not be dependent on that binary compatibility = status: more could be tested up front. (Not that splitting it out on its = own would necessarily be easy or even reasonable.) =3D=3D=3D Mark Millard markmi at dsl-only.net On Jun 27, 2014, at 8:19 AM, Mark Millard wrote: I see there were dumb editing errors in the last part of my updated = compiled.mk : I messed up the quoting for my addition. So a new diff is = needed to supply missing \'s for nested quotes and a missing quote ("). = But I was more trying to suggest background information that would = contribute to an official fix --instead of providing "the patches" = directly: there may be better alternatives to my specifics. --- compiled.mk.original 2014-06-27 01:03:06.000000000 -0700 +++ compiled.mk 2014-06-27 08:03:47.000000000 -0700 @@ -20,7 +20,9 @@ # Our compiler-flags will be added AFTER those set by bjam. We remove # the optimization level, because Boost sets it itself (to -O3 in case # of gcc/g++): -BJAM_ARGS+=3D cxxflags=3D"${CXXFLAGS:N-O*}" cflags=3D"${CFLAGS:N-O*}" +BJAM_ARGS+=3D cxxflags=3D"${CXXFLAGS:N-O*} = -I${LOCALBASE}/include/c++/v1" cflags=3D"${CFLAGS:N-O*}" + +BJAM_ARGS+=3D linkflags=3D"${LINKFLAGS} -L${LOCALBASE}/lib" =20 BOOST_TOOLSET=3D ${CHOSEN_COMPILER_TYPE} =20 @@ -52,7 +54,7 @@ =20 post-patch: .if defined(USE_BINUTILS) - @${ECHO} "using ${BOOST_TOOLSET} : : ${CXX} : = -B${LOCALBASE}/bin ;" >> = ${WRKSRC}/tools/build/v2/user-config.jam + @${ECHO} "using ${BOOST_TOOLSET} : : ${CXX} : = \"-B${LOCALBASE}/bin -L${LOCALBASE}/lib\" ;" >> = ${WRKSRC}/tools/build/v2/user-config.jam .else @${ECHO} "using ${BOOST_TOOLSET} : : ${CXX} ;" >> = ${WRKSRC}/tools/build/v2/user-config.jam .endif =3D=3D=3D Mark Millard markmi at dsl-only.net On Jun 27, 2014, at 7:24 AM, Mark Millard wrote: [The following does not deal with libboost_locale.* issues: boost warns = up front that - iconv (libc) : no - iconv (separate) : no - icu : no - icu (lib64) : no - Boost.Locale needs either iconv or ICU library to be built. But the 10849 attempted boost targets all built and it got to Installing for boost-libs-1.55.0_3 before the first error: various .../stage/usr/local/lib/libboost_locale.* not being found. I did not select to build Boost-Python.] The /usr/ports/Mk/Uses/compiler.mk is from before the recent changes = (so that clang would still be used like it was before). This test build got all the way to installing boost-libs-1.55.0_3 before = libboost_locale finally stopped it. devel/libcxxrt and devel/libc++ were installed. See = below. root@FBSDG41466M0:~ # portmaster -t devel/libcxxrt devel/libc++ = devel/boost-all =3D=3D=3D>>> Working on: devel/libcxxrt devel/libc++ devel/boost-all ... (Much omitted) ... =3D=3D=3D>>> Installation of devel/libcxxrt (libcxxrt-20131225_1) = succeeded ... (Much omitted) ... =3D=3D=3D>>> Installation of devel/libc++ (libc++-208080) succeeded ... (Much omitted) ... common.copy = /usr/ports/devel/boost-libs/work/stage/usr/local/lib/libboost_wave.a ...updated 10849 targets... =3D=3D=3D=3D> Compressing man pages (compress-man) =3D=3D=3D> Installing for boost-libs-1.55.0_3 =3D=3D=3D> Checking if devel/boost-libs already installed =3D=3D=3D> Registering installation for boost-libs-1.55.0_3 as = automatic pkg-static: = lstat(/usr/ports/devel/boost-libs/work/stage/usr/local/lib/libboost_locale= .a): No such file or directory pkg-static: = lstat(/usr/ports/devel/boost-libs/work/stage/usr/local/lib/libboost_locale= .so): No such file or directory pkg-static: = lstat(/usr/ports/devel/boost-libs/work/stage/usr/local/lib/libboost_locale= .so.1.55.0): No such file or directory pkg-static: = lstat(/usr/ports/devel/boost-libs/work/stage/usr/local/lib/libboost_locale= .so.5): No such file or directory *** Error code 74 Stop. make[1]: stopped in /usr/ports/devel/boost-libs *** Error code 1 Stop. make: stopped in /usr/ports/devel/boost-libs =3D=3D=3D>>> Installation of boost-libs-1.55.0_3 (devel/boost-libs) = failed =3D=3D=3D>>> Aborting update =3D=3D=3D>>> Update for devel/boost-libs failed =3D=3D=3D>>> Aborting update =3D=3D=3D>>> Update for devel/boost-all failed =3D=3D=3D>>> Aborting update =3D=3D=3D>>> The following actions were performed: Installation of devel/libcxxrt (libcxxrt-20131225_1) Installation of devel/libc++ (libc++-208080) It appears that I did not have the usual compiler/linker problems for built devel/libcxxrt , devel/libc++ , and devel/boost-all on powerpc using 10.0-STABLE's clang 3.4.1 --up to the boost-locale.* issues. The point of this was to see if compiling and linking could work. The = minor changes to devel/libc++/Makefile and devel/boost-all/compiled.mk , while very = small, were only intended to enable the test in my local environment: I do not claim wide = enough knowledge of freebsd for general updates. For devel/libc++/Makefile: --- Makefile.original 2014-06-27 06:17:19.000000000 -0700 +++ Makefile 2014-06-27 06:28:34.000000000 -0700 @@ -21,6 +21,7 @@ LIB_DEPENDS=3D libcxxrt.so:${PORTSDIR}/devel/libcxxrt =20 USES+=3D cmake:outsource compiler:c++11-lang +CXXFLAGS+=3D -nostdlib USE_LDCONFIG=3D yes LDFLAGS+=3D -L${LOCALBASE}/lib =20 For devel/boost-all/compiled.mk: --- compiled.mk.original 2014-06-27 01:03:06.000000000 -0700 +++ compiled.mk 2014-06-27 01:10:34.000000000 -0700 @@ -20,7 +20,9 @@ # Our compiler-flags will be added AFTER those set by bjam. We remove # the optimization level, because Boost sets it itself (to -O3 in case # of gcc/g++): -BJAM_ARGS+=3D cxxflags=3D"${CXXFLAGS:N-O*}" cflags=3D"${CFLAGS:N-O*}" +BJAM_ARGS+=3D cxxflags=3D"${CXXFLAGS:N-O*} = -I${LOCALBASE}/include/c++/v1" cflags=3D"${CFLAGS:N-O*}" + +BJAM_ARGS+=3D linkflags=3D"${LINKFLAGS} -L${LOCALBASE}/lib" =20 BOOST_TOOLSET=3D ${CHOSEN_COMPILER_TYPE} =20 @@ -52,7 +54,7 @@ =20 post-patch: .if defined(USE_BINUTILS) - @${ECHO} "using ${BOOST_TOOLSET} : : ${CXX} : = -B${LOCALBASE}/bin ;" >> = ${WRKSRC}/tools/build/v2/user-config.jam + @${ECHO} "using ${BOOST_TOOLSET} : : ${CXX} : = "-B${LOCALBASE}/bin -L${LOCALBASE}/lib ;" >> = ${WRKSRC}/tools/build/v2/user-config.jam .else @${ECHO} "using ${BOOST_TOOLSET} : : ${CXX} ;" >> = ${WRKSRC}/tools/build/v2/user-config.jam .endif Context & sequence leading to the "success": I did a fresh install from a CD of FreeBSD FBSDG41466M0 10.0-STABLE FreeBSD 10.0-STABLE #0 r267746: Mon Jun 23 08:52:41 UTC 2014 root@grind.freebsd.org:/usr/obj/powerpc.powerpc/usr/src/sys/GENERIC = powerpc This does not have libcxxrt or libc++ prebuilt but does have clang 3.4.1 providing a "freestanding implementation" of C++11. This was to a = PowerMac3,6 (G4 FW800), 2 GB RAM. /usr/ports/... without the recent changes to = /usr/ports/Mk/Uses/compiler.mk . This last is so that clang will be used like it used to be used. Then I got the following in place so the interesting stuff could be done = together without these mixed in: configure for pkg, /usr/sbin/pkg, pkg portmaster, portsnap fetch = extract, portmaster pkg (an update), pkg icu gettext gmake binutils bisdon m4 perl5 gmp mpfr cmake cmake-modules mpc boost-docs boost-jam, portmaster devel/icu (an update) print/texinfo-lite devel/perl5.16 (an update) (I've not looked into why icu is not found and used despite being = present and even built if missing. May be icu needs to be built with clang? I've no = clue.) Then I updated devel/libc++/Makefile and devel/boost-all/compiled.mk and = did portmaster devel/libcxxrt devel/libc++ devel/boost-all (I did not select to have Boost.Python built.) About the Makefile and compiled.mk adjustments: On another powermac I had tried the sequence (before the /usr/ports/Mk/Uses/compiler.mk changes): portmaster devel/libcxxrt portmaster devel/libc++ cmake refused during the last because it tried to pre-test the c++11 = environment for being a valid hosted c++ implementation (i.e., standard library present = and working to some extent), including testing use of -lc++ notation for linking. Such = testing failed, of course: clang is not yet a hosted implementation at this stage. devel/libcxxrt did not complain but it has CXXFLAGS that includes = -nostdlib and that avoids the test of the hosted implementation status: free standing = implementation only. So I manually added -nostdlib into CXXFLAGS for devel/libc++/Makefile = and then devel/libc++ built when I tried portmaster again. devel/boost-all did not automatically look in /usr/local/include/c++/v1/ = and /usr/local/lib/ where devel/libc++'s build put things. So for devel/boost-all I then added -I${LOCALBASE}/include/c++/v1 to = cxxflags in BJAM_ARGS and =20 added linkflags=3D-L${LOCALBASE}/lib to BJAM_ARGS and also added = -L${LOCALBASE}/lib to (just in case). =3D=3D=3D Mark Millard markmi@dsl-only.net