Slackware - ARM This forum is for the discussion of Slackware ARM. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-20-2014, 08:09 AM
|
#1
|
Member
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 889
Rep: 
|
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?
|
|
|
10-20-2014, 08:42 AM
|
#2
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,314
|
What do you get from
Code:
which arm-none-linux-gnueabi-gcc
Looks to me like it is just not in $PATH.
|
|
|
10-20-2014, 08:44 AM
|
#3
|
Slackware Contributor
Registered: Apr 2008
Distribution: Slackware
Posts: 1,656
|
Quote:
Originally Posted by justwantin
../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
|
|
|
10-20-2014, 03:29 PM
|
#4
|
Member
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 889
Original Poster
Rep: 
|
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.
|
|
|
10-21-2014, 01:30 AM
|
#5
|
Slackware Contributor
Registered: Apr 2008
Distribution: Slackware
Posts: 1,656
|
Quote:
Originally Posted by justwantin
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
|
|
|
10-21-2014, 05:38 AM
|
#6
|
Member
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 889
Original Poster
Rep: 
|
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.
|
|
|
10-25-2014, 12:20 AM
|
#7
|
Member
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 889
Original Poster
Rep: 
|
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
|
|
|
05-20-2015, 03:50 PM
|
#8
|
LQ Newbie
Registered: May 2015
Posts: 6
Rep: 
|
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 
|
|
|
All times are GMT -5. The time now is 09:22 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|