[Dart] [Coverage] hidden symbol `__bb_init_func' dart
Mathieu Malaterre
mathieu.malaterre at gmail.com
Thu Apr 26 03:49:57 EDT 2007
Just for reference, I gave up on using gcc-3.3.5 and switch to 3.4.4:
$ gcc-3.4 --version
gcc-3.4 (GCC) 3.4.4 20050314 (prerelease) (Debian 3.4.3-13sarge1)
Conclusion is works out of the box !
Steps:
export CC=gcc-3.4
export CXX=g++-3.4
export CXXFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
export CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage"
export LDFLAGS="-fprofile-arcs -ftest-coverage"
then you can link your executable to shared libs.
Instructions are now in the Wiki:
http://vtk.org/Wiki/CTest:Coverage
Mathieu
Ps: I wish I was using good ol' bug free closed source software ;)
On 4/25/07, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
> Thanks for the confirmation that's what I remembered (in the past I
> even remember having to use -lgcc). Anyway this works fine for
> building CMake (static lib) but does not work for let say VTK (with
> shared libs on).
>
> I am using gcc 3.3.5 on a debian oldstable. Could someone with gcc4
> double check the issue ? Thanks
>
> Steps:
>
> export CXXFLAGS="-g -O0 -Wall -W -Wshadow -Wunused-variable
> -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers
> -Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs
> -ftest-coverage"
> export CFLAGS="-g -O0 -Wall -W -fprofile-arcs -ftest-coverage"
> export LDFLAGS="-fprofile-arcs -ftest-coverage"
> cmake ../VTK -DBUILD_SHARED_LIBS:BOOL=ON
> make
>
> -Mathieu
>
>
>
> On 4/25/07, Andy Cedilnik <andy.cedilnik at kitware.com> wrote:
> > Hello Matt,
> >
> > Make sure to pass the profiling flags to the linker too.
> >
> > http://www.vtk.org/Wiki/CTest:FAQ#How_can_I_perform_coverage_test.3F
> >
> > Andy
> >
> > On 4/25/07, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
> > > Hello,
> > >
> > > I am pretty sure there is a document somewhere that explain what to
> > > do, but I cannot find it anymore. I am building my project with shared
> > > libs (gcc), but when using
> > >
> > > -fprofile-arcs -ftest-coverage
> > >
> > > I am getting:
> > >
> > > /usr/bin/ld: ../bin/testbla: hidden symbol `__bb_init_func' in
> > > /usr/lib/gcc-lib/i486-linux/3.3.5/libgcc.a(_bb.oS) is referenced by
> > > DSO
> > > collect2: ld returned 1 exit status
> > >
> > > thanks for your help !
> > >
> > > --
> > > Mathieu
> > > _______________________________________________
> > > Dart mailing list
> > > Dart at public.kitware.com
> > > http://public.kitware.com/mailman/listinfo/dart
> > >
> >
> >
> > --
> > -------------------------------------------
> > Andy Cedilnik
> > Kitware Inc.
> > http://www.kitware.com
> > Phone: +1 518 371 3971 x110
> >
>
>
> --
> Mathieu
> Tel: +33 6 32 13 33 40
>
--
Mathieu
Tel: +33 6 32 13 33 40
More information about the Dart
mailing list