LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware64 current gcc-4.8.1 and glibc-2.17 (https://www.linuxquestions.org/questions/slackware-14/slackware64-current-gcc-4-8-1-and-glibc-2-17-a-4175464648/)

tuxbg 06-04-2013 04:48 AM

Slackware64 current gcc-4.8.1 and glibc-2.17
 
Hello Slackware users :)
I compile gcc-4.8.1 and rebuild my entire system from scratch.Yes i know i use minimal system installation but all packages build perfectly.
This is the steps and packages that i rebuild from source using new gcc-4.8.1
First i recompile all the packages/dependencies needed to rebuild my entire system.
First i recompile all packages/dependencies with gcc-4.8.0

The dependencie packages needed to rebuild my entire system
This is the build order


Code:

patch
groff
texinfo
libtermcap
m4
autoconf
automake
pkg-config
bison
flex
libtiff
curl
libarchive
cpio
expat
tcl
libjpeg
yasm
python
mozilla-nss
libxslt
gettext
gettext-tools
util-macros
xorg-sgml-doctools
glproto
inputproto
kbproto
libpthread-stubs
randrproto
recordproto
renderproto
xextproto
xproto
libXpm
libXaW
cmake
openssl
libtool
intltool
gobject-introspection
nettle
p11-kit
pcre
xcursorgen
xbitmaps
bigreqsproto
compositeproto
damageproto
dri2proto
evieext
fixesproto
fonstproto
fontcacheproto
printproto
resourceproto
scrnsaverproto
videoproto
xcb-proto
xcmiscproto
xf86dgaproto
xf86driproto
xf86miscproto
xf86vidmodeproto
xineramaproto
libXtst
xtrans
makedepend
xorg-server-xvfb
slang
at-spi2-core
at-spi2-atk
gtk3
cups
openldap-client
acl
llvm
doxygen
gperf
iso-codes
sysfsutils
vim
vim-gvim
libusb
usbutils
db48
popt
rpm
rpm2tgz
slacktrack
linuxdoc-tools
git

Second step is compiling toolchain
Build order are


Code:

binutils
kernel-headers
gcc-4.8.0_static
glibc
gcc
ncurses
bash
bzip2
coreutils
diffutils
perl
file
findutils
gawk
grep
gzip
make
sed
tar - #add sed -i -e '/gets is a/d' gnu/stdio.in.h to Slackbuild to compile tar against new glibc-2.17
xz

Third step is to recompile again all the dependencies with new gcc-4.8.1

Four step is to recompile system packages
Build order are


Code:

aaa_base
aaa_elflibs
alsa-lib
alsa-oss
alsa-utils
atk
attr
audiofile
bin
bc
cairo
cdrtools
cxxlibs
cyrus-sasl
dbus
dbus-glib
devs
dhcpcd
dialog
e2fsprogs
eject
etc
exiv2
flac
fribidi
freetype
harfbuzz
icu4c
gdk-pixbuf2
pango
geeqie
giflib
glib2
gnupg
gtk+2
gvfs
htop
infozip
iputils
kernel-firmware
kmod
lcms
lcms2
libatasmart
libcdio
libcroco
libffi
libgcrypt
libmad
libmcs
libmng
libmowgli
libmpc
libnotify
libogg
libpng
libtheora
libvorbis
libwnck
libxklavier
libxml2
lilo
links
lzo
mpg123
nano
#net-tools #Missing kernel header file ip_h
network-scripts
openssl
phonon
pkgtools
polkit
poppler
procps
sdl
shadow
shared-mime-info
#slackpkg # No source  available
slocate
startup-notification
sysklogd
sysvinit
sysvinit-scripts
udev  # To compile udev with new glibc-2.17 i need to add -lrt CFLAG
udisks2
unrar
util-linux
vte
wget
which
zlib
kernel
kernel-modules

Five step is to compile X
Build order are


Code:

fontconfig
freeglut
glew
libdrm
mtdev
mesa
glu
x11-skel
fontconfig-infinality
xorg-server packages - I use minimal instalation and this is the packages from X
iceauth
setxkbmap
xauth
xinit
xkbutils
xkeyboard-config
xf86-input-evdev
xf86-video-ati
libfontenc
libICE
libSM
libX11
libXau
libxcb
libXcomposite
libXcursor
libXdamage
libXdmcp
libXext
libXfixes
libXfont
libXft
libXi
libXinerama
libxkbfile
libXmu
libXrandr
libXrender
libXres
libXScrnSaver
libXt
libXv
libXxf86dga
libXxf86vm
pixman
libxcb
xcb-util
xorg-server

Six step is to recompile xfce4
This is the build order

Code:

libxfce4util
xfconf
libxfce4ui
garcon
exo
xfce4-panel
Thunar
xfce4-settings
xfce4-session
xfwm4
xfdesktop
xfce4-appfinder
gtk-xfce-engine
xfce4-terminal
tumbler
xfce4-notifyd
xfwm4-themes

Seven step is to recompile "other" packages

Code:

ConsoleKit
libvdpau
MPlayer
audacious
audacious-plugins
epdfview
flash-player-plugin
leafpad
libevent
libsoup
murrine
murrine-themes
p7zip
transmission
xarchiver
xfce4-screenshooter
ttf-bitstream-vera
dejavu
skype_static
mozilla-firefox

And thats it.
Oh and i forget all packages are build with
Code:

-O2 -fPIC -march=native -mtune=native

bartgymnast 06-05-2013 01:26 AM

Hiya Tuxbg,

This might be nice for blog post.

tuxbg 06-05-2013 06:54 AM

Oh i forget one more thing :)
I rebuild gcc with cloog and isl support
This is the SlackBuild that i create to rebuild gcc


Code:

#!/bin/bash


