LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-18-2017, 11:25 AM   #1
ahc_fan
Member
 
Registered: Jan 2009
Location: Seattle, WA
Distribution: Slackware64 14.2
Posts: 259

Rep: Reputation: 11
Installing 32-bit OpenAL on Slackware64-current/multilib, getting linker error ("File in wrong format")


I am running Slackware64-current and using the OpenAL slackbuild for 14.2 from slackbuilds.org. It gets to 100% and gives the error.

Adding this line doesn't seem to be an option,
Code:
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
as the slackbuild does not use configure. Instead it looks like this:

Code:
cmake \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_VERBOSE_MAKEFILE:BOOL="on" \
  -DCMAKE_BUILD_TYPE=Release \
  -DALSOFT_EXAMPLES=OFF \
  -DLIB_SUFFIX=${LIBDIRSUFFIX}
And I'm not sure how to specify linker flags with cmake.

This is the first time I'm having this problem with OpenAL, it always worked before.

Any idea where the problem lies?
 
Old 09-18-2017, 03:15 PM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Maybe this link will help?

https://stackoverflow.com/questions/...-in-cmake-file

https://www.google.com/search?q=how+...22.I73nulcvVn8
 
Old 09-18-2017, 10:04 PM   #3
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,950

Rep: Reputation: Disabled
What is the build error? It builds fine in my multilib Slackware64-current.
 
Old 09-18-2017, 10:25 PM   #4
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 2,011

Rep: Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619Reputation: 1619
Can you post the actual end of the build log showing the error and lines leading up to it? OpenAL is not 32-bit-only, so it should build fine on Slackware64-14.2 (of course, no guarantees about -current). You should also see if there are any updates to it in ponce's repo for -current, as that's what it is for.

Finally, you could try setting LDFLAGS. It is not an automake thing, it is a shell environment variable. Either of the following would have the same effect:

Code:
export LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"
cmake \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_VERBOSE_MAKEFILE:BOOL="on" \
  -DCMAKE_BUILD_TYPE=Release \
  -DALSOFT_EXAMPLES=OFF \
  -DLIB_SUFFIX=${LIBDIRSUFFIX}
or

Code:
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
cmake \
  -DCMAKE_C_FLAGS="$SLKCFLAGS" \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_VERBOSE_MAKEFILE:BOOL="on" \
  -DCMAKE_BUILD_TYPE=Release \
  -DALSOFT_EXAMPLES=OFF \
  -DLIB_SUFFIX=${LIBDIRSUFFIX}
 
Old 09-19-2017, 06:19 AM   #5
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
ahc_fan --

I downloaded and installed the 32-bit and 64-bit version of OpenAL version 1.17.2 from AlienBob's SlackBuild Rpo

However, this time he didn't update the 32-bit version to 1.18.0 along with the 64-bit version.

However, I was able to build a 32-bit version from the SBo Slackbuild using the wrapper script below.

The 'secret' for me was to source /etc/profile.d/32dev.sh ( part of AlienBob's Multilib Environment ).

The wrapper script seemed to do 'the right thing' and ldd resolved 32-bit libraries and doinst.sh referenced usr/lib/ as expected.

HTH

-- kjh

# this is my 'standard' SlackBuild Wrapper Script, modified to build a 32-bit version of OpenAL
# copy it into the SBo OpenAL/ directory along with 'the usual' files
#
# cat .do-OpenAL.SlackBuild-32bit.sh
Code:
#!/bin/sh

DoName="OpenAL.SlackBuild"

. ./OpenAL.info

MyVersion="$VERSION"

LogNam="$DoName-$MyVersion-32-bit.log"

unset PRGNAM
unset VERSION
unset HOMEPAGE
unset DOWNLOAD
unset MD5SUM
unset DOWNLOAD_x86_64
unset MD5SUM_x86_64
unset REQUIRES
unset MAINTAINER
unset EMAIL
#
# set and export any extra variables here
#
# README:
#
# OpenAL is a cross-platform 3D audio API appropriate for use with gaming
# applications and many other types of audio applications.
#
# this package needs the 32-bit build environment
#
. /etc/profile.d/32dev.sh
#
# set your variables here
#
export ARCH=i586
#
# do the deed
#
echo "$DoName startup  at `date`"                        |tee    $LogNam
./$DoName 2>&1                                           |tee -a $LogNam
RetCode=$?
#
# log your results
#
echo "$DoName complete at `date` ... RetCode = $RetCode" |tee -a $LogNam
exit $RetCode

Last edited by kjhambrick; 09-19-2017 at 06:24 AM. Reason: 1.17.s -> 1.17.2
 
Old 09-19-2017, 09:00 AM   #6
ahc_fan
Member
 
Registered: Jan 2009
Location: Seattle, WA
Distribution: Slackware64 14.2
Posts: 259

Original Poster
Rep: Reputation: 11
I actually decided to go back to 14.2 as I have no need for -current(I was hoping amdgpu would be supporting my card, but apparently not yet). So sorry to have wasted your time on this issue.

However there was a problem with 14.2. After a fresh install and format of the root partition I did the usual update gpg, update, upgrade-all, clean-system, nothing else, and X would not start:

Code:
radeon: abi major version(20) doesn't match the server's version(23)
I don't know what the deal was there, but I just said "fuck it" and once again tried -current. Now OpenAL compiles without error. Before I had sbopkg set to use the master branch and I was mixing SBo and sbopkg. Perhaps that cause some incompatibility for OpenAL?

Regardless, I have current running stable now so I'm happy. Thank you all for the assistance.
 
Old 09-19-2017, 02:50 PM   #7
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Don't forget to mark your thread SOLVED.

And please refrain from using profanity:- It's frowned upon here at LQ.
 
Old 09-20-2017, 07:47 AM   #8
ahc_fan
Member
 
Registered: Jan 2009
Location: Seattle, WA
Distribution: Slackware64 14.2
Posts: 259

Original Poster
Rep: Reputation: 11
Thank you and sorry.
 
Old 09-20-2017, 10:52 AM   #9
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by ahc_fan View Post
Thank you and sorry.
You're Welcome-

No worries-
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I keep getting this error: "File in wrong format" reguser23 Slackware 7 08-17-2016 01:11 PM
Building problem of "some" 32-bit programs in Slackware64 multilib aalireza Slackware 1 06-05-2013 08:24 AM
Slackware64 -current (multilib) -- Wrong GCC version slaka Slackware 2 05-13-2013 10:39 AM
[SOLVED] gcc exits with "libXrender" error when building wmii for Slackware64-current markush Slackware 4 05-06-2012 04:49 AM
X11 error "No screens found" with FGLRX after upgrade to slackware64-current Dinobot Linux - Desktop 17 03-06-2010 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration