LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Possible 32 bit / 64 bit compatibility issues when compiling from source (https://www.linuxquestions.org/questions/slackware-14/possible-32-bit-64-bit-compatibility-issues-when-compiling-from-source-4175671714/)

thethinker 03-31-2020 10:44 AM

Quote:

Originally Posted by orbea (Post 6103612)
Thanks, this seems to be the problem.

Code:

[iml-1.0.4p1.p2] /usr/lib/libgmp.so: error adding symbols: File in wrong format
A quick workaround would be to add this to the slackbuild.

Code:

sed -i "s|/lib|/lib${LIBDIRSUFFIX}|" build/pkgs/iml/spkg-install
There may be other places that require similar fixes.

This does not work, the build fails with the same error. Unless I don't understand where the build script this command should go - I put it right before "make build".

thethinker 04-03-2020 09:23 AM

Quote:

Originally Posted by mickski56 (Post 6103644)
I have just tried this and sage at least built without error on my multilib install.
You will also need to add

if [ "$ARCH" = "i586" ]; then
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
else
LIBDIRSUFFIX=""
fi

somewhere just after the arch detection section of the slackbuild in order to set LIBDIRSUFFIX.
Also LIBDIRSUFFIX should probably be LIBSUFFIX

This works, it now builds on both vanilla and multilib. Thanks!

BW-userx 04-03-2020 09:55 AM

Quote:

Originally Posted by thethinker (Post 6107411)
This works, it now builds on both vanilla and multilib. Thanks!

you're leaving both blank and only assigning one,
Code:

if [ "$ARCH" = "i586" ]; then
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
else
LIBDIRSUFFIX=""
fi

why not just do this, if true, do this , else do that.
Code:

[ "$ARCH" = "x86_64" ]  &&
{ LIBDIRSUFFIX="64" ; } ||
{ LIBDIRSUFFIX=""  ; }

#which can be written
[ "$ARCH" = "x86_64" ]  && { LIBDIRSUFFIX="64" ; } || { LIBDIRSUFFIX=""  ; }
or the ole'

if [ "$ARCH" = "x86_64" ] ;
then
    LIBDIRSUFFIX="64"
else
    LIBDIRSUFFIX=""
fi



All times are GMT -5. The time now is 06:45 AM.