code coverage: llvm-ar: undefined reference to `llvm::raw_fd_ostream::current_pos() const'

Sylvestre Ledru sylvestre at debian.org
Wed Jul 31 13:41:40 PDT 2013


On 31/07/2013 19:38, Rafael EspĂ­ndola wrote:
> I tried to reproduce this locally, but so far I have failed. What I am
> trying with gcc 4.7 is
>
> CC=/usr/bin/gcc CXX=/usr/bin/g++ ../llvm/configure
> --disable-assertions --enable-shared --enable-optimized
> --with-optimize-option="-g -O2"
>  make -j8 CXXFLAGS="-fprofile-arcs -ftest-coverage -std=c++0x"
> LDFLAGS="-coverage -lgcov" REQUIRES_RTTI=1
>
>
>
> In the error message you posted it has a direct reference to
> lvm::raw_fd_ostream::current_pos(). Is your host compiler producing a
> devirtualized copy of the tell function? Maybe it is then forgetting
> to output a copy of current_pos?
I don't really know. Does

-fprofile-arcs -ftest-coverage disables any inlining ?

> Which host compiler are you using?
gcc 4.8.1-2

Thanks for having a look.
Sylvestre



More information about the llvm-commits mailing list