LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 10-20-2014, 08:09 AM   #1
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Rep: Reputation: 120Reputation: 120
build problem with libvpx


I have been trying to build a libvpx package on a Pi running current from around May with the slackbuild from slackbuilds.org. The build was was failing with this message:
Code:
<snipped>
libvpx-v1.3.0/LICENSE
libvpx-v1.3.0/md5_utils.c
Configuring selected codecs
  enabling vp8_encoder
  enabling vp8_decoder
  enabling vp9_encoder
  enabling vp9_decoder
Unrecognized toolchain 'arm-linux-gcc'
So I modified the slackbuild, hard coded the target and added a line to create a config.log
Code:
<snipped>
--enable-shared \
    --enable-runtime-cpu-detect \
    --target=armv5te-linux-gcc --enable-pic \
  2>&1 | tee /tmp/configure-${PRGNAM}.log
This moved me a little further into the build until it failed with:
Code:
<snipped>
Configuring for target 'armv5te-linux-gcc'
  enabling armv5te
  enabling pic
  enabling edsp
  checking here for x86inc "armv5te" "yes" 
  enabling use_x86inc
Unable to invoke compiler: arm-none-linux-gnueabi-gcc -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
and the log file doesn't say much more:
Code:
<snipped>
BEGIN /tmp/vpx-conf-15823-7250.c
    1   int x;
END /tmp/vpx-conf-15823-7250.c
arm-none-linux-gnueabi-gcc -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wno-unused-function -c -o /tmp/vpx-conf-15823-7250.o /tmp/vpx-conf-15823-7250.c
../build/make/configure.sh: line 285: arm-none-linux-gnueabi-gcc: command not found
check_header stdio.h
check_cpp
BEGIN /tmp/vpx-conf-15823-7250.c
    1   #include "stdio.h"
    2   int x;
END /tmp/vpx-conf-15823-7250.c
arm-none-linux-gnueabi-gcc -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -E -o /tmp/vpx-conf-15823-7250.o /tmp/vpx-conf-15823-7250.c
../build/make/configure.sh: line 285: arm-none-linux-gnueabi-gcc: command not found
Should I now be looking at installing the arm-none-linux-gnueabi-gcc as per this page? http://elinux.org/ARMCompilers and if so, is there anything in particular I should know before hand?
 
Old 10-20-2014, 08:42 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
What do you get from

Code:
which arm-none-linux-gnueabi-gcc
Looks to me like it is just not in $PATH.
 
Old 10-20-2014, 08:44 AM   #3
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,539

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
Quote:
Originally Posted by justwantin View Post

../build/make/configure.sh: line 285: arm-none-linux-gnueabi-gcc: command not found
There's the give away - your specified compiler does not exist.

Look at the ARM build scripts in the source tree:-

Code:
root@pepa:~/ac/source/a/bash# grep -- -slackware-lin bash.SlackBuild
   --build=$ARCH-slackware-linux-gnueabi || failconfig

root@pepa:~/ac/source/a/bash# arm-slackware-linux-gnueabi-gcc --version
arm-slackware-linux-gnueabi-gcc (GCC) 4.8.3
 
Old 10-20-2014, 03:29 PM   #4
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Original Poster
Rep: Reputation: 120Reputation: 120
I understood from the messages that it could not be found, however,
Code:
rick@shed-1:~$ arm-slackware-linux-gnueabi-gcc --version
arm-slackware-linux-gnueabi-gcc (GCC) 4.8.2
There must be something staring me straight in the face but I'm missing it.

Edit: Yes, different versions between us, now I see it. I note there was an upgrade to 4.8.3 on June 6 I rsync'd current yesterday maybe Ill do a new install before fore I scratch my head too hard.

Last edited by justwantin; 10-20-2014 at 03:36 PM.
 
Old 10-21-2014, 01:30 AM   #5
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,539

Rep: Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309Reputation: 1309
Quote:
Originally Posted by justwantin View Post
I understood from the messages that it could not be found, however,
Code:
rick@shed-1:~$ arm-slackware-linux-gnueabi-gcc --version
arm-slackware-linux-gnueabi-gcc (GCC) 4.8.2
There must be something staring me straight in the face but I'm missing it.

Edit: Yes, different versions between us, now I see it. I note there was an upgrade to 4.8.3 on June 6 I rsync'd current yesterday maybe Ill do a new install before fore I scratch my head too hard.
The version of the compiler is not the issue.

