Date: Fri, 27 Jun 2014 11:08:06 -0700 From: Mark Millard <markmi@dsl-only.net> To: freebsd-ppc@freebsd.org Subject: Re: powerpc 10.0-STABLE's clang 3.4.1: successfully built devel/libcxxrt , devel/libc++ , and nearly devel/boost-all Message-ID: <D67166EA-1D0F-4354-90F9-D34508A55C42@dsl-only.net> In-Reply-To: <6AE7061F-F4BD-461D-A50B-FF896B3CB85F@dsl-only.net> References: <5E467F62-3CED-4255-B3F7-02877AE4FB37@dsl-only.net> <6AE7061F-F4BD-461D-A50B-FF896B3CB85F@dsl-only.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <markmi@dsl-only.net> 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} : = <linkflags>-B${LOCALBASE}/bin ;" >> = ${WRKSRC}/tools/build/v2/user-config.jam + @${ECHO} "using ${BOOST_TOOLSET} : : ${CXX} : = <linkflags>\"-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 <markmi@dsl-only.net> 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} : = <linkflags>-B${LOCALBASE}/bin ;" >> = ${WRKSRC}/tools/build/v2/user-config.jam + @${ECHO} "using ${BOOST_TOOLSET} : : ${CXX} : = <linkflags>"-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 <linkoptions> (just in case). =3D=3D=3D Mark Millard markmi@dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D67166EA-1D0F-4354-90F9-D34508A55C42>