Possible 32 bit / 64 bit compatibility issues when compiling from source
by thethinker from LinuxQuestions.org on (#51174)
So I am trying to install SageMath from source (actually, I'm using the SlackBuilds script, but I *wrote* that script, so....), and some libraries are not linking correctly. I'm in contact with the developers, and they've said that the following lines:
Code:/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible ///usr/lib/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible ///usr/lib/libm.a when searching for -lm
/usr/lib/libgmp.so: error adding symbols: File in wrong format"are suspicious", and suggest that the problem is related to cross-compilation issues. That checks out - the SlackBuilds script works as intended on a vanilla Slackware installation. However, the machine I'm on now has multilib enabled, following the SlackDocs tutorial (https://docs.slackware.com/slackware:multilib). Their actual suggestion was to "reinstall gmp", but I'm afraid of doing that blind, since I might replace a single 64 bit library with a 32 bit one!
I can see that gmp is indeed one of the packages that had the 32-bit compatability done on it. Is it possible something went wrong in that process? It's kinda likely that I screwed it up, but I haven't noticed anything like this yet, and that was some time ago.
Code:$ uname -a
Linux Zonadar 4.4.14 #1 SMP Fri Jun 24 13:30:15 CDT 2016 x86_64 Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz GenuineIntel GNU/Linux


Code:/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible ///usr/lib/libm.so when searching for -lm
/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible ///usr/lib/libm.a when searching for -lm
/usr/lib/libgmp.so: error adding symbols: File in wrong format"are suspicious", and suggest that the problem is related to cross-compilation issues. That checks out - the SlackBuilds script works as intended on a vanilla Slackware installation. However, the machine I'm on now has multilib enabled, following the SlackDocs tutorial (https://docs.slackware.com/slackware:multilib). Their actual suggestion was to "reinstall gmp", but I'm afraid of doing that blind, since I might replace a single 64 bit library with a 32 bit one!
I can see that gmp is indeed one of the packages that had the 32-bit compatability done on it. Is it possible something went wrong in that process? It's kinda likely that I screwed it up, but I haven't noticed anything like this yet, and that was some time ago.
Code:$ uname -a
Linux Zonadar 4.4.14 #1 SMP Fri Jun 24 13:30:15 CDT 2016 x86_64 Intel(R) Core(TM) i5 CPU 760 @ 2.80GHz GenuineIntel GNU/Linux