You are doing this:
Code:
--target=armv5te-linux-gcc
There target needs to be the name of the C compiler. When cross compiling, people name their toolchain normally whatever output it generates: in the case of the instructions you were following, it would generate output for armv5te, so they named it as such.
In their environment, they would have this compiler in their $PATH, so it works. This compiler does not exist in Slackware unless you build one and name it as such. You need to do what I said and use the values from the SlackBuild scripts in the ARM source tree.
The configuration for most build scripts is:

Code:
./configure \
   --prefix=/usr \
   --host=$ARCH-slackware-linux-gnueabi \
   --target=$ARCH-slackware-linux-gnueabi \
   --build=$ARCH-slackware-linux-gnueabi
Where $ARCH is arm, therefore the configuration expands to
arm-slackware-linux-gnueabi


--build=$ARCH-slackware-linux-gnueabi


Read this
http://stackoverflow.com/questions/5...ost-and-target
for an explanation of the options you're selecting.

Since you're building natively, you do not need to specify the --build, --host etc, you can leave the configure script to guess it.

Last edited by drmozes; 10-21-2014 at 01:43 AM. Reason: forgot to paste in --build
 
Old 10-21-2014, 05:38 AM   #6
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Original Poster
Rep: Reputation: 120Reputation: 120
Thank you Stuart, I'll have a look at this again when I have some free daylight. Didn't quite understand what you meant by source tree a first glance.
 
Old 10-25-2014, 12:20 AM   #7
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Original Poster
Rep: Reputation: 120Reputation: 120
After having a squiz at some slackbuilds in the source tree I modified the slackbuilds.org libpvx.Slackbuild in line with source tree scripts as follows:
Code:
# Determine the CFLAGS for the known architectures:
case $ARCH in
   arm)     export SLKCFLAGS="-O2 -march=armv5te"
            export LIBDIRSUFFIX="" ;;
   *)       export SLKCFLAGS="-O2" ;;
esac
Code:
 CFLAGS="$SLKCFLAGS" \
  CXXFLAGS="$SLKCFLAGS" \
  ../configure \
    --prefix=/usr \
    --libdir=/usr/lib${LIBDIRSUFFIX} \
    --disable-debug-libs \
    --disable-debug \
    --enable-postproc \
    --enable-vp8 \
    --enable-shared \
    --enable-runtime-cpu-detect \
    --build=$ARCH-slackware-linux-gnueabi
     2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
./configure complained about "--build=$ARCH-slackware-linux-gnueabi" not being a valid option so I removed that line and was then able to build a package.

I never had to bother about understanding how this stuff works so it has been a bit of an education. A Gentoo page on gcc optimisation got me headed in the right direction:http://wiki.gentoo.org/wiki/GCC_optimization
 
Old 05-20-2015, 03:50 PM   #8
meesha
LQ Newbie
 
Registered: May 2015
Posts: 6

Rep: Reputation: Disabled
Sorry for digging this up, I know that the problem has been solved, and moreover the libvpx is already in the tree maintained by Mr. Winter, but I think I found a better solution. Thing is, the configure script does not use the --target option as everybody is used to. It is (I think) used to choose proper assembler code parts for each architecture it is being built for. If not given any, the script will default to "generic-gnu", which may not be the best option. So I tried to make it work with "--target armv6-linux-gcc" option for my raspberry pi. At first it complained about not being able to find proper toolchain executables, but setting some advised (by the configure --help info) environmental variables helped: CC, AR, LD, AS, NM and STRIP. But it still failed at the end, complaining about the linker not being able to recognize -Wl,--no-undefined option. Took some time and digged through gcc's linker documentation and found out, that -Wl shall be used only when the linker is invoked via the compiler. And yes, changing the LD variable to "/usr/bin/gcc" helped - the slackbuild finally succeeded and the software works.

Hope it may help to improve the slackbuild for arm
 
  


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] Problems with ffmpeg and libvpx lancherider Linux - Software 4 01-10-2014 09:07 AM
LXer: Libvpx 1.3.0 "Forest" Supports VP9. New Enhancements LXer Syndicated Linux News 0 11-29-2013 01:20 AM
[slackbuilds.org, slack14.0]: libvpx compile failed h-warp Slackware 2 10-21-2012 08:39 AM
Error when cross-compile libvpx 0.9.1 for ARM - Contex A9 on QEMU hero132 Linux - Distributions 0 08-27-2010 09:23 AM
LXer: Build 'em Right, Build 'em Strong, Build 'em Linux LXer Syndicated Linux News 0 10-01-2007 09:51 PM

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

All times are GMT -5. The time now is 06:28 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