/usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/../../../libstdc++.a: could not read symbols: Bad value

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Wed, 28 Dec 2011 11:48:28 +0100
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/10.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 and
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/../../../libstdc++.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/../../../libstdc++.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
  Working on Package [control] (11:30:15)
    Adding API object [BundleAdjust]
    Adding API object [ControlCubeGraphNode]
    Adding API object [ControlGraph]
    Adding API object [ControlMeasure]
    Adding API object [ControlMeasureLogData]
    Adding API object [ControlNet]
    Adding API object [ControlNetFilter]
    Adding API object [ControlNetStatistics]
    Adding API object [ControlNetValidMeasure]
    Adding API object [ControlNetVersioner]
    Adding API object [ControlPoint]
    Adding API object [ControlPointList]
    Adding API object [InterestOperator]
    Adding API object [InterestOperatorFactory]
  Working on Package [lro] (11:30:22)
    Adding API object [LroNarrowAngleCamera]
/usr/local/bin/ld:
/usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/../../../libstdc++.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/../../../libstdc++.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
gmake[5]: *** [plugin] Error 1
cp: libLroNarrowAngleCamera.so: No such file or directory
gmake[4]: *** [install] Error 1
    Adding API object [LroWideAngleCamera]
/usr/local/bin/ld:
/usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/../../../libstdc++.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/../../../libstdc++.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
gmake[5]: *** [plugin] Error 1
cp: libLroWideAngleCamera.so: No such file or directory
gmake[4]: *** [install] Error 1
    Adding API object [MiniRF]
[...]
  Working on Package [system] (11:30:32)
    Adding API object [KernelDb]
  Working on Package [viking] (11:30:33)
    Adding API object [VikingCamera]
/usr/local/bin/ld:
/usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/../../../libstdc++.a(ios_init.o):
relocation R_X86_64_32 against `std::cout' 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/../../../libstdc++.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
gmake[5]: *** [plugin] Error 1
cp: libVikingCamera.so: No such file or directory
gmake[4]: *** [install] Error 1
  Working on Package [rolo] (11:30:33)
Finished adding API objects

Creating Shared Libraries ...
/usr/local/bin/ld:
/usr/local/lib/gcc46/gcc/x86_64-portbld-freebsd9.0/4.6.3/../../../libstdc++.a(ctype.o):
relocation R_X86_64_32S against `vtable for std::ctype<wchar_t>' 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/../../../libstdc++.a:
could not read symbols: Bad value
collect2: ld returned 1 exit status
gmake[1]: *** [libisis3.3.0.so] Error 1
gmake: *** [api] Error 2
*** Error code 1

Stop in /usr/ports/science/isis3.
#>:


I try to figure out what changed in the Mk-framework causing this
problem recently, since the code compiled weeks ago on 9.0-PRE and
10.0-CUR without a problem.

Well, I also looked into compile options for the code. They are set by a
archaic script mechanism (USGS doesn't provide a more modern way of
build environment and they are very, very Linux-restricted and not
"open"). All compile options are set via a central framework of scripts
and even the linker options get set in such a way.

Well, I saw such an error often when a static library got confused with
a dynamical library, correct me please, I'm not very firm in this stuff yet.

I won't provide at this stage my silly port to the public since it is
not bright and shiny yet, so excuse please the lack of more information.
Perhaps the above error is common and can be fixed.


I'm glad to read some hints

and thanks in advance,
Oliver


Received on Wed Dec 28 2011 - 09:48:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:22 UTC