[SOLVED] Failed to build on mips64el arch

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
brep
Posts: 1
Joined: Sat Feb 15, 2020 5:23 am

[SOLVED] Failed to build on mips64el arch

Post by brep »

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
Veteran
Posts: 3520
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: [SOLVED] Failed to build on mips64el arch

Post by PrzemoF »

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
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: [SOLVED] Failed to build on mips64el arch

Post by chrisb »

Should this go to the Compile/Install forum?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: [SOLVED] Failed to build on mips64el arch

Post by sgrogan »

chrisb wrote: Sat Feb 15, 2020 7:35 am Should this go to the Compile/Install forum?
Yes, please
"fight the good fight"
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

Re: [SOLVED] Failed to build on mips64el arch

Post by kkremitzki »

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