[SOLVED] Failed to build on mips64el arch

Having trouble installing or compiling FreeCAD? Get help here.
Post Reply
brep
Posts: 1
Joined: Sat Feb 15, 2020 5:23 am

[SOLVED] Failed to build on mips64el arch

Post by brep » Sat Feb 15, 2020 5:26 am

While tring to build FreeCAD on a mips64el-arch machine (Loongson 3A4000 for specific), I got many build errors like this:

Code: Select all

relocation truncated to fit: R_MIPS_CALL16
Add this line to CMakeLists.txt solved the problem:

Code: Select all

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" -mxgot") 

User avatar
PrzemoF
Posts: 2668
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: [SOLVED] Failed to build on mips64el arch

Post by PrzemoF » Sat Feb 15, 2020 7:14 am

Welcome to the forum!

I edited the title of your post as it sugested you need help, which is not the case. Thanks for sharing the solution! Is it something that should end up up in the main tree? If so, maybe you could preapre an official pull request - then it would be tested on other architectures to make sure it doesn't break existing builds.

chrisb
Posts: 21261
Joined: Tue Mar 17, 2015 9:14 am

Re: [SOLVED] Failed to build on mips64el arch

Post by chrisb » Sat Feb 15, 2020 7:35 am

Should this go to the Compile/Install forum?

User avatar
sgrogan
Posts: 5578
Joined: Wed Oct 22, 2014 5:02 pm

Re: [SOLVED] Failed to build on mips64el arch

Post by sgrogan » Sat Feb 15, 2020 12:43 pm

chrisb wrote:
Sat Feb 15, 2020 7:35 am
Should this go to the Compile/Install forum?
Yes, please

User avatar
PrzemoF
Posts: 2668
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: [SOLVED] Failed to build on mips64el arch

Post by PrzemoF » Sat Feb 15, 2020 5:30 pm

Moved.

User avatar
kkremitzki
Posts: 1861
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: [SOLVED] Failed to build on mips64el arch

Post by kkremitzki » Sat Feb 15, 2020 10:18 pm

Very cool to hear that you're getting FreeCAD to work on a mips64el machine! I had heard about these Loongsons recently (https://jonathancarter.org/2020/02/13/i ... son-pi-2k/). I'm surprised this issue didn't show up already for the Debian mips64el builds.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.

Post Reply