From owner-freebsd-ports@FreeBSD.ORG Wed Dec 28 17:47:43 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F6541065673; Wed, 28 Dec 2011 17:47:43 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.freebsd.org (Postfix) with ESMTP id 318A58FC1B; Wed, 28 Dec 2011 17:47:42 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1RfxbJ-0002ve-TA>; Wed, 28 Dec 2011 18:47:41 +0100 Received: from e178027189.adsl.alicedsl.de ([85.178.27.189] helo=thor.walstatt.dyndns.org) by inpost2.zedat.fu-berlin.de (Exim 4.69) with esmtpsa (envelope-from ) id <1RfxbJ-00031L-La>; Wed, 28 Dec 2011 18:47:41 +0100 Message-ID: <4EFB563D.2090705@zedat.fu-berlin.de> Date: Wed, 28 Dec 2011 18:47:41 +0100 From: "O. Hartmann" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Rainer Hurling References: <4EFAF3FC.60002@zedat.fu-berlin.de> <20111228135808.GW50300@deviant.kiev.zoral.com.ua> <4EFB2344.3000302@zedat.fu-berlin.de> <20111228142957.GX50300@deviant.kiev.zoral.com.ua> <4EFB447D.3000808@gwdg.de> In-Reply-To: <4EFB447D.3000808@gwdg.de> X-Enigmail-Version: undefined Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA0A081B733AD5F8AE3CAC91D" X-Originating-IP: 85.178.27.189 Cc: Kostik Belousov , Current FreeBSD , Ports FreeBSD Subject: Re: /usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/../../../libstdc++.a: could not read symbols: Bad value X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2011 17:47:43 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA0A081B733AD5F8AE3CAC91D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 12/28/11 17:31, schrieb Rainer Hurling: > On 28.12.2011 15:29 (UTC+1), Kostik Belousov wrote: >> On Wed, Dec 28, 2011 at 03:10:12PM +0100, O. Hartmann wrote: >>> Am 12/28/11 14:58, schrieb Kostik Belousov: >>>> On Wed, Dec 28, 2011 at 11:48:28AM +0100, O. Hartmann wrote: >>>>> Hello out here. >>>>> >>>>> I run into a problem since one of the last portupdates and I do not= >>>>> know >>>>> whether this has to do with binutils or gcc46 or even FreeBSD 9.0/1= 0.0 >>>>> AMD64. >>>>> >>>>> Background: >>>>> We use a scientific graphical toolset for planetary research called= >>>>> ISIS3, which is provided by the USGS. We patched ISIS3 to run on >>>>> FreeBSD >>>>> 8/9/10 so far and it ran well with FreeBSD 8.2-STABLE and 9.0-PRE a= >>>>> couple of weeks ago. >>>>> On all of my boxes, I do frequently a portupgrade, so I saw >>>>> binutils got >>>>> bumped up and gcc 4.6 is also getting really frequently changed >>>>> these days. >>>>> After a some portupdates within the last weeks, I just decided to >>>>> compile ISIS3 again to keep it "fresh and on track", but it won't >>>>> compile anymore. >>>>> >>>>> On all FreeBSD 9.0-PRERELEASE and FreeBSD 10.0-CURRENT (all AMD64 a= nd >>>>> CLANG built) I receive in some subfolders containing sources the >>>>> follwoing error: >>>>> >>>>> [...] >>>>> Adding API object [UniqueIOCachingAlgorithm] >>>>> Adding API object [UniversalGroundMap] >>>>> Adding API object [UserInterface] >>>>> Adding API object [VariableLineScanCameraDetectorMap] >>>>> Adding API object [VecFilter] >>>>> Adding API object [WorldMapper] >>>>> Adding API object [iException] >>>>> Adding API object [iString] >>>>> Adding API object [iTime] >>>>> Working on Package [mex] (11:30:15) >>>>> Adding API object [HrscCamera] >>>>> /usr/local/bin/ld: >>>>> /usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/../../../l= ibstdc++.a(functexcept.o): >>>>> >>>>> relocation R_X86_64_32 against `std::bad_exception::~bad_exception(= )' >>>>> can not be used when making a shared object; recompile with -fPIC >>>>> /usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/../../../l= ibstdc++.a: >>>>> >>>>> could not read symbols: Bad value >>>>> collect2: ld returned 1 exit status >>>>> gmake[5]: *** [plugin] Error 1 >>>>> cp: libHrscCamera.so: No such file or directory >>>>> gmake[4]: *** [install] Error 1 >>>> The error is completely clear as it is: the build tries to link stat= ic >>>> library libstdc++.so into shared object. This is not supported. >>> >>> Thanks, Kostik, for the fast response. >>> The error isn't so clear to me, sorry. I thought libstdc++.a is the >>> static library and it is taken to be referenced/compiled into a share= d >> Linked in. >> >>> object created by the application I try to compile. >> Right, and this is not supported. Code linked into shared object must >> be compiled PIC. An .a library usually does not contain objects compil= ed >> by PIC, ld just dutifully reported back. >> >>> >>> I'm much more confused now, since I thought the last time I compiled >>> that piece of software, I never got any error like that. Well, clang >>> fails with some obscure errors on the code itself and I'm unwilling t= o >>> correct them, I'll try the legacy gcc 4.2.1 and will report what's >>> happening. >> >> It might have worked by accident (because libstdc++.a objects referenc= ed >> during the link did not carried unsupported relocations), or, much mor= e >> likely, the build system has changed and started doing stupid things. >> It must not link static libraries into shared objects. >> >> You should examine why it does this, and fix it. Changing compilers is= >> just wasting a time. >=20 >=20 > Hmm, I get a similar error when trying to build lang/gcc46 on recent > 10-CURRENT: >=20 > ---------------------------------------------------------------- > [..snip..] > Making all in include > gmake[4]: Entering directory > `/usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-= v3/include' >=20 > mkdir -p ./x86_64-portbld-freebsd10.0/bits/stdc++.h.gch > /usr/ports/lang/gcc46/work/build/./gcc/xgcc -shared-libgcc > -B/usr/ports/lang/gcc46/work/build/./gcc -nostdinc++ > -L/usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++= -v3/src > -L/usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++= -v3/src/.libs > -B/usr/local/x86_64-portbld-freebsd10.0/bin/ > -B/usr/local/x86_64-portbld-freebsd10.0/lib/ -isystem > /usr/local/x86_64-portbld-freebsd10.0/include -isystem > /usr/local/x86_64-portbld-freebsd10.0/sys-include -x c++-header > -nostdinc++ -g -O2 -pipe -I/usr/local/include -fno-strict-aliasing > -I/usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++= -v3/include/x86_64-portbld-freebsd10.0 > -I/usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++= -v3/include > -I/usr/ports/lang/gcc46/work/gcc-4.6-20111209/libstdc++-v3/libsupc++ -O= 2 > -g -std=3Dgnu++0x > /usr/ports/lang/gcc46/work/gcc-4.6-20111209/libstdc++-v3/include/precom= piled/stdc++.h > \ > -o x86_64-portbld-freebsd10.0/bits/stdc++.h.gch/O2ggnu++0x.gch > In file included from > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/chrono:38:0, >=20 > from > /usr/ports/lang/gcc46/work/gcc-4.6-20111209/libstdc++-v3/include/precom= piled/stdc++.h:100: >=20 > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/ratio:133:31: > error: macro "_Static_assert" passed 3 arguments, but takes just 2 > In file included from > /usr/ports/lang/gcc46/work/gcc-4.6-20111209/libstdc++-v3/include/precom= piled/stdc++.h:103:0: >=20 > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/future:376:39: > error: macro "_Static_assert" passed 4 arguments, but takes just 2 > In file included from > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/memory:85:0, >=20 > from > /usr/ports/lang/gcc46/work/gcc-4.6-20111209/libstdc++-v3/include/precom= piled/stdc++.h:81: >=20 > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/bits/unique_ptr.h: > In constructor 'constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr()': > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/bits/unique_ptr.h:117:59: > error: constexpr constructor does not have empty body > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/bits/unique_ptr.h: > In constructor 'constexpr std::unique_ptr<_Tp, > _Dp>::unique_ptr(std::nullptr_t)': > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/bits/unique_ptr.h:139:59: > error: constexpr constructor does not have empty body > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/bits/unique_ptr.h: > In constructor 'constexpr std::unique_ptr<_Tp [], _Dp>::unique_ptr()': > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/bits/unique_ptr.h:279:59: > error: constexpr constructor does not have empty body > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/bits/unique_ptr.h: > In constructor 'constexpr std::unique_ptr<_Tp [], > _Dp>::unique_ptr(std::nullptr_t)': > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/bits/unique_ptr.h:301:59: > error: constexpr constructor does not have empty body > In file included from > /usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-v= 3/include/cassert:45:0, >=20 > from > /usr/ports/lang/gcc46/work/gcc-4.6-20111209/libstdc++-v3/include/precom= piled/stdc++.h:34: >=20 > /usr/include/assert.h: At global scope: > /usr/include/assert.h:62:23: error: '_Static_assert' does not name a ty= pe > /usr/include/assert.h:62:23: error: '_Static_assert' does not name a ty= pe > gmake[4]: *** > [x86_64-portbld-freebsd10.0/bits/stdc++.h.gch/O2ggnu++0x.gch] Fehler 1 > gmake[4]: Leaving directory > `/usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-= v3/include' >=20 > gmake[3]: *** [all-recursive] Fehler 1 > gmake[3]: Leaving directory > `/usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-= v3' > gmake[2]: *** [all] Fehler 2 > gmake[2]: Leaving directory > `/usr/ports/lang/gcc46/work/build/x86_64-portbld-freebsd10.0/libstdc++-= v3' > gmake[1]: *** [all-target-libstdc++-v3] Fehler 2 > gmake[1]: Leaving directory `/usr/ports/lang/gcc46/work/build' > gmake: *** [bootstrap-lean] Fehler 2 > *** Error code 1 > Stop in /usr/ports/lang/gcc46. > ---------------------------------------------------------------- >=20 >=20 > I guess that this error could have something to do with r228902 from > 2011-12-26: >=20 > /head/include/assert.h: As per C11, add static_assert() to . >=20 > lang/gcc46 builts fine for me before this revision. What do you think > about it? > Rainer I already posted a PR. The first time I saw a similar error was, when I made builtworld on FBSD 10.0 with WITH_ICONV=3DYES set in /etc/src.conf. I wasn't even able to build the lang/gcc46 with the legacy gcc42 compiler. But the problem I reported while compiling a non-poted piece of software also occurs with the legacy gcc 4.2, but there the error is looking something different, reporting some missing vtable: or similar. Oliver --------------enigA0A081B733AD5F8AE3CAC91D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQEcBAEBAgAGBQJO+1Y9AAoJEOgBcD7A/5N8hgcH/jYACEsfghRKhD/ZbDeQ3v6O YCM9pBa8uZcFvV1wCDL4e1fg2FYtosECpUinIWS4LRISm3cbLLCxCPfrsLM6ipE2 vaaVec9N+udmXqZu5X4xwJSs8dzrClxxiV3F89cYvidbzkMjJznDZ8LP4Bi86m19 cAalr4HbbiPEl2aHJSpQYc93aQRX9ozXEC5enCuji2kT1CCSqEAVWSILuvifIzhc bOd64HX3goAMnx/CiiNMgABdx8XM0stYHL0gVrtEoaLird6g2vr9Tp9ouEpdlnYy TKvTowcHyOTYCm55zCcmTj7jQR2emt+5ME8Ntq02am8CHKzvv2wqaVuL0VpG58Y= =zASZ -----END PGP SIGNATURE----- --------------enigA0A081B733AD5F8AE3CAC91D--