#Имена на пакетите
GMP_VERS=5.1.2
GMP_BUILD=${GMP_BUILD:-1}
MPFR_VERS=3.1.2
MPFR_BUILD=${MPFR_BUILD:-1}
MPC_VERS=0.8.2
MPC_BUILD=${MPC_BUILD:-2}
PPL_VERS=1.0
PPL_BUILD=${PPL_BUILD:-1}
ISL_VERS=0.11.1
ISL_BUILD=${ISL_BUILD:-1}
CLOOG_VERS=0.18.0
CLOOG_BUILD=${CLOOG_BUILD:-1}
GCC_VERS=4.8.1
GCC_BUILD=${GCC_BUILD:-1}

#Архитектура на хоста
export ARCH=x86_64

#Паралелни задачи
NUMJOBS=${NUMJOBS:-" -j7 "}

#Работни директории
CWD=$(pwd)
TMP=${TMP:-/tmp/}
PKG1=$TMP/package-gmp
PKG2=$TMP/package-mpfr
PKG3=$TMP/package-mpc
PKG4=$TMP/package-ppl
PKG5=$TMP/package-isl
PKG6=$TMP/package-cloog
PKG7=$TMP/package-gcc
PKG8=$TMP/package-gcc-g++

#Всеки пакет има отделна директория за билдване
mkdir -p $TMP/build/{gmp,mpfr,mpc,ppl,isl,cloog,gcc}

#CPP/CXX флагове
if [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC -march=native -mtune=native -flto -fuse-linker-plugin"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi


rm -rf $PKG1
mkdir -p $TMP $PKG1/usr

cd $TMP
tar xvf $CWD/gmp-$GMP_VERS.tar.?z*
cd gmp-$GMP_VERS
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

cd $TMP/build/gmp

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="-O2 -fPIC  -march=native -mtune=native -flto -fuse-linker-plugin -fexceptions" \
../../gmp-$GMP_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --infodir=/usr/info \
  --with-gnu-ld \
  --enable-cxx \
  --build=x86_64-slackware-linux

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG1 || exit 1

rm $PKG1/usr/info/dir
gzip -9 $PKG1/usr/info/*

find $PKG1 | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

mkdir -p $PKG1/usr/doc/gmp-$GMP_VERS
cp -a \
  AUTHORS COPYING* NEWS README \
  $PKG1/usr/doc/gmp-$GMP_VERS

# 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 $PKG1/usr/doc/*-$GMP_VERS)
  cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
  touch -r ChangeLog $DOCSDIR/ChangeLog
fi

mkdir -p $PKG1/install
cat $CWD/slack-desc/slack-desc-gmp  > $PKG1/install/slack-desc || exit 1


cd $PKG1
/sbin/makepkg -l y -c n $TMP/gmp-$GMP_VERS-$ARCH-$GMP_BUILD.txz || exit 1
upgradepkg --reinstall  $TMP/gmp-$GMP_VERS-$ARCH-$GMP_BUILD.txz 



cd $TMP
tar xvf $CWD/mpfr-$MPFR_VERS.tar.?z*
cd mpfr-$MPFR_VERS
chown -R root:root .

cd $TMP/build/mpfr

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../mpfr-$MPFR_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --infodir=/usr/info \
  --docdir=/usr/doc/mpfr-$MPFR_VERS \
  --enable-static=yes \
  --with-gmp=$PKG1 \
  --enable-shared=yes \
  --build=x86_64-slackware-linux

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG2 || exit 1

find $PKG2 | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

rm -f $PKG2/usr/info/dir
gzip -9 $PKG2/usr/info/*

mkdir -p $PKG2/usr/doc/mpfr-$MPFR_VERS
cp -a \
  AUTHORS BUGS COPYING* FAQ.html INSTALL NEWS README* TODO VERSION \
  examples \
  $PKG2/usr/doc/mpfr-$MPFR_VERS

if [ -r ChangeLog ]; then
  DOCSDIR=$(echo $PKG2/usr/doc/mpfr-$MPFR_VERS)
  cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
  touch -r ChangeLog $DOCSDIR/ChangeLog
fi

mkdir -p $PKG2/install
cat $CWD/slack-desc/slack-desc-mpfr  > $PKG2/install/slack-desc


cd $PKG2
/sbin/makepkg -l y -c n $TMP/mpfr-$MPFR_VERS-$ARCH-$MPFR_BUILD.txz || exit 1
upgradepkg --reinstall $TMP/mpfr-$MPFR_VERS-$ARCH-$MPFR_BUILD.txz

cd $TMP
tar xvf $CWD/mpc-$MPC_VERS.tar.?z*
cd mpc-$MPC_VERS
chown -R root:root .

cd $TMP/build/mpc


CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../mpc-$MPC_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --infodir=/usr/info \
  --docdir=/usr/doc/mpc-$MPC_VERS \
  --with-gmp=$PKG1 \
  --with-mpfr=$PKG2 \
  --enable-static=yes \
  --enable-shared=yes \
  --build=x86_64-slackware-linux

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG3 || exit 1

find $PKG3 | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

rm -f $PKG3/usr/info/dir
gzip -9 $PKG3/usr/info/*

mkdir -p $PKG3/usr/doc/mpc-$MPC_VERS
cp -a \
  AUTHORS COPYING* INSTALL NEWS README* TODO \
  $PKG3/usr/doc/mpc-$MPC_VERS

if [ -r ChangeLog ]; then
  DOCSDIR=$(echo $PKG3/usr/doc/mpc-$MPC_VERS)
  cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
  touch -r ChangeLog $DOCSDIR/ChangeLog
fi

mkdir -p $PKG3/install
cat $CWD/slack-desc/slack-desc-mpc  > $PKG3/install/slack-desc || exit 1


cd $PKG3
/sbin/makepkg -l y -c n $TMP/mpc-$MPC_VERS-$ARCH-$MPC_BUILD.txz || exit 1
upgradepkg --reinstall --install-new  $TMP/mpc-$MPC_VERS-$ARCH-$MPC_BUILD.txz

cd $TMP
tar xvf $CWD/ppl-$PPL_VERS.tar.?z*
cd ppl-$PPL_VERS

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 {} \;

cd $TMP/build/ppl

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../ppl-$PPL_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --with-gmp=$PKG1
  --enable-interfaces="c,cxx" \
  --build=x86_64-slackware-linux

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG4

find $PKG4 | xargs file | grep -e "executable" -e "shared object" \
  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

if [ -d $PKG4/usr/man ]; then
  ( cd $PKG4/usr/man
    for manpagedir in $(find . -type d -name "man*") ; do
      ( cd $manpagedir
        for eachpage in $( find . -type l -maxdepth 1) ; do
          ln -s $( readlink $eachpage ).gz $eachpage.gz
          rm $eachpage
        done
        gzip -9 *.?
      )
    done
  )
fi



mkdir -p $PKG4/install
cat $CWD/slack-desc/slack-desc-ppl  > $PKG4/install/slack-desc || exit 1

cd $PKG4
/sbin/makepkg -l y -c n $TMP/ppl-$PPL_VERS-$ARCH-$PPL_BUILD.txz || exit 1
upgradepkg --reinstall --install-new $TMP/ppl-$PPL_VERS-$ARCH-$PPL_BUILD.txz


cd $TMP
tar xvf $CWD/isl-$ISL_VERS.tar.?z*
cd isl-$ISL_VERS
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 {} \;


CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../isl-$ISL_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --sysconfdir=/etc \
  --build=x86_64-slackware-linux

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG5

rm -f $PKG5/usr/lib${LIBDIRSUFFIX}/*gdb.py


find $PKG5 | xargs file | grep -e "executable" -e "shared object" \
  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

if [ -d $PKG5/usr/man ]; then
  ( cd $PKG5/usr/man
    for manpagedir in $(find . -type d -name "man*") ; do
      ( cd $manpagedir
        for eachpage in $( find . -type l -maxdepth 1) ; do
          ln -s $( readlink $eachpage ).gz $eachpage.gz
          rm $eachpage
        done
        gzip -9 *.?
      )
    done
  )
fi


mkdir -p $PKG5/install
cat $CWD/slack-desc/slack-desc-ppl  > $PKG5/install/slack-desc || exit 1


cd $PKG5
/sbin/makepkg -l y -c n $TMP/isl-$ISL_VERS-$ARCH-$ISL_BUILD.txz || exit 1
upgradepkg --reinstall --install-new $TMP/isl-$ISL_VERS-$ARCH-$ISL_BUILD.txz


cd $TMP
tar xvf $CWD/cloog-$CLOOG_VERS.tar.?z*
cd cloog-$CLOOG_VERS
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 {} \;


cd $TMP/build/cloog

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../cloog-$CLOOG_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --sysconfdir=/etc \
  --with-gmp=$PKG1 \
  --with-isl=system \
  --with-bits=gmp \
  --build=x86_64-slackware-linux

make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG6

find $PKG6 | xargs file | grep -e "executable" -e "shared object" \
  | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

if [ -d $PKG6/usr/man ]; then
  ( cd $PKG6/usr/man
    for manpagedir in $(find . -type d -name "man*") ; do
      ( cd $manpagedir
        for eachpage in $( find . -type l -maxdepth 1) ; do
          ln -s $( readlink $eachpage ).gz $eachpage.gz
          rm $eachpage
        done
        gzip -9 *.?
      )
    done
  )
fi



mkdir -p $PKG6/install
cat $CWD/slack-desc/slack-desc-cloog  > $PKG6/install/slack-desc || exit 1


cd $PKG6
/sbin/makepkg -l y -c n $TMP/cloog-$CLOOG_VERS-$ARCH-$CLOOG_BUILD.txz || exit 1
upgradepkg --reinstall --install-new $TMP/cloog-$CLOOG_VERS-$ARCH-$CLOOG_BUILD.txz

mkdir -p $PKG{7,8}/install
cat $CWD/slack-desc/slack-desc-gcc > $PKG7/install/slack-desc
cat $CWD/slack-desc/slack-desc-gcc-g++ > $PKG8/install/slack-desc

cd $TMP
tar xvf $CWD/gcc-$GCC_VERS.tar.?z*

( cd $TMP/gcc-$GCC_VERS
  #NO fixincludes
  sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
  sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure

  chown -R root:root .
  find . -perm 777 -exec chmod 755 {} \;
  find . -perm 775 -exec chmod 755 {} \;
  find . -perm 754 -exec chmod 755 {} \;
  find . -perm 664 -exec chmod 644 {} \;
)

cd $TMP/build/gcc
CFLAGS="-O2 -fPIC -march=native -mtune=native" \
CXXFLAGS="-O2 -fPIC -march=native -mtune=native" \
../../gcc-$GCC_VERS/configure  --prefix=/usr \
      --libdir=/usr/lib$LIBDIRSUFFIX \
      --mandir=/usr/man --infodir=/usr/info \
      --enable-bootstrap \
      --enable-languages=c,c++,lto \
      --enable-shared --enable-threads=posix \
      --with-system-zlib --enable-__cxa_atexit \
      --disable-libunwind-exceptions --enable-clocale=gnu \
      --disable-libstdcxx-pch --disable-nls \
      --enable-gnu-unique-object --enable-linker-build-id \
      --enable-lto --enable-gold --enable-ld=default \
      --enable-cloog-backend=isl --disable-cloog-version-check \
      --with-gmp=/usr --with-mpfr=/usr --with-mpc=/usr \
      --with-ppl=/usr --with-cloog=/usr \
      --enable-plugin --with-plugin-ld=ld.gold \
      --with-linker-hash-style=gnu --disable-gtktest \
      --disable-multilib --disable-libssp --disable-werror  \
      --enable-checking=release \
      --with-cpu=native --with-arch=native --with-tune=native \
      --with-arch-directory=amd64 \
      --target=x86_64-slackware-linux \
      --build=x86_64-slackware-linux \
      --host=x86_64-slackware-linux || exit 1

      make $NUMJOBS bootstrap ;
      make info

      make $NUMJOBS check


    make install DESTDIR=$PKG7

rm -f $PKG7/usr/lib${LIBDIRSUFFIX}/*gdb.py

if [ ! -r $PKG7/usr/lib${LIBDIRSUFFIX}/gcc/x86_64-slackware-linux/${GCC_VERS}/specs ]; then
  cat stage1-gcc/specs > $PKG7/usr/lib${LIBDIRSUFFIX}/gcc/x86_64-slackware-linux/${GCC_VERS}/specs
fi

if [ "$ARCH" = "x86_64" ]; then
  sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
    $PKG7/usr/lib${LIBDIRSUFFIX}/gcc/x86_64-slackware-linux/${GCC_VERS}/specs
fi

make -i install-info DESTDIR=$PKG7

chmod 755 $PKG7/usr/lib${LIBDIRSUFFIX}/libgcc_s.so.1

( cd $PKG7/usr/info ; rm dir ; gzip -9 * )
( cd $PKG7
  mkdir -p lib
  cd lib
  ln -sf $PKG7/usr/bin/cpp .
)


( cd $PKG7/usr/bin
  mv g++ g++-gcc-$GCC_VERS
  mv gcc gcc-$GCC_VERS
  ln -sf g++-gcc-$GCC_VERS g++
  ln -sf gcc-$GCC_VERS gcc
  ln -sf g++ c++
  ln -sf gcc cc
  ln -sf gcc-$GCC_VERS x86_64-slackware-linux-gcc
  ln -sf gcc-$GCC_VERS x86_64-slackware-linux-gcc-$GCC_VERS
  ln -sf gcc-ar x86_64-slackware-linux-gcc-ar
  ln -sf gcc-nm x86_64-slackware-linux-gcc-nm
  ln -sf gcc-ranlib x86_64-slackware-linux-gcc-ranlib
  ln -sf g++-gcc-$GCC_VERS x86_64-slackware-linux-c++
  ln -sf g++-gcc-$GCC_VERS x86_64-slackware-linux-g++
)

( cd $PKG7/usr/man
  gzip -9 */*
  cd man1
  ln -sf g++.1.gz c++.1.gz
  ln -sf gcc.1.gz cc.1.gz



# gcc-g++:
( cd $PKG8
  mkdir -p usr/bin
  mv $PKG7/usr/bin/*++* usr/bin
  mkdir -p usr/include
  mv $PKG7/usr/include/c++ usr/include
  mkdir -p usr/lib${LIBDIRSUFFIX}
  mv $PKG7/usr/lib${LIBDIRSUFFIX}/*++* usr/lib${LIBDIRSUFFIX}
  mkdir -p usr/libexec/gcc/x86_64-slackware-linux/$GCC_VERS
  mv $PKG7/usr/libexec/gcc/x86_64-slackware-linux/$GCC_VERS/cc1plus usr/libexec/gcc/x86_64-slackware-linux/$GCC_VERS/cc1plus
  mkdir -p usr/man/man1
  mv $PKG7/usr/man/man1/*++* usr/man/man1
) || exit 1


( cd $TMP
  for file in $(find . -type f -name "*.la") ; do
    cat $file | sed -e 's%-L/gcc-[[:graph:]]* % %g' > $TMP/tmp-la-file
    cat $TMP/tmp-la-file > $file
  done
  rm $TMP/tmp-la-file
)

for dir in $PKG{7,8}; do
  ( cd $dir
    find . -name "lib*so*" -exec strip --strip-unneeded "{}" \;
    find . -name "lib*a" -exec strip -g "{}" \;
    strip --strip-unneeded usr/bin/* 2> /dev/null
    find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
    find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  )
done


( cd $PKG7
  makepkg -l y -c n $TMP/gcc-$GCC_VERS-$ARCH-$GCC_BUILD.txz )
( cd $PKG8
  makepkg -l y -c n $TMP/gcc-g++-$GCC_VERS-$ARCH-$GCC_BUILD.txz )


cd $TMP
rm -rf build
rm -rf $PKG{1,2,3,4,5,6,7}
#Махаме сорс кода
rm -rf gmp-GMP_VERS
rm -rf mpfr-$MPFR_VERS
rm -rf mpc-$MPC_VERS
rm -rf ppl-$PPL_VERS
rm -rf isl-$ISL_VERS
rm -rf cloog-$CLOOG_VERS
rm -rf gcc-$GCC_VERS
rm -rf package-gcc-g++

echo
echo "Slackware GCC package build complete!"
echo


tuxbg 06-05-2013 11:34 AM

With this net-tools now compiles perfect
This is updated SlackBuild script.I made some modifications to it


Code:

#!/bin/sh

# Copyright 2006, 2007, 2008, 2009, 2010, 2012  Patrick J. Volkerding, Sebeka, MN, 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.


PKGNAM=net-tools
VERSION=${VERSION:-CVS_20101030}
BUILD=${BUILD:-1}

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
      *) export ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG

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

cd $TMP
rm -rf net-tools-$VERSION
tar xvf $CWD/net-tools-$VERSION.tar.gz || exit 1
cd net-tools-$VERSION || exit 1

sed -i -e '/Token/s/y$/n/'        config.in
sed -i -e '/HAVE_HWSTRIP/s/y$/n/' config.in


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 {} \;

mkdir -p $PKG/usr/doc/net-tools-$VERSION
cp -a COPYING* README* $PKG/usr/doc/net-tools-$VERSION
chmod 644 $PKG/usr/doc/net-tools-$VERSION/*
chown root:root $PKG/usr/doc/net-tools-$VERSION/*
yes "" | make config 
make
make update DESTDIR=$PKG
strip --strip-unneeded ipmaddr iptunnel hostname arp ifconfig nameif rarp route netstat plipconfig slattach mii-tool
mkdir -p $PKG/sbin $PKG/bin $PKG/usr/sbin
cat arp > $PKG/sbin/arp
cat ifconfig > $PKG/sbin/ifconfig
cat rarp > $PKG/sbin/rarp
cat route > $PKG/sbin/route
cat hostname > $PKG/bin/hostname
cat mii-tool > $PKG/sbin/mii-tool
cat nameif > $PKG/sbin/nameif
cat netstat > $PKG/bin/netstat
cat plipconfig > $PKG/sbin/plipconfig
cat slattach > $PKG/usr/sbin/slattach
cat ipmaddr > $PKG/sbin/ipmaddr
cat iptunnel > $PKG/sbin/iptunnel
chmod 755 $PKG/sbin/* $PKG/bin/* $PKG/usr/sbin/*
cd man/en_US
mkdir -p $PKG/usr/man/man{1,5,8}
for page in dnsdomainname.1 domainname.1 hostname.1 nisdomainname.1 \
  ypdomainname.1 ; do
  cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
done
cat ethers.5 | gzip -9c > $PKG/usr/man/man5/ethers.5.gz
for page in arp.8 ifconfig.8 mii-tool.8 nameif.8 netstat.8 rarp.8 route.8 \
  slattach.8 plipconfig.8 ; do
  cat $page | gzip -9c > $PKG/usr/man/man8/$page.gz
done
( cd $PKG/bin
  ln -sf hostname dnsdomainname
  ln -sf hostname nisdomainname
  ln -sf hostname ypdomainname
)

# This is a little Slackware-specific tool used in some of the network
# related scripts to calculate network and broadcast addresses:
( cd $PKG/bin
  cc -O2 -o ipmask $CWD/ipmask.c
  strip --strip-unneeded ipmask
  chmod 755 ipmask
)
cat $CWD/ipmask.8 | gzip -9c > $PKG/usr/man/man8/ipmask.8.gz

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz


bartgymnast 06-05-2013 01:21 PM

tux, in your gcc script, you hardcoded x86_64 only
why not both arches ?

tuxbg 06-05-2013 02:39 PM

Quote:

Originally Posted by bartgymnast (Post 4966027)
tux, in your gcc script, you hardcoded x86_64 only
why not both arches ?

Well i don't think that anybody want to try this. :)
My host is x86_64 it's not so hard to edit this script and reconfigure it to i686.
I also have create a build script for all dependencies,"system stuff",all toolchain packages,"other stuff" ,etc

Darth Vader 06-05-2013 03:59 PM

Congratulation, my Bulgarian friend!

And, because, of its development model, Slackware is considered as "not easy rebuild-able from sources", and even "un-rebuild-able from sources", I suggest you to continue to develop your work and this thread is what I call "it should be sticky"!

Why? Because if we manage to have a sources tree where with execution of an "slackware.Slackbuild" of even few scripts, we have opened a great window for experimentation, i.e. "which one is better as ARCH? i486, i586 or i686?" and for even more stability for Slackware, i.e. a more simple way to resolve The Great LibPNG Problem.

Also, porting the slackware to an new ARM platform will become more easy, when we known "how to build Slackware, step-by-step".

tuxbg 06-06-2013 03:15 AM

Quote:

Originally Posted by Darth Vader (Post 4966104)
Congratulation, my Bulgarian friend!

And, because, of its development model, Slackware is considered as "not easy rebuild-able from sources", and even "un-rebuild-able from sources", I suggest you to continue to develop your work and this thread is what I call "it should be sticky"!

Why? Because if we manage to have a sources tree where with execution of an "slackware.Slackbuild" of even few scripts, we have opened a great window for experimentation, i.e. "which one is better as ARCH? i486, i586 or i686?" and for even more stability for Slackware, i.e. a more simple way to resolve The Great LibPNG Problem.

Also, porting the slackware to an new ARM platform will become more easy, when we known "how to build Slackware, step-by-step".

Thank you for your support neighbour :)
Well the hardest part of that build was the build order for the packages.Especially for dependiencies

tuxbg 06-06-2013 03:31 AM

Oh one more thing
libmad is compiled with -O -fPIC because of this -fforce-mem
poppler is build with --disable-poppler-qt4

tuxbg 06-07-2013 05:59 AM

This patch is needed to build Virtualbox with gcc-4.8 and gcc-4.8.1

Code:

Index: configure
===================================================================
--- a/configure        (revision 45449)
+++ a/configure        (revision 45450)
@@ -416,7 +416,7 @@
      elif [ $cc_maj -lt 3 \
              -o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
              -o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \
-            -o \( $cc_maj -eq 4 -a $cc_min -gt 7 \) \
+            -o \( $cc_maj -eq 4 -a $cc_min -gt 8 \) \
              -o $cc_maj -gt 4 ]; then
        log_failure "gcc version $cc_ver found, expected gcc 3.x with x>1 or gcc 4.x with 0<x<8"
        fail really
Index: Config.kmk
===================================================================
--- a/Config.kmk        (revision 45449)
+++ a/Config.kmk        (revision 45450)
@@ -1503,7 +1503,7 @@
 #
 # Compiler optimization flags.
 #
-VBOX_GCC_WARN    ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs $(VBOX_GCC_fdiagnostics-show-option)
+VBOX_GCC_WARN    ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_no-unused-parameter)
 VBOX_GCC_WARN_PEDANTIC = -Wshadow $(VBOX_GCC_WARN) -Wno-long-long
 ifdef VBOX_WITH_MASOCHISTIC_WARNINGS
  VBOX_GCC_WARN_PEDANTIC += -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter
@@ -2285,6 +2285,12 @@
        $(QUIET)$(APPEND) '$@' ' endif'
        $(QUIET)$(APPEND) '$@' 'endif'
 endif
+# Prevent warnings about unused parameters as of gcc-4.8 as this warning is now very verbose
+        $(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
+        $(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40800),)'
+        $(QUIET)$(APPEND) '$@' '  VBOX_GCC_no-unused-parameter ?= -Wno-unused-parameter'
+        $(QUIET)$(APPEND) '$@' ' endif'
+        $(QUIET)$(APPEND) '$@' 'endif'
 ifeq ($(KBUILD_TARGET),solaris)
        $(QUIET)$(APPEND) '$@' 'VBOX_GCC_msave-args            ?= $(call VBOX_GCC_CHECK_CXX,-msave-args,)'
 # Detect the solaris assembler. It is used by the the 4.x gcc compilers,


tuxbg 06-10-2013 06:44 AM

Здравей Йоане :)
Hello all.Now i use google-chrome.To make possible to download magnet links with transmission i need to patch xdg-open.
This is the patch that i used.
Code:

--- xdg-open  2012-02-18 14:22:48.058497027 +0200
+++ xdg-open  2012-02-18 14:24:04.326875223 +0200
@@ -440,6 +440,11 @@
                exit_success
            fi
        fi
+    elif (echo "$1" | grep -q '^magnet:'); then
+        transmission-gtk "$1"
+        if [ $? -eq 0 ]; then
+            exit_success
+        fi
    fi
 
    IFS=":"


tuxbg 08-04-2013 05:53 AM

New dependencies added.ITSTOOL is needed to build gnome-doc-utils.ITSTOOL must be build before linuxdoc-tools

chytraeus 08-04-2013 07:20 PM

Quote:

Originally Posted by tuxbg (Post 5002564)
New dependencies added.ITSTOOL is needed to build gnome-doc-utils.ITSTOOL must be build before linuxdoc-tools

I hope you keep updating this because I want to rebuild my system too. :hattip:

tuxbg 08-10-2013 10:05 AM

Hm ...New dep is rsync needed to build vim :)

tuxbg 08-11-2013 03:02 AM

1 Attachment(s)
Ok now this is for Pat :)
This patch is needed to openssl to build with new perl-5.18 because the build fails in pod2man while trying to generate man pages from the pod files
This is the error
Code:

cms.pod around line 457: Expected text after =item, not a number
cms.pod around line 461: Expected text after =item, not a number
cms.pod around line 465: Expected text after =item, not a number
cms.pod around line 470: Expected text after =item, not a number
cms.pod around line 474: Expected text after =item, not a number
POD document had syntax errors at /usr/bin/pod2man line 71.
make: *** [install_docs] Error 1

And patch is on attachment

hpfeil 08-11-2013 01:59 PM

Speaking of cdrtools, please get the new signing key

ftp://ftp.kernel.org/pub/linux/utils...1.0.6.tar.sign

The one in Current/source was revoked a while ago.
https://www.kernel.org/signature.html

Pray! delete this as soon as it falls into your mailbox.

Nevermind, kernel.org has version 1.06, current is 1.08.

tuxbg 08-23-2013 01:03 PM

Wow :) I didn't notice when i build lilo,the compiled binary package didn't include lilo command.
To build lilo i need dev86 and sharutils.
This is the new dep list

Code:

patch
groff
texinfo
libtermcap
m4
autoconf
automake
pkg-config
bison
flex
libtiff
curl
libarchive
cpio
expat
tcl
libjpeg
yasm
python
mozilla-nss
libxslt
gettext
gettext-tools
util-macros
xorg-sgml-doctools
glproto
inputproto
kbproto
libpthread-stubs
randrproto
recordproto
renderproto
xextproto
xproto
libXpm
libXaW
cmake
openssl
libtool
intltool
gobject-introspection
nettle
p11-kit
pcre
xcursorgen
xbitmaps
bigreqsproto
compositeproto
damageproto
dri2proto
evieext
fixesproto
fonstproto
fontcacheproto
printproto
resourceproto
scrnsaverproto
videoproto
xcb-proto
xcmiscproto
xf86dgaproto
xf86driproto
xf86miscproto
xf86vidmodeproto
xineramaproto
libXtst
xtrans
makedepend
xorg-server-xvfb
slang
at-spi2-core
at-spi2-atk
gtk3
cups
openldap-client
acl
llvm
doxygen
gperf
iso-codes
sysfsutils
rsync
vim
vim-gvim
libusb
usbutils
db48
popt
rpm
rpm2tgz
slacktrack
itstool
linuxdoc-tools
git
mozilla-nss
js185
sharutils
dev86


tuxbg 08-27-2013 12:09 AM

Hello all :) Successfully rebuild all packages with new glibc-2.18

hendrickxm 04-03-2014 01:57 AM

This is an amazing project.
Apart from glibc and gcc, what other packages have you upgraded?
I finished rebuilding my base install with glibc-2.19 and kernel-headers-3.12.15. After that I followed your sum-up the LFS book chapter 6 and dependencies according to salix to get the build order.
There are a few packages that were a bit hard and some I could not or haven't tried to update.
Some examples: gdbm, texinfo, readline, python and a few others.
Could you post which versions you are using and did you use the slackbuilds or did you build/compiled it another way?
I used original slackbuilds as much as possible.

tuxbg 04-06-2014 02:27 AM

If you upgrade readline to vers 6.3 you need to rebuild bc to work correct.Well i rebuild about 230 packages.Which package versions do you neeed ?

hendrickxm 04-06-2014 04:38 AM

I again rebuild my slackware the past week with the new kernel-headers. I changed the order a little bit and continued up to xorg-server-1.15 succesfully.
There are a few packages I did not update but only rebuild because the change might be to big or they gave me problems I am unable to fix, yet.
A shortlist of rebuild packages I would like to upgrade:
Code:

procps (procps-ng 3.3.8)
bash 4.3
kbd 2.0.1
texinfo 5.2
readline 6.3
man (man-db 2.6.6)
python 2.7.6
binutils 2.24

Of course, upgrading binutils will need a complete rebuild but I still am perfecting/improving the build order for a rebuild so I don't mind to try.
My goal is to have a way of upgrading an existing linux install (here it is Slackware) with currently available buildscript (mostly original slackbuilds I used).
Finding out what is needed for my system to work and being able to update this, if there would ever cease to be support or a big change, is a good feeling.
In the meantime I might help the developers by trying out things they did not thought users might try.

tuxbg 04-06-2014 05:16 AM

Well i build binutils 2.24,upgrade gmp to 6.0.0 ,upgrade readline to 6.3 ,texinfo to 5.2 ,xorg-server to 1.15.But you need xproto -7.25,you need to build presentproto,you need to upgrade libxcb to vers 1.10,you need to add libxshmfence-1.1 ,add dri3proto,upgrade glproto to 1.47 and then upgrade xorg-server :)

hendrickxm 04-06-2014 05:41 AM

Quote:

Originally Posted by tuxbg (Post 5147516)
Well i build binutils 2.24,upgrade gmp to 6.0.0 ,upgrade readline to 6.3 ,texinfo to 5.2 ,xorg-server to 1.15.But you need xproto -7.25,you need to build presentproto,you need to upgrade libxcb to vers 1.10,you need to add libxshmfence-1.1 ,add dri3proto,upgrade glproto to 1.47 and then upgrade xorg-server :)

When I have build xorg-server 1.15 I upgraded/added xproto 7.0.25, glproto 1.4.17, xextproto 7.3.0, dri3proto xcb-proto 1.10, libxcb 1.10, presentproto, libxshfence, libdrm 2.4.52. Well, I am going to write up my list because it's beginning to get quite long.

What symlinks do I need to create when I update gmp to 6.0?

Seems a new rebuild is needed on my laptop with all this info.

tuxbg 04-06-2014 06:02 AM

No you don't need to create any symlinks,just upgrade the package.

grissiom 04-06-2014 09:07 AM

Hmm, interesting.. Is there any noticeable performance gain?

hendrickxm 04-06-2014 12:12 PM

Only gmp itself should be a speed-up:
https://gmplib.org/gmp6.0.html

By rebuilding your packages or even upgrading the toolchain and rebuild everything from there, I guess there will be a performance gain. If you are interested in that, you could even change the CFLAGS but I kept them standard. For me the education part is more important.

This is what I am going to try, I already build in this order but only did a rebuild for binutils and gmp. Rest is the same so this hould do the trick.
Code:

U kernel-headers-3.12.15
U glibc-2.19
R zlib-1.2.8
U file-5.17
U binutils-2.24
R oprofile-0.9.7
U gmp-6.0.0a
R mpfr-3.1.2
U libmpc-1.0.2-1
Create symlink:
cd /usr/lib64
ln -s libmpc.so.3 libmpc.so.2
Install gcc-gnat, gcc-go and gcc-java
R gcc-4.8.2
R libtool-2.4.2
R kernel-headers
R popt
R glibc
R binutils
R oprofile
R gcc
R libtool

@tuxbg:
What patches did you use for binutils and gmp and did you change the slackbuild?
After this I would:
Code:

R attr-2.4.46
R acl 2.2.51
R sed-4.2.2
R bzip2-1.0.6
U pkg-config-0.28
R ncurses-5.9
R shadow-4.1.5
R libtermcap-1.2.3
R/U procps-3.2.8(-ng-3.3.9) with newest psmisc-20.22
R libcap-2.22
U coreutils-8.22
R m4-1.4.17
R flex-2.5.37
U bison-3.0.2
U grep-2.17
U readline-6.3
U bash-4.3
R libtool-2.4.2
U gdbm-1.11
R net-tools-1.60.20120726git altough this might be replaced by inetutils
U perl-5.18.2
R autoconf-2.69
U automake-1.14.1
R diffutils-3.3
R gawk-4.1.0
R findutils
U gettext-0.18.3
R xz-5.0.5
R less-451
R gzip-1.6
U kbd-2.0.1
U kmod-16
U make-4.0
R patch-2.7
R sysklogd-1.5
R sysvinit-2.88dsf
U tar-1.27.1
U texinfo-5.2
U readline-6.3
R bc-1.06.95
R/U man-1.6g(-db-2.6.6)
U man-pages-3.63
R db48-4.8.30
R expat-2.1.0
R openssl-1.0.1f and openssl-solibs
R libpng-1.4.12
U freetype-2.5.3
U fuse-2.9.3
R libelf-0.8.13
R libffi-3.0.13
U python-2.7.6
R gamin-0.1.11
U glib2-2.40.0
R gamin again
R udev-182
U util-linux-2.24
R udev
R groff-1.22.2
U e2fsprogs-1.42.9
U mdadm-3.3
R lvm2-2.02.100
R grub-2.00
R libmnl-1.0.3
R libnetfilter_conntrack-1.0.4
R libnl3-3.2.21
U libusb-1.0.18
U libpcap-1.5.3
U iptables-1.4.27
U iproute2-3.12.0
R nano-2.3.2
R sysvinit-functions and salix 14.1 scripts. The scripts are built with SLKBUILD.
R kinitrd-1.4.8
R sudo
U wget-1.15

My previous rebuild had this order but used rebuilds for readline, bash, net-tools, kbd, make, texinfo, man and python instead of updates.
Do I need to alter the slackbuilds for those packages and are there newer packages you are using? I could have made some mistakes and the build-order might not be optimal. I rebuild some packages twice because they depend on eachother according to salix slapt-get dependencies.
I would also like to try out uedev or an extracted udev from a recent systemd tarball. Anyone tried this?

After this I also did a rebuild/update of xorg but I will try to improve the build-order and update even more. If I can get there, everybody can try it out, I will provide detailed steps/slackbuilds. At this point tuxbg's input would help me a lot.
I start with a 14.1 slackel-openbox 6.0 install :).

hendrickxm 04-08-2014 03:42 AM

Could you post your binutils-2.24 buildscript, my attempts are unsuccesfull.
Perhaps you could also provide the slackbuilds for gmp-6.0.0a, readline-6.3 and texinfo-5.2. Unless they are no different from the official ones apart from the version.

Thanks!

tuxbg 04-08-2014 10:40 AM

I used original ones SlackBuild scripts except readline.And for binutils i use ld.gold to be my deffault not ld.bdf.

ps
Do you want to share my binutils,gmp,readline and texinfo packages ?

hendrickxm 04-08-2014 10:50 AM

Quote:

Originally Posted by tuxbg (Post 5148796)
I used original ones SlackBuild scripts except readline.And for binutils i use ld.gold to be my deffault not ld.bdf.

ps
Do you want to share my binutils,gmp,readline and texinfo packages ?

Ok, somehow I tried with the official slackbuild for 2.23 but with the 2.24 source, what did you edit? Removed patches, extra sed-commands?
If I manage to upgrade/rebuild my entire system again with even more upgrades, I will try the binaries on a different testbox and then I am planning on trimming down the amount of packages and setting up a repo.

tuxbg 04-08-2014 11:07 AM

GMP
BINUTILS
READLINE
TEXINFO

hendrickxm 04-08-2014 11:11 AM

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.

tuxbg 04-08-2014 11:16 AM

Code:

#!/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

hendrickxm 04-08-2014 11:21 AM

Thanks again. I will try this tonight and start rebuilding my toolchain again.

tuxbg 04-08-2014 11:31 AM

You welcome ;)

hendrickxm 04-08-2014 11:36 AM

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.

tuxbg 04-08-2014 11:47 AM

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.

hendrickxm 04-08-2014 04:17 PM

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.

tuxbg 04-09-2014 10:36 AM

1 Attachment(s)
Well this is because glibc cant be build with ld.gold.You need to proceed like this
Code:

cd /usr/bin
rm -f ld
ln -sf ld.bfd ld

In my build script of binutils i use ld.gold linker instead of ld.bfd.
Or if you want your default linker to be gold apply this patch to glibc

hendrickxm 04-09-2014 04:46 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.

moisespedro 04-09-2014 04:50 PM

I am confused, Slackware already has GCC 4.8.2 on it

j_v 04-09-2014 05:49 PM

Quote:

Originally Posted by moisespedro (Post 5149707)
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.

moisespedro 04-09-2014 07:10 PM

Quote:

Originally Posted by j_v (Post 5149737)
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

j_v 04-09-2014 07:36 PM

Quote:

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.

moisespedro 04-09-2014 08:04 PM

I still don't get it, they aren't upgrading anything. The packages are already there!
That is why I don't get it (I know about the toolchain stuff)

j_v 04-09-2014 08:14 PM

@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.

moisespedro 04-09-2014 08:32 PM

That is what I get for not reading the whole thread. Title says glibc 2.17 tho.

hendrickxm 04-10-2014 01:28 AM

The thread's title is indeed outdated.
I will end up with:

newer:
kernel-headers 3.12.16
glibc-2.19
file-5.17
gmp-6.0.0a
libmpc-1.0.2
oprofile-0.9.9

only rebuild:
mpfr-3.1.2
binutils-2.23.52.0.1
gcc-4.8.2
zlib-1.2.8
popt-1.6

Next step is the base:
I will build it like this:
Code:

R attr-2.4.46
R acl 2.2.51
R sed-4.2.2
R bzip2-1.0.6
U pkg-config-0.28
R ncurses-5.9
R shadow-4.1.5
R libtermcap-1.2.3
R/U procps-3.2.8(-ng-3.3.9) with newest psmisc-20.22
R libcap-2.22
U coreutils-8.22
R m4-1.4.17
R flex-2.5.37
U bison-3.0.2
U grep-2.17
U readline-6.3
U bash-4.3
R libtool-2.4.2
U gdbm-1.11
R net-tools-1.60.20120726git altough this might be replaced by inetutils
U perl-5.18.2
R autoconf-2.69
U automake-1.14.1
R diffutils-3.3
R gawk-4.1.0
R findutils
U gettext-0.18.3
R xz-5.0.5
R less-451
R gzip-1.6
U kbd-2.0.1
U kmod-16
U make-4.0
R patch-2.7
R sysklogd-1.5
R sysvinit-2.88dsf
U tar-1.27.1
U texinfo-5.2
U readline-6.3
R bc-1.06.95
R/U man-1.6g(-db-2.6.6)
U man-pages-3.63
R db48-4.8.30
R expat-2.1.0
R openssl-1.0.1f and openssl-solibs
R libpng-1.4.12
U freetype-2.5.3
U fuse-2.9.3
R libelf-0.8.13
R libffi-3.0.13
U python-2.7.6
R gamin-0.1.11
U glib2-2.40.0
R gamin again
R udev-182
U util-linux-2.24
R udev
R groff-1.22.2
U e2fsprogs-1.42.9
U mdadm-3.3
R lvm2-2.02.100
R grub-2.00
R libmnl-1.0.3
R libnetfilter_conntrack-1.0.4
R libnl3-3.2.21
U libusb-1.0.18
U libpcap-1.5.3
U iptables-1.4.27
U iproute2-3.12.0
R nano-2.3.2
R sysvinit-functions and salix 14.1 scripts. The scripts are built with SLKBUILD.
R kinitrd-1.4.8
R sudo
U wget-1.15

@tuxbg, could you provide me your slackbuilds for texinfo-5 and readline-6. Did you try make-4? Any difficulties you ran into with those?
What version of libtermcap are you using? It's a very old package and altering some Makefiles for the programs that depends on it by using ncurses version could make it no longer needed.

hendrickxm 04-10-2014 04:48 AM

I removed the --without-termcap line in the ncurses buildscript.
Then:
Code:

cd /usr/lib64
ln -s libncurses.so.5 libtermcap.so.2

Now there is no need for libtermcap. Procps can be build and probably other packages that need the library like bash and xterm as well. I will continue.

I just finished bash.
Did you upgrade gdbm? I use PhantomX's buildscript at the moment. But I am going to edit the official one instead.

EDIT:
When I finished readline, needed to symlink the libreadline.so.6 to s0.5 for bash.
Code:

cd /usr/lib64
ln -s libreadline.so.6 libreadline.so.5

Tried bash-4.3 but my cpu was constantly at max freq, so rebuild bash-4.2 instead.
Might try this one again much later.

Updates I did so far after the toolchain:
pkg-config-0.28
psmisc-22.21 with old procps-3.2.8
libcap-2.24
coreutils-8.22
flex-2.5.37
bison-3.0.2
grep-2.18
readline-6.3

Now my weekend starts, I will go cycle the cobbles of Roubaix tomorrow and the cobbles and hills of Flanders saturday. I will continue saturday evening.

tuxbg 04-10-2014 11:57 AM

I use original SLackBuild for texinfo and apply This patch

hendrickxm 04-10-2014 12:32 PM

Thanks, I continued through until gettext-0.18.3.2 as well.
I am thinking about kbd-2.01 or 1.5.X version. Same thing with make-4.0 or 3.82. What did you use?


All times are GMT -5. The time now is 09:31 AM.