LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Transmission Slackbuild fails to compile on Slackware64 13.1 (https://www.linuxquestions.org/questions/slackware-14/transmission-slackbuild-fails-to-compile-on-slackware64-13-1-a-843289/)

astanton 11-09-2010 01:52 PM

Transmission Slackbuild fails to compile on Slackware64 13.1
 
I installed libevent, and that went ok, but following installation of the libevent-1.4.13-x86_64-1_SBo.tgz package I got the following error when running transmission.SlackBuild:

Code:

checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking build system type... i486-slackware-linux-gnu
checking host system type... i486-slackware-linux-gnu
checking for style of include used by make... GNU
checking for i486-slackware-linux-gcc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/SBo/transmission-2.03':
configure: error: C compiler cannot create executables
See `config.log' for more details.

NOTE: There is no 'config.log'

Aren't the SlackBuilds x86_64 capable unless stated otherwise? i.e., when I installed others, they went fine, and when there were two different versions the 32 and 64 bit source had separate links.

Is there an easy way to tell (other than when, for example, NetBeans said there is no 64 bit SlackBuild available) if a SlackBuild is 64 bit capable?

Finally, if I go "multi-lib", and then start installing packages built w/SlackBuilds (or compiling/installing directly from source), will the 64 bit version be built for my platform automatically, or is there some way to choose 64 as opposed to 32 when there's a 64 bit version?

disturbed1 11-09-2010 02:12 PM

Transmission compiles fine on 64bit.
The Slackbuilds.org Slackbuild appears correct, and functions as expected here.

Did you by chance alter the CFLAGS? That's a common error that happens with misspellings in the CLFAGS line.

Check what your uname -m returns as well.
Quote:

checking build system type... i486-slackware-linux-gnu
Is a dead give away for me ;)

rmjohnso 11-09-2010 02:13 PM

Are you using 13.1 or -current? If you are using -current, did you insalled libelf? If I remember correctly, I had the same problem compiling anything until I installed libelf.

astanton 11-09-2010 04:14 PM

Quote:

Originally Posted by disturbed1 (Post 4153968)
Transmission compiles fine on 64bit.
The Slackbuilds.org Slackbuild appears correct, and functions as expected here.

Did you by chance alter the CFLAGS? That's a common error that happens with misspellings in the CLFAGS line.

Check what your uname -m returns as well.

uname -m returns "x86_64", and I'm running 13.1, not -current.

How would I check to see if the CFLAGS was somehow altered? I don't know how I would go about doing that, and as far as I know, I haven't done anything to alter it.

and uname -a returns:

Code:

$ uname -a
Linux medusa 2.6.33.4 #3 SMP Wed May 12 23:13:09 CDT 2010 x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-56 AuthenticAMD GNU/Linux

Thanks for your help so far :)

disturbed1 11-09-2010 05:12 PM

Did you download the SlackBuild from here - http://slackbuilds.org/repository/13.../transmission/

What happens if you execute the SlackBuild this way -
Code:

ARCH=x86_64 sh transmission.SlackBuild
Older SlackBuilds did not have the uname -m case stanza to automatically set arch, and required users to either pass ARCH= or edit the SlackBuilds by hand. If you're using an older SlackBuild, this could be the case.

astanton 11-09-2010 05:44 PM

Quote:

Originally Posted by disturbed1 (Post 4154103)
Did you download the SlackBuild from here - http://slackbuilds.org/repository/13.../transmission/

What happens if you execute the SlackBuild this way -
Code:

ARCH=x86_64 sh transmission.SlackBuild

When I do that.... We have "Transmission" :)

Quote:

Originally Posted by disturbed1 (Post 4154103)
Older SlackBuilds did not have the uname -m case stanza to automatically set arch, and required users to either pass ARCH= or edit the SlackBuilds by hand. If you're using an older SlackBuild, this could be the case.

it appears that is is there, partially, but on the third line in the code snippet below it appears to hardwire the SlackBuild to treat it as i486 (Am I correct here?).

There is a case statement dealing with uname -m, but if the ARCH is hardwired otherwise before that then the case statement nested in the if statement is never tested.

If that's correct, then would one just merely remove the reference in the third line of the code below, and if so, to what?

Code:


PRGNAM=transmission
VERSION=2.03
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
      *) ARCH=$( uname -m ) ;;
  esac
fi
 
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/usr/local/packages}
 
DOCUMENTATION="AUTHORS COPYING INSTALL NEWS README"

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

Thanks for solving this one. I wanted to use Transmission at times instead of ktorrent :)

disturbed1 11-09-2010 05:49 PM

Quote:

Originally Posted by astanton (Post 4154126)
When I do that.... We have "Transmission" :)

it appears that is is there, partially, but on the third line in the code snippet below it appears to hardwire the SlackBuild to treat it as i486 (Am I correct here?)

That's it. Case solved :)

I'll fire off an email to the Script maintainer so they can fix it.

Michielvw 11-09-2010 06:20 PM

Fixed this in my branch, so it'll get pushed out on mext update.

bnguyen 11-09-2010 09:50 PM

Another part that could be also 'improved' is to substitute 'VERSION=2.03' by new standard 'VERSION=${VERSION:-2.03}'. I personally don't like the idea of having to edit the SlackBuild to make it works when compiling another version. Actually I reported this to the maintainer and he said he will do that in next update.

astanton 11-10-2010 06:21 PM

Cool!

I stepped on a bug ;)

Thanks for all the help! And glad I had something to contribute as well.


All times are GMT -5. The time now is 10:08 AM.