I was in need of installing software on my Slackware64 14.1 on the other day and got a following error message:
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -fPIC -module -avoid-version -o export_jpg.la -rpath /usr/lib64/transcode export_jpg_la-export_jpg.lo -L/usr/lib -ljpeg -lm -lm -lz -ldl
libtool: link: gcc -shared -fPIC -DPIC .libs/export_jpg_la-export_jpg.o -L/usr/lib /usr/lib/libjpeg.so -lm -lz -ldl -O2 -Wl,-soname -Wl,export_jpg.so -o .libs/export_jpg.so
/usr/lib/libjpeg.so: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
make: *** [export_jpg.la] Error 1
make: Leaving directory `/tmp/SBo/transcode-1.1.7/export'
make: *** [all-recursive] Error 1
make: Leaving directory `/tmp/SBo/transcode-1.1.7'
make: *** [all] Error 2
From the error message, I can tell that it has something to do with linker and libraries, perhaps using 32-bit library on my 64-bit Slackware. I checked the LDFLAGS variable in its MakeFile and it was empty.
Ok, is there a way to force the compiler to use 64-bit libraries with SlackBuild scripts?
YES! A variable can be passed to SlackBuild script. To force the SlackBuild script to use 64-bit library, simply add variable with its value before executing a SlackBuild script.
$ LDFLAGS="-L/usr/lib64" ./[SlackBuildScript_name]
Voilà. The compilation went through without any more errors!
Disclaimer: The information in this site is the result of my researches in the Internet and of my experiences. It is solely used for my purpose and may not be suitable for others. I will NOT take any responsibility of end result after following these steps (although I will try to help if you send me your questions/problems).