Bug#775435: iwyu: FTBFS on mips64el

James Cowgill james410 at cowgill.org.uk
Thu Jan 15 17:22:37 UTC 2015


Source: iwyu
Version: 3.4-1
Severity: important

Hi,

iwyu FTBFS on mips64el with the following relocation errors:

> CMakeFiles/include-what-you-use.dir/iwyu.cc.o: In function `include_what_you_use::(anonymous namespace)::IntToString(int)':
> iwyu.cc:(.text+0x50): relocation truncated to fit: R_MIPS_CALL16 against `snprintf@@GLIBC_2.0'
> iwyu.cc:(.text+0x64): relocation truncated to fit: R_MIPS_CALL16 against `std::allocator<char>::allocator()@@GLIBCXX_3.4'
> iwyu.cc:(.text+0x84): relocation truncated to fit: R_MIPS_CALL16 against `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)@@GLIBCXX_3.4'
> iwyu.cc:(.text+0x98): relocation truncated to fit: R_MIPS_CALL16 against `std::allocator<char>::~allocator()@@GLIBCXX_3.4'
> iwyu.cc:(.text+0xb8): relocation truncated to fit: R_MIPS_CALL16 against `std::allocator<char>::~allocator()@@GLIBCXX_3.4'
> iwyu.cc:(.text+0xd0): relocation truncated to fit: R_MIPS_CALL16 against `_Unwind_Resume@@GCC_3.0'
> CMakeFiles/include-what-you-use.dir/iwyu.cc.o: In function `main':
> iwyu.cc:(.text+0x1a0): relocation truncated to fit: R_MIPS_CALL16 against `operator new[](unsigned long)@@GLIBCXX_3.4'
> iwyu.cc:(.text+0x200): relocation truncated to fit: R_MIPS_CALL16 against `operator new[](unsigned long)@@GLIBCXX_3.4'
> iwyu.cc:(.text+0x274): relocation truncated to fit: R_MIPS_CALL16 against `strcmp@@GLIBC_2.0'
> iwyu.cc:(.text+0x2f0): relocation truncated to fit: R_MIPS_CALL16 against `strcmp@@GLIBC_2.0'
> iwyu.cc:(.text+0x404): additional relocation overflows omitted from the output
> collect2: error: ld returned 1 exit status

The full log is available here:
http://mipsdebian.imgtec.com/debian/logs/i/iwyu/iwyu_3.4-1_mips64el-20150115-0137.build.gz

I think this happens due to a GOT overflow somewhere (the max size of
the GOT in MIPS is 64K per translation unit). It can be fixed by passing
-mxgot on mips64el, although that will incur a performance penalty.
Strangely, moving iwyu.cc to the end of the list of C files to be built
(in the add_executable call in CMakeLists.txt) also fixes this. I don't
know how reliable this will be though.

Thanks,
James



More information about the Pkg-llvm-team mailing list