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

Notices


Reply
  Search this Thread
Old 11-23-2012, 06:37 AM   #16
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled

Ok that is a new one.With full installation on hdd is the same problem.
Is the problem in Slackbuild or is just me
 
Old 11-23-2012, 07:41 AM   #17
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
It's just you.

The log files you show us only contain the errors at the end when the script tries to packages binaries which apparently were not compiled. You will find the real errors much earlier in the logfile.

Eric
 
Old 11-23-2012, 08:29 AM   #18
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled
But why the build won't compile on full installation?
 
Old 11-23-2012, 09:18 AM   #19
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
If you want answers, show us the real errors first.

Eric
 
Old 11-23-2012, 09:30 AM   #20
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled
Ok where to find this error's to show you dear Eric
And that is the reason for compiling gcc http://www.linuxfromscratch.org/lfs/...ent/index.html
Just for the experiment
And i read that http://www.gentoo.org/doc/en/gcc-optimization.xml
and this http://en.gentoo-wiki.com/wiki/Safe_...28Bulldozer.29

Last edited by tuxbg; 11-23-2012 at 09:36 AM.
 
Old 11-23-2012, 10:26 AM   #21
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled
I cant upload gcc.build.log because is 4.4 Mb but i found this - gcc.SlackBuild: line 448: cd: gcc: No such file or directory
 
Old 11-23-2012, 11:00 AM   #22
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled
I'm REALLY REALLY SORRY.The mistake was mine,because i edit slackbuild and put this --disable-bootstrap but the original slackbuild have this make $NUMJOBS bootstrap;,i just remove that line and gcc compiles perfectly
 
Old 05-05-2013, 06:00 AM   #23
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled
This thread is old but i have another problem with gcc-4.8.0.The problem is gcc-4.8.0 compile perfect but miss libgomp and all symbolic link to libgomp.
I recompile gcc with that configure options
Code:
  ../gcc-$VERSION/configure --prefix=/usr \
     --libdir=/usr/lib$LIBDIRSUFFIX \
     --mandir=/usr/man \
     --infodir=/usr/info \
     --enable-shared \
     --enable-bootstrap \
     --enable-languages=ada,c,c++,fortran,go,java,lto,objc \
     --enable-threads=posix \
     --enable-checking=release \
     --enable-objc-gc \
     --with-system-zlib \
     --with-python-dir=/lib$LIBDIRSUFFIX/python2.7/site-packages \
     --disable-libunwind-exceptions \
     --enable-__cxa_atexit \
     --enable-lto \
     --verbose \
     --enable-java-home \
     --with-java-home=/usr/lib$LIBDIRSUFFIX/jvm/jre \
     --with-jvm-root-dir=/usr/lib$LIBDIRSUFFIX/jvm \
     --with-jvm-jar-dir=/usr/lib$LIBDIRSUFFIX/jvm/jvm-exports \
     --with-arch-directory=$LIB_ARCH \
     --with-antlr-jar=$ANTLJAR \
     --enable-java-awt=gtk \
     --disable-gtktest \
     --disable-multilib \
     --disable-werror \
     --disable-nls \
     --enable-libgomp \
     --disable-libssp \
     --enable-plugin \
     --with-plugin-ld=ld.gold \
     --enable-gold \
     --enable-ld=default \
     --enable-linker-build-id \
     --disable-libstdcxx-pch \
     --enable-gnu-unique-object \
     --with-linker-hash-style=gnu \
     $GCC_ARCHOPTS \
     --target=${TARGET} \
     --build=${TARGET} \
     --host=${TARGET} || exit 1

Last edited by tuxbg; 05-05-2013 at 06:01 AM.
 
Old 05-06-2013, 08:32 PM   #24
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,524

Rep: Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493Reputation: 8493
With that many options changed compared with the build script in 14.0 or -current, I think you're probably on your own to figure this out.
 
Old 05-07-2013, 11:24 AM   #25
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by volkerdi View Post
With that many options changed compared with the build script in 14.0 or -current, I think you're probably on your own to figure this out.
I don't know where is the problem.When i compile it manually all works
 
