SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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.
Excellent. Could you check the slackbuild you used for binutils, it keeps failing here. I added a sed command and removed all patches, that way the package builds but the part after the oprofile output gives errors, so I am able to get a package but did not try to install.
#!/bin/sh
# Copyright 2005-2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Modified 2011 by Eric Hameleers <alien at slackware.com> for ARM port.
PKGNAM=binutils
VERSION=${VERSION:-2.24}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
i?86) export ARCH=i486 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$MARCH ;;
esac
fi
NUMJOBS=${NUMJOBS:-" -j9 "}
# Uncomment this to include the experimental gold linker:
# Set to ld.gold or ld.bfd:
DEFAULT_LD=ld.gold
# The --enable-initfini-array option was added in binutils-2.21.51.0.3.
# This option currently causes a world of hurt trying to compile glibc,
# and might break static libraries or cause other ill effects. There
# is an upstream patch for glibc but it does not avoid all of the known
# problems (and there may be some unknown ones, too), so we will avoid
# introducing this feature for now.
# References:
# http://sourceware.org/bugzilla/show_bug.cgi?id=12343
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
if [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS=""
LIBDIRSUFFIX="64"
else
LIBDIRSUFFIX=""
fi
case "$ARCH" in
arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
*) TARGET=$ARCH-slackware-linux ;;
esac
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-binutils
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf binutils-$VERSION
tar xvf $CWD/binutils-$VERSION.tar.gz || \
tar xvf $CWD/binutils-$VERSION.tar.bz2 || exit 1
cd binutils-$VERSION
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# End of preparations
if echo "$*" | grep -qw -- --prep ; then
exit 0
fi
# Build for an x86 glibc2-based Linux system:
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--infodir=/usr/info \
--with-docdir=/usr/doc/binutils-$VERSION \
--enable-ld=default \
--enable-gold \
--enable-plugins \
--enable-threads \
--with-pic \
--enable-shared \
--disable-nls \
--disable-werror \
--disable-multilib \
--build=$TARGET \
|| exit 1
make clean || exit 1
make LDFLAGS="" $NUMJOBS || make LDFLAGS="" || exit 1
make install DESTDIR=$PKG || exit 1
# "make install" skips this, but binutils.spec doesn't. Sneaky, huh?
cp -a include/libiberty.h $PKG/usr/include/libiberty.h
# Differentiate between BSD strings and GNU strings
( cd $PKG/usr/bin ; mv strings strings-GNU )
( cd $PKG/usr/man/man1 ; mv strings.1 strings-GNU.1 )
# Move ldscripts to /usr/lib${LIBDIRSUFFIX}, and then put symlinks in place
mv $PKG/usr/${TARGET}/lib/ldscripts $PKG/usr/lib${LIBDIRSUFFIX}
( cd $PKG/usr/${TARGET}
ln -s /usr/lib${LIBDIRSUFFIX}/ldscripts lib/ldscripts
for FILE in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip ; do
if [ -r "/usr/bin/$FILE" ]; then
rm -f bin/$FILE
ln -s /usr/bin/$FILE bin/$FILE
fi
done
)
# If the requested default linker is present, make it the default:
# Set the link differently on the system to change the default at runtime.
if [ -r $PKG/usr/bin/$DEFAULT_LD ]; then
( cd $PKG/usr/bin ; rm -f ld ; ln -sf $DEFAULT_LD ld )
fi
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# Remove some unneeded man pages, and then compress the rest
rm -f $PKG/usr/man/man1/{dlltool,windres}.1
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
# Compress info pages
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*
mkdir -p $PKG/usr/doc/binutils-$VERSION
cp \
$CWD/release.binutils-* \
COPYING* ChangeLog.linux MAI* README* \
$PKG/usr/doc/binutils-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
# is useful, but don't let it get totally out of control:
if [ -r ChangeLog ]; then
DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
chown -R root:root $PKG/usr/doc/binutils-$VERSION
# Add slack-desc:
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $TMP/binutils-$VERSION-$ARCH-$BUILD.txz
About SLKCFLAGS=""
I use /etc/profile and add custom flags to CFLAGS,CXXFLAGS and SLKCFLAGS
So, I am building binutils and will continue with the toolchain:
U kernel-headers-3.12.15 DONE
U glibc-2.19 DONE
R zlib-1.2.8 DONE
U file-5.17 DONE
U binutils-2.24 DONE
R oprofile-0.9.7 SKIPPED
U gmp-6.0.0a DONE
R mpfr-3.1.2 DONE
U libmpc-1.0.2-1 DONE
Create symlink:
cd /usr/lib64
ln -s libmpc.so.3 libmpc.so.2
Install gcc-gnat DONE, gcc-go SKIPPED and gcc-java SKIPPED
R gcc-4.8.2 DONE
R libtool-2.4.2 DONE
R kernel-headers BUSY
R popt
R glibc
R binutils
R oprofile
R gcc
R libtool
Any comments?
After this the base will follow.
I am using slackel openbox 6.0 and I am trying to trim down my installed packages.
EDIT: I have installed the binary packages I have build on another testbox and that way I can test them at the same time.
Last edited by hendrickxm; 04-08-2014 at 03:52 PM.
After rebuilding gcc with new libmpc you don't need to create symlinks to new version of that library because rebuilded version of gcc now does not need older version.
I got up to the point where I want to rebuild glibc-2.19 but when I am building, it gives an error: ld too old.
Code:
configure: error:
*** These critical programs are missing or too old: ld
*** Check the INSTALL file for required versions.
make: *** No targets specified and no makefile found. Stop.
make: *** No targets specified and no makefile found. Stop.
Any thought, did not have this issue when I used the slackware-current binutils rebuild version.
So I tried to compile a newer version of oprofile:
Code:
checking for cplus_demangle in -liberty... no
configure: error: liberty library not found
make: *** No targets specified and no makefile found. Stop.
make: *** No targets specified and no makefile found. Stop.
I screwed up somewhere.
Last edited by hendrickxm; 04-08-2014 at 04:31 PM.
Thanks again.
I added the patch to glibc. Are there any problems I might get into by using ld.gold?
I use grub, so I will need to be able to rebuild that. There is no more need for oprofile if I don't use ld.bfd or is there?
Hmm, I just rebuild glibc with the patch and tried to install the package. My computer froze, so I hard-rebooted and now it hangs on the boot after mounting /sys /proc. Damn.
I guess I will go for a rebuild with the current binutils, I did not have problems there.
So glibc-2.19, binutils-2.23.52.0.1, gcc-4.8.2, kernel-headers-3.12.16 and most of the latest available libraries.
Last edited by hendrickxm; 04-09-2014 at 05:07 PM.
I am confused, Slackware already has GCC 4.8.2 on it
Yes, that is correct. But when you rebuild your toolchain, as these guys are, building and rebuilding gcc is part of all that. Kernel headers, binutils, gcc (and deps), libc, must all be built in a certain way, often with specific peculiarities that can vary with each individual peice of the toolchain and the version used. I've been following this thread and like the way it is progressing.
Yes, that is correct. But when you rebuild your toolchain, as these guys are, building and rebuilding gcc is part of all that. Kernel headers, binutils, gcc (and deps), libc, must all be built in a certain way, often with specific peculiarities that can vary with each individual peice of the toolchain and the version used. I've been following this thread and like the way it is progressing.
I am just wondering why are they doing that if Slackware already has it
But when you rebuild your toolchain, as these guys are, building and rebuilding gcc is part of all that.
Sooooo ... they are creating a toolchain, because they are upgrading the c library. The c library, compiler, linker/assembler, kernel headers... et al, that are used in a toolchain are tightly coupled together. To properly create a new toolchain for upgrading the c library requires that the compiler is built specifically for that c library. Soooo... they have to rebuild binutils, gcc, glibc, as well as many other packages, get the order right, discover incompatiblities, fix or find fixes for those incompatiblities, build, test, rebuild, test... I am hoping you are getting the idea that is complex, the order must be correct, get one thing wrong and you have to start again (probably from the beginning). If you have messed around with LFS, then you have dabbled in toolchain building.
@moisepedro: No, glibc-2.19 is decidedly not even in current yet. Kernel headers in Slackware are from 3.10.17, here they are using 3.12.15. binutils is also more recent version.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.