LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   File in wrong format while during Slackbuilds, 13.37 64bit with multilib (http://www.linuxquestions.org/questions/slackware-14/file-in-wrong-format-while-during-slackbuilds-13-37-64bit-with-multilib-886840/)

tradet 06-17-2011 04:29 AM

File in wrong format while during Slackbuilds, 13.37 64bit with multilib
 
Hi,

I'm trying to build imlib2 and smpeg from the latest slackbuilds but I'm getting these errors:

Code:

smpeg: /usr/lib/libXext.so: could not read symbols: File in wrong format
imlib2: /usr/lib/libfreetype.so: could not read symbols: File in wrong format

I've installed Alien's multilib files (smpeg works in 32bit mode but I'd like to have the 64bit so I can build pygame in 64bit, imlib does not) but I think it's a 32/64 error somewhere and these errors appear to be related?

I have converted the packages:

Code:

$ ls /var/log/packages | grep freetype
freetype-2.4.4-x86_64-1
freetype-compat32-2.4.4-x86_64-1

$ ls /var/log/packages | grep libXext
libXext-1.2.0-x86_64-1
libXext-compat32-1.2.0-x86_64-1

And all multilibs appear to be installed:

Code:

$ ls /var/log/packages | grep multi
gcc-4.5.2_multilib-x86_64-2alien
gcc-g++-4.5.2_multilib-x86_64-2alien
gcc-gfortran-4.5.2_multilib-x86_64-2alien
gcc-gnat-4.5.2_multilib-x86_64-2alien
gcc-java-4.5.2_multilib-x86_64-2alien
gcc-objc-4.5.2_multilib-x86_64-2alien
glibc-2.13_multilib-x86_64-4alien
glibc-i18n-2.13_multilib-x86_64-4alien
glibc-profile-2.13_multilib-x86_64-4alien
glibc-solibs-2.13_multilib-x86_64-4alien
glibc-zoneinfo-2.13_multilib-noarch-4alien

I'm running Slackware 13.37 64bit on a fairly fresh install.

Help or ideas are appreciated.

sahko 06-17-2011 04:49 AM

I am the imlib2 maintainer. Please read the slackbuilds.org FAQ

Quote:

Originally Posted by http://slackbuilds.org/faq/#multilib
I have problems compiling with my unofficial and unsupported multilib setup.

If you are using multilib packages from somewhere and also have some 32bit packages installed, then you might run into problems with the build process trying to link 32bit libraries instead of 64bit libraries. If this occurs, it can probably be solved by placing the following line:
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
after the lines for CFLAGS and CXXFLAGS passed to the configure script. In other words, make it look something like this:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
./configure \
Beyond that, you are on your own. This is an unsupported setup.


tradet 06-17-2011 04:53 AM

Ouch, my bad.

Thanks!

sahko 06-17-2011 04:56 AM

It's not just you, you're the third person i have helped with the same issue and i've been maintaining imlib2 only for a month.

Mike_M 06-17-2011 04:57 AM

Quote:

Originally Posted by tradet (Post 4388332)
Hi,

I'm trying to build imlib2 and smpeg from the latest slackbuilds but I'm getting these errors:

Code:

smpeg: /usr/lib/libXext.so: could not read symbols: File in wrong format
imlib2: /usr/lib/libfreetype.so: could not read symbols: File in wrong format

I've installed Alien's multilib files (smpeg works in 32bit mode but I'd like to have the 64bit so I can build pygame in 64bit, imlib does not) but I think it's a 32/64 error somewhere and these errors appear to be related?

Yes, this is related to having both 32-bit and 64-bit versions of the same libraries installed. It is possible the build procedure for the software you're attempting to compile can't deal with this gracefully. Generally when I run in to this, setting the LDFLAGS environment variable works around the issue for me. You can try something like this:

Code:

LDFLAGS="-L/usr/lib64" ./configure <rest of configure options here>
The approach I use is to add the following to my build scripts for misbehaving software just before the ./configure line:

Code:

LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
So it will end up looking something like this:

Code:

LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  <configure options here>

edit: Oops, sahko beat me to it

jjthomas 08-06-2011 11:56 AM

Mike M, added LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ before the CFLAGS line and sahko added it after. Does where the line is added make a difference?


-JJ

jjthomas 08-06-2011 11:59 AM

Quote:

Originally Posted by sahko (Post 4388348)
It's not just you, you're the third person i have helped with the same issue and i've been maintaining imlib2 only for a month.

+1 Thank you for maintaining the project.

Google is my friend, LinuxQuestions is my best friend. :)

-JJ

Mike_M 08-06-2011 12:07 PM

Quote:

Originally Posted by jjthomas (Post 4435369)
Mike M, added LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ before the CFLAGS line and sahko added it after. Does where the line is added make a difference?


-JJ

No. Those lines are defining environment variables and assigning values to them. One does not rely on the other, so order does not matter.


All times are GMT -5. The time now is 01:14 PM.