[Insight-users] vnl lib error : link error with gcc4.1 when using
coverage options -fprofile-arcs -ftest-coverage
Luis Ibanez
luis.ibanez at kitware.com
Mon Aug 13 20:05:00 EDT 2007
Hi Alex,
Just for the record:
I'm encountering a very similar problem when building
today's CVS version of ITK in an Ubuntu distribution 7.0.4.
The link error messages are:
Linking CXX executable ../../../../../../bin/vnl_algo_test_all
/home/ibanez/bin/ITKGcc4.1/bin/libitkvnl.a(vnl_sparse_matrix+float-.o):(.ctors+0x0):
undefined reference to `global constructors keyed to
_home_ibanez_src_Insight_Utilities_vxl_core_vnl_Templates_vnl_sparse_matrix_float_.cxx_8D2A3925_1D9C90C2'
/home/ibanez/bin/ITKGcc4.1/bin/libitkvnl.a(vnl_vector+int-.o):(.ctors+0x0):
undefined reference to `global constructors keyed to
_home_ibanez_src_Insight_Utilities_vxl_core_vnl_Templates_vnl_vector_int_.cxx_8D2A3925_6EA31B59'
/home/ibanez/bin/ITKGcc4.1/bin/libitkvnl.a(vnl_sparse_matrix+double-.o):(.ctors+0x0):
undefined reference to `global constructors keyed to
_home_ibanez_src_Insight_Utilities_vxl_core_vnl_Templates_vnl_sparse_matrix_double_.cxx_8D2A3925_45884A6D'
/home/ibanez/bin/ITKGcc4.1/bin/libitkvnl.a(vnl_matrix+double-.o):(.ctors+0x0):
undefined reference to `global constructors keyed to
_home_ibanez_src_Insight_Utilities_vxl_core_vnl_Templates_vnl_matrix_double_.cxx_8D2A3925_D5D1E35F'
/home/ibanez/bin/ITKGcc4.1/bin/libitkvnl.a(vnl_matrix+long-.o):(.ctors+0x0):
undefined reference to `global constructors keyed to
_home_ibanez_src_Insight_Utilities_vxl_core_vnl_Templates_vnl_matrix_long_.cxx_8D2A3925_53000A0E'
collect2: ld returned 1 exit status
make[2]: *** [bin/vnl_algo_test_all] Error 1
make[1]: *** [Utilities/vxl/core/vnl/algo/tests/CMakeFiles/vnl_algo_test_all.dir/all]
Error 2
make: *** [all] Error 2
The relevant versions are
gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
GNU ld version 2.17.50 20070103 Ubuntu
The errors go away when the options
-fprofile-arcs -ftest-coverage
are removed from the CMAKE_CXX_FLAGS
and CMAKE_C_FLAGS variables.
Googling for it, it seems that in gcc 4 the
coverage flags must also be passed to the
linker:
http://bugs.mysql.com/bug.php?id=24792
I'll explore that a bit more...
Luis
--------------------------------------------------------------------------
On 8/5/07, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> Hi Alex,
>
> Yes, please report this bug in the new MANTIS bug tracker.
>
> http://www.itk.org/Bug/
>
>
> Thanks
>
>
> Luis
>
>
> --------------------------------
> Alexandre GOUAILLARD wrote:
> > Hi all,
> >
> > The compilation without the coverage option is ok.
> >
> > I did an Experimental build which result is accessible on today's
> dashboard
> > under the site name "dogsbody-2".
> >
> > But when I add the -fprofile-arcs -ftest-coverage to the CXX, C, and
> linker
> > Debug flags, I have the same problems again.
> >
> > The first error come from linking of the "vnl_basic_operation_timings"
> > executable.
> >
> > I will drop the coverage support, and I do not intend to dig further in
> this
> > problem. I hope someone will have time to adress this. Is there any good
> > place where I could fill a bug report?
> >
> > Alex hanfei.
> >
> >
> > On 8/2/07 10:04 AM, "Alexandre GOUAILLARD" <hanfei at caltech.edu> wrote:
> >
> >
> >>Hi all,
> >>
> >>I removed the coverage options (-fprofile-arcs -ftest-coverage) and it
> seems
> >>to be OK now.
> >>
> >>I will try to put back the coverage support later to check if that was
> >>indeed the cause.
> >>
> >>Matthias, I will try to reproduce your problem, can you give me more
> details
> >>as how and when it happens?
> >>
> >>Alex
> >>
> >>
> >>
> >>On 8/2/07 7:48 AM, "Matthias Riechmann" <riechmann at ira.uka.de> wrote:
> >>
> >>
> >>>Maybe one of my todays postings is related to this topic. The subject is
> >>>"Linker Errors using ScalableAffineTransform". I got ITK compiled but
> >>>when I instantiate "ScalableAffineTransform" then I get linker errors
> >>>describing the absence of some symbols that are supposed to be part of
> >>>this vnl library...
> >>>
> >>>
> >>>Matthias
> >>>
> >>>
> >>>
> >>>
> >>>Tomáš Kazmar schrieb:
> >>>
> >>>>Hi Alex,
> >>>>
> >>>> tried to compile today's ITK on a comparable Debian machine and
> >>>>unfortunately got no similar errors - any at all. Sorry I can't help.
> >>>>
> >>>>My config:
> >>>>Debian GNU/Linux 2.6.21.1.070503b x86_32
> >>>>gcc 4.1.3 20070629 (prerelease) (Debian 4.1.2-13)
> >>>>gmake 3.81
> >>>>
> >>>>Regards,
> >>>>Tomash
> >>>>
> >>>># I tried to install ITK from CVS on a debian machine and I have strange
> >>>># compilation errors.
> >>>># # I googled the error message but could not find anything helpfull. I
> >>>># tried to switch to static lib, same problem. I tried to skip the #
> >>>>vnl_test_all project that was generating the first erros, but the same #
> >>>>errors appear afterward.
> >>>># # Anyone got any idea?
> >>>># # My config:
> >>>># Debian GNU/Linux 2.6.18-4-amd64 x86_64
> >>>># gcc/g++ 4.1.2 20061115 (Debian 4.1.1-21)
> >>>># make: GNU make 3.81 (x86_64-pc-linux-gnu)
> >>>># # ITK Config:
> >>>># with review,
> >>>># Debug,
> >>>># shared ON,
> >>>># coverage options.
> >>>># # Error log from make:
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl.so: undefined reference to
> >>>># `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Utilities_vxl_core_vnl_Templates_vnl_matrix_fixed_ref>>>
> > _
> >
> >>>>float.3.3_.cxx_1FD5A050_2D935839'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl.so: undefined reference to
> >>>># `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Utilities_vxl_core_vnl_Templates_vnl_matrix_uint_.cxx>>>
> > _
> >
> >>>>1FD5A050_DDFCA457'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl.so: undefined reference to
> >>>># `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Utilities_vxl_core_vnl_Templates_vnl_matrix_fixed_ref>>>
> > _
> >
> >>>>double.3.3_.cxx_1FD5A050_DC866386'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl.so: undefined reference to
> >>>># `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Utilities_vxl_core_vnl_Templates_vnl_sparse_matrix_vn>>>
> > l
> >
> >>>>_bignum_.cxx_1FD5A050_0E6E34D4'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl.so: undefined reference to
> >>>># `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Utilities_vxl_core_vnl_Templates_vnl_matrix_fixed_flo>>>
> > a
> >
> >>>>t.2.2_.cxx_1FD5A050_606BAC04'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl_inst.so: undefined
> >>>>reference # to `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Code_Common_vnl_matrix_fixed_ref_double.4.4_.cxx_1FD5>>>
> > A
> >
> >>>>050_CBC0F9CF'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl_inst.so: undefined
> >>>>reference # to `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Code_Common_vnl_matrix_fixed_ref_double.2.2_.cxx_1FD5>>>
> > A
> >
> >>>>050_C87829A8'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl.so: undefined reference to
> >>>># `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Utilities_vxl_core_vnl_Templates_vnl_matlab_print_int>>>
> > _
> >
> >>>>.cxx_1FD5A050_DBC0BAA7'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl.so: undefined reference to
> >>>># `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Utilities_vxl_core_vnl_Templates_vnl_matlab_print_uin>>>
> > t
> >
> >>>>_.cxx_1FD5A050_391F7554'
> >>>>
> >>>># /root/QuadEdge/Insight/BUILD/bin/libitkvnl.so: undefined reference to
> >>>># `global constructors keyed to #
> >>>>
> >
> >
> _root_QuadEdge_Insight_Utilities_vxl_core_vnl_Templates_vnl_matlab_print_lon>>>
> > g
> >
> >>>>_double_.cxx_1FD5A050_4BE4A926'
> >>>>
> >>>># collect2: ld returned 1 exit status
> >>>># make[2]: *** [bin/itkNumericsHeaderTest] Error 1
> >>>># make[1]: *** #
> >>>>[Testing/Code/Numerics/CMakeFiles/itkNumericsHeaderTest.dir/all] Error 2
> >>>># make: *** [all] Error 2
> >>>># # alex
> >>>># # _______________________________________________
> >>>># Insight-users mailing list
> >>>># Insight-users at itk.org
> >>>># http://www.itk.org/mailman/listinfo/insight-users
> >>>># # # _______________________________________________
> >>>>Insight-users mailing list
> >>>>Insight-users at itk.org
> >>>>http://www.itk.org/mailman/listinfo/insight-users
> >>
> >>
> >>_______________________________________________
> >>Insight-users mailing list
> >>Insight-users at itk.org
> >>http://www.itk.org/mailman/listinfo/insight-users
> >
> >
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
>
More information about the Insight-users
mailing list