Old 05-09-2013, 09:37 PM   #26
Ahau
Member
 
Registered: Jun 2011
Location: USA
Distribution: Porteus, Slackware
Posts: 58

Rep: Reputation: 19
Components within gcc can fail on errors without the slackbuild exiting - it will move on to the next component. Tee the slackbuild output to a log file: './gcc.SlackBuild 2>&1 | tee /tmp/gcc.buildlog'

After the build completes, check the log for errors:
'grep -nw Error /tmp/gcc.buildlog'

Sort through that and look for an error message, then you can open the log and go top that line to look back and try top make sense of what went wrong.

Good luck!
 
Old 05-11-2013, 05:10 AM   #27
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ahau View Post
Components within gcc can fail on errors without the slackbuild exiting - it will move on to the next component. Tee the slackbuild output to a log file: './gcc.SlackBuild 2>&1 | tee /tmp/gcc.buildlog'

After the build completes, check the log for errors:
'grep -nw Error /tmp/gcc.buildlog'

Sort through that and look for an error message, then you can open the log and go top that line to look back and try top make sense of what went wrong.

Good luck!
SlackBuild create a such log,and there is no errors in.But anyway,i edit SlackBuild to support only c and c++ and now gcc compiles perfect.But when i upgrade --reinstall gcc startx didnt work
 
Old 05-11-2013, 02:24 PM   #28
Ahau
Member
 
Registered: Jun 2011
Location: USA
Distribution: Porteus, Slackware
Posts: 58

Rep: Reputation: 19
IIRC, the log that is generated inside the gcc-$mcookie dir won't catch as much information as tee'ing the output as I described above, and since you mentioned it's working when you run make manually, you'll want to see the output from the Slackbuild itself, not just the make process.

How much RAM do you have, and how many processes are you running in parallel (make -j*)? I had ld errors on some of the gcc libs due to a shortage of RAM (compiling for ARM on a machine with 750MB available). You might want to try adding more swap if you compile again with the other language options.
 
Old 05-12-2013, 06:45 AM   #29
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ahau View Post
IIRC, the log that is generated inside the gcc-$mcookie dir won't catch as much information as tee'ing the output as I described above, and since you mentioned it's working when you run make manually, you'll want to see the output from the Slackbuild itself, not just the make process.

How much RAM do you have, and how many processes are you running in parallel (make -j*)? I had ld errors on some of the gcc libs due to a shortage of RAM (compiling for ARM on a machine with 750MB available). You might want to try adding more swap if you compile again with the other language options.
I have 8 gb ram and amd fx-4100 processor,i use make -j7 ,i'll try your tee and report back.This is the modified script that i create for gcc

Code:
#!/bin/bash

GMP_VERS=5.1.1
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.0
GCC_BUILD={GCC_BUILD:-2}


export ARCH=x86_64

NUMJOBS=${NUMJOBS:-" -j7 "}

CWD=$(pwd)
TMP=${TMP:-/home/tux/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}

if [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC -pipe  -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 -pipe  -march=native -mtune=native -flto -fuse-linker-plugin" \
../../gmp-$GMP_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --infodir=/usr/info \
  --with-gnu-ld \
  --enable-cxx \
  --build=$TARGET

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 ../gmp-$GMP_VERS-$ARCH-$GMP_BUILD.txz || exit 1
upgradepkg --reinstall  ../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" \
../../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=$TARGET

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 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 $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" \
../../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=$ARCH-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 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 $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
removepkg  /var/log/packages/libmpc-0.8.2-x86_64-2 || 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
zcat $CWD/pp.patch.gz | patch -p1 --verbose || exit 1

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" \
../../ppl-$PPL_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --with-gmp=$PKG1
  --enable-interfaces="c,cxx" \
  --build=$ARCH-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

# Compress and if needed symlink the man pages:
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 {} \;


cd $TMP/build/isl

CFLAGS="$SLKCFLAGS" \
../../isl-$ISL_VERS/configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --sysconfdir=/etc \
  --build=$ARCH-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

# Compress and if needed symlink the man pages:
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" \
../../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=$ARCH-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

# Compress and if needed symlink the man pages:
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
  # Restore target headers that were dropped (accidentally?) in gcc-4.8.0:
  zcat $CWD/gcc.target_h.diff.gz | patch -p1 --verbose || exit 1
  # Fix register clobber that was breaking WINE with -O2 optimization
  # (and probably affected other code as well):
  zcat $CWD/regcprop.fixo2.diff.gz | patch -p2 --verbose || exit 1
  #
  zcat $CWD/gcc-no_fixincludes.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
  # Fix perms/owners
  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="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
../../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=$PKG1 --with-mpfr=$PKG2 --with-mpc=$PKG3 \
      --with-ppl=$PKG4 --with-cloog=$PKG6 \
      --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=${TARGET} \
      --build=${TARGET} \
      --host=${TARGET} || exit 1

      make $NUMJOBS bootstrap ;
      make info
      # Set GCCCHECK=something to run the tests
if [ ! -z $GCCCHECK ]; then
   make $NUMJOBS check
fi

     make install DESTDIR=$PKG7

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

# Be sure the "specs" file is installed.
if [ ! -r $PKG7/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${GCC_VERS}/specs ]; then
  cat stage1-gcc/specs > $PKG7/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${GCC_VERS}/specs
fi

# Make our 64bit gcc look for 32bit gcc binaries in ./32 subdirectory:
if [ "$ARCH" = "x86_64" ]; then
  sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
    $PKG7/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${GCC_VERS}/specs
fi

make -i install-info DESTDIR=$PKG7

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

# Fix stuff up:
( cd $PKG7/usr/info ; rm dir ; gzip -9 * )
( cd $PKG7
  # *not* ${LIBDIRSUFFIX}
  mkdir -p lib
  cd lib
  ln -sf /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 ${TARGET}-gcc
  ln -sf gcc-$GCC_VERS ${TARGET}-gcc-$GCC_VERS
  ln -sf gcc-ar ${TARGET}-gcc-ar
  ln -sf gcc-nm ${TARGET}-gcc-nm
  ln -sf gcc-ranlib ${TARGET}-gcc-ranlib
  ln -sf g++-gcc-$GCC_VERS ${TARGET}-c++
  ln -sf g++-gcc-$GCC_VERS ${TARGET}-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
)  

## build the txz package
#(
#  cd $PKG1;
#  makepkg -l y -c n $TMP/gcc-$VERSION-$ARCH-$GCC_BUILD.txz
#)
# keep a log
) 2>&1 | tee $TMP/gcc.build.log

# 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/$TARGET/$GCC_VERS
  mv $PKG7/usr/libexec/gcc/$TARGET/$GCC_VERS/cc1plus usr/libexec/gcc/$TARGET/$GCC_VERS/cc1plus
  mkdir -p usr/man/man1
  mv $PKG7/usr/man/man1/*++* usr/man/man1
) || exit 1


# Filter all .la files (thanks much to Mark Post for the sed script):
( 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
)
## Strip bloated binaries and libraries:
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

rm -rf $PKG7/tmp || exit 1
rm -rf $PKG8/tmp || exit 1


( 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 )

echo
echo "Slackware GCC package build complete!"
echo

Last edited by tuxbg; 05-12-2013 at 07:30 AM.
 
  


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
Slackware64 multilib compile error Breeze Slackware 7 05-22-2011 02:56 AM
can't compile agave, gconfmm.h error on Slackware64 13.1 sycamorex Slackware 5 07-04-2010 05:43 PM
Compile error, 'H5G_obj_t' does not name a type, is gcc 4.3 incompatible with gcc 3 ? samrat_rao Linux - Software 5 03-03-2009 02:28 PM
gcc compile error? wampire Programming 3 05-06-2006 08:05 PM
gcc-2.3.2 compile error rimo Linux From Scratch 33 07-30-2003 07:55 AM

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

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

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