Bug#995867: xtensor: mipsel FTBFS (relocation truncated to fit: R_MIPS_CALL16)

Drew Parsons <[email protected]>
Newsgroups gmane.linux.debian.devel.bugs.general,gmane.linux.debian.ports.mips
Organization The Debian Project
Message-ID <[email protected]>
On 2021-10-27 10:24, Adrian Bunk wrote:
> On Sat, Oct 09, 2021 at 06:17:54PM +0200, Drew Parsons wrote:
>> Source: xtensor
>> Followup-For: Bug #995867
>> Control: retitle -1 mipsel FTBFS (relocation truncated to fit: 
>> R_MIPS_CALL16)
>> 
>> The problem with undefined `__umodsi3' `__udivsi3' is not easily
>> reproduced.
> 
> While -march=native is kinda OKish for test-only programs that do not
> end up in the binary package, it compiles differently depending on the
> hardware.
> 
> -march=native is known to have this breakage on the oldest buildds
> (eberlin, mipsel-aql-0{1,2}).
> 
...
> 
> The patch below builds for me for mipsel on eller.
> 
> +  export DEB_CXXFLAGS_MAINT_APPEND = -Os -g0
> +BUILD_OPTIONS += -Darch_native_supported=OFF



Thanks Adrian.  My own tests showed that switching off debug symbols was 
the main thing that needed to be done (apart from dealing with the 
relocation truncated issue). Both -O0 and -O2 compile, if -g is switched 
off.

-g0 is more elegant than the make syntax hack I uploaded, so I'll update 
to -Os -g0 for a future upload.

Since these are runtime tests (compiled fresh for the test), I like the 
idea of keeping -march=native, since it will emulate what users will 
experience when they use xtensor in their own local projects.

But I'll apply -Darch_native_supported=OFF for mipsel (that gives a 
cleaner debian/rules than hacking CXXFLAGS with -mxgot)

Drew
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.