LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Which GCC is the Best for Slackware 10.2? (https://www.linuxquestions.org/questions/slackware-14/which-gcc-is-the-best-for-slackware-10-2-a-480130/)

byte weaver 09-03-2006 07:28 PM

Which GCC is the Best for Slackware 10.2?
 
I'm wondering: Which is the best version of GCC to go with Slackware 10.2?

The version that comes with Slack 10.2 is 3.3.5.

I once successfully upgraded to GCC 4.0.3 and it worked fine, except that some apps wouldn't compile with GCC 4.x.

So, is 3.3.5 the best choice? Which compiles the most apps and is stable and bug-free enough even in the optimizer department?

masonm 09-03-2006 07:47 PM

Well, applying some basic logic along with knowing that PV strives to ensure a stable release, and the release was compiled with the version that ships with it, I'd say that the one that ships with the release would be the best one.

byte weaver 09-03-2006 08:16 PM

Is it possible to recompile the entire release? I wondered about that a couple of times.

I had Kernel 2.6.16 recompiled with GCC 4.0.3, and it seemed much faster somehow. When I compared the disassembly of one of my own programs, it showed that 4.0.3 generates much shorter, better code. When I wanted to compile the latest versions of KDE or GNOME, I had no luck, however; then I briefly migrated to SuSE Linux 10.1 to see Xgl/Compiz in action, and I noticed they had GCC 4.1.0. Weird!! But I'm back to Slackware 10.2 now, because it's my pair of shoes! :)

I'm using KDE instead of GNOME, because when I used XFCE and installed FRG from Linuxpackages, some things in XFCE stopped working, so with my new install, I decided to use only KDE for a while.

So you think I should not tamper with the system, and leave it just as it is?

Do any people here have experience with customizing their system with the latest and greatest stuff?

Is that even possible?

cathectic 09-04-2006 02:42 AM

If you don't want GCC 3.3, 10.2 has GCC 3.4 in testing/ (it's now the default compiler for -current and in turn, will be for 11.0)

Slackware sticks to GCC 3.x because it is tried and tested - there is nothing to stop you switching to GCC 4 if you are prepared to build it yourself.

And yes, it is quite possible to then rebuild the entire release from scratch if you really want to.

Quote:

when I used XFCE and installed FRG from Linuxpackages, some things in XFCE stopped working
Freerock, although not as intrusive as other Gnome's, does still replace some Slackware packages with its own versions. I would imagine that some of these replaced libraries XFCE depends upon, hence why it is likely breaking.

Zmyrgel 09-04-2006 02:53 AM

The new gentoo uses GCC 4.1.0 as default option so it should be relatively safe to use it to compile KDE. Atleast I just compiled it with no problems :)

byte weaver 09-04-2006 04:05 AM

Thanks, you two! :)

I'll give GCC 4.1.0 a try; perhaps it's more compatible to the 3.x version than 4.0.3. :)

masonm 09-04-2006 07:25 AM

Well, that is the whole idea behind Linux as well as Slackware. It's your system so do what you want with it.

aspartat 09-04-2006 02:25 PM

It would be nice if you can post your results. And if possible a description how you compiled gcc-4.X for Slackware, maybe I can (with help from others) write a slackbuild-file.

regards Thorsten

byte weaver 09-04-2006 06:14 PM

OK, so here goes:
1. Download the full "gcc-4.1.1" source package from gcc.gnu.org (ca. 38 MB).
2. As a normal user (not root), enter the untarred directory (e.g. "gcc-4.1.1")
3. Run the command:
Code:

configure --prefix=/usr
4. Run make:
Code:

make
5. After a couple of hours ;) -- after make is done, become root, enter the directory, and type
Code:

make install
6. Et voila! ;)

I just compiled a bunch of stuff with 4.1.1, and things are looking very good indeed!! My kernel 2.6.16 compiled with 4.1.1 runs about 5-10 times faster than the old version that was compiled with 3.3.5 (subjective impression).

I built the dependencies for KDE 3.5.4 (from linuxpackages.net) and installed everything, and now I'm running KDE 3.5.4! :) (btw, I have to tell the maintainer of that package that is package list is incomplete).

The reason for me to upgrade to GCC 4.1.1 was that compiling "liboil" caused a GCC 3.3.5 crash with internal compiler error while compiling optimized SSE2 code. With GCC 4.1.1, no problem!! :)

MannyNix 09-04-2006 10:15 PM

Quote:

Originally Posted by aspartat
It would be nice if you can post your results. And if possible a description how you compiled gcc-4.X for Slackware, maybe I can (with help from others) write a slackbuild-file.

Oh that'd be really great, i'm saving a 4gb partition to trash and experiment, i'll try it for sure

I also upgraded my gentoo to gcc-4.1.1 and i'm done with it, i had to recompile every single package, working fine, no noticeable improvement in anything. I'll replace it with crux soon.

Can't beat Slackware to get out of the way and let you experiment, do whatever you want, trash it all, reinstall in 20 min and keep on having fun :)

akus 09-05-2006 05:30 AM

Quote:

Originally Posted by byte weaver
OK, so here goes:
My kernel 2.6.16 compiled with 4.1.1 runs about 5-10 times faster than the old version that was compiled with 3.3.5 (subjective impression).

Just curious!

How du you measure the speed of your running kernel?
And 5-10 times - isn't it too much, even for subjective impression? :)

byte weaver 09-05-2006 06:32 AM

Like, for instance, the NVidia driver installer took a couple of minutes before, and a couple of seconds afterwards (going thru the same stages). :)
Or the kernel boots more quickly, ReiserFS accesses the hard drive much faster, and during mounting, I hear a noise that sounds like WAV file from the hard drive! ;)
Not so before that, everything was much slower.

I have a Pentium 4 processor with hyperthreading. Perhaps using the GCC 4.1.1 had some benefits in that regard.

jong357 09-05-2006 08:30 AM

Quote:

Originally Posted by aspartat
It would be nice if you can post your results. And if possible a description how you compiled gcc-4.X for Slackware, maybe I can (with help from others) write a slackbuild-file.

regards Thorsten

Here's my build script if anyone is interested. I don't agree with dicing packages up so it's monolithic unlike Pat's. If you build for i486 make sure you change the fomit sed. I use /usr/lib for libexecdir, don't employ TARGET/HOST, hate docs and don't compress info.. ;-) All in all, it's diff than the official slackbuild. With some minor tweaking, it can be slackware standardized.

Code:

#!/bin/sh
#
# $CFLAGS are set globaly in /etc/bashrc

CWD=`pwd`
TMP=/tmp
PKGNAME=gcc
PKG=$TMP/package-$PKGNAME
VERSION=4.1.1
PKGVER=${VERSION}
ARCH=i686
BUILD=1

rm -rf $PKG
mkdir -p $PKG/install

cd $TMP
echo
echo "$PKGNAME-$VERSION source is now extracting..."
rm -rf $PKGNAME-$VERSION
rm -rf $PKGNAME-build
tar xjf $CWD/$PKGNAME-$VERSION.tar.bz2
mkdir $PKGNAME-build
cd $PKGNAME-$VERSION
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 {} \;
# Use libiberty.a from Binutils:
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
# Prevent the fixincludes script from running & delete debug ref
sed -i.bak \
        -e 's,\./fixinc\.sh,-c true,' \
        -e '/^LIBGCC2_DEBUG/d' gcc/Makefile.in
# Add `-fomit-frame-pointer' for x86
[[ $VERSION == 4.* && $ARCH == i686 ]] && \
        sed -i.bak2 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
# Increase the timeouts on 2 libmudflap tests to avoid spurious failures
[[ $VERSION == 4.* ]] && \
        sed -i.bak '/dg-timeout/s/3\|10/20/' libmudflap/testsuite/libmudflap.cth/*.c

cd ../$PKGNAME-build
  ../$PKGNAME-$VERSION/configure --prefix=/usr \
        --libexecdir=/usr/lib \
        --enable-shared \
        --enable-languages=c,c++ \
        --enable-clocale=gnu \
        --enable-threads=posix \
        --enable-__cxa_atexit

# See if we should bootstrap or not:
if gcc -dumpversion | grep $VERSION 2>/dev/null 1>/dev/null ;then
  make LDFLAGS="-s"
else
  make LDFLAGS="-s" bootstrap
fi

# Ask the user if they want to run the test suite:
echo
echo "Compilation of $PKGNAME-$VERSION is now done. You might want"
echo "to take the time to review the above output and make sure"
echo "it completed with no errors..."
echo
echo "The GCC test suite is very comprehensive and is almost guaranteed"
echo "to generate a few failures. It also takes quite some time to run..."
echo
echo "Do you wish to test the results? ([y], [n])"
if [ ! "$RESP" ]; then
  read RESP;
  echo
fi
if [ "$RESP" = "y" ]; then
  echo "O.k... Probably not a bad idea..."
  echo
  runtest=yes
  sleep 2
  make -k check
fi
if [ "$RESP" = "n" ]; then
    echo "Skipping tests..."
    echo
    sleep 2
fi

make install DESTDIR=$PKG
chmod 755 $PKG/usr/lib/libgcc_s.so.1
( cd $PKG
    mkdir -p lib
    cd lib
    ln -svf ../usr/bin/cpp cpp
    cd ../usr/bin
    ln -svf gcc cc )

# Fix info dir
if test $PKGNAME = texinfo; then
  true
else
  rm $PKG/usr/info/dir
fi

# Compress and strip
( cd $PKG/usr/man
    gzip -9 */*
    cd man1
    ln -svf g++.1.gz c++.1.gz
    ln -svf gcc.1.gz cc.1.gz )
# Should be redundant because of LDFLAGS
( cd $PKG
    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
    find $PKG -name "*.a" | xargs file | grep "archive" | cut -f 1 -d : | xargs strip -g )

# Make the package description:
cat << EOF > $PKG/install/slack-desc
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.

  |-----handy-ruler----------------------------------------------------------|
gcc: gcc (GCC with C support)
gcc:
gcc: GCC is the GNU Compiler Collection.
gcc:
gcc: This package contains those parts of the compiler collection needed
gcc: to compile C code.
gcc:
gcc:
gcc:
gcc:
gcc:
EOF

# Build the package:
cd $PKG
makepkg -l y -c n $TMP/$PKGNAME-$PKGVER-$ARCH-$BUILD.tgz

if [ "$runtest" = "yes" ]; then
  echo "Here are the test results for GCC-$VERSION"
  echo
  echo
  echo "******************************************************************"
  echo "* !!!!!!!!!!!!!!!  BEGINNING OF TEST SUMMARY  !!!!!!!!!!!!!!!!!! *"
  echo "******************************************************************"
  echo
  echo "If this is the only thing you see, then your missing"
  echo "some packages that were needed in order to run the test"
  echo "suite. Tcl, Expect and DejaGNU must be installed first..."
  echo
  cd $TMP/$PKGNAME-build
  ../$PKGNAME-$VERSION/contrib/test_summary
  # For just the brief summaries:
  #../$PKGNAME-$VERSION/contrib/test_summary | grep -A7 Summ
  echo
  echo "******************************************************************"
  echo "* !!!!!!!!!!!!!!!    END OF TEST SUMMARY    !!!!!!!!!!!!!!!!!! *"
  echo "******************************************************************"
  echo
  echo "Package creation complete..."
  echo
fi


MannyNix 09-05-2006 09:44 PM

Quote:

Originally Posted by jong357
Here's my build script if anyone is interested.

Wow, thanks! I'm also very interested in a DIY-Slackware, any advice/link/comment/pm and specially howto are very welcome :study:

jong357 09-06-2006 02:53 PM

Well... Lot's of time is the first thing you'll need..

http://www.diy-linux.org/x86-reference-build/

There's the base that I follow. Much, much better way to bootstrap a system than LFS IMO. After your done with the toolchain, install pkgtools.

http://jaguarlinux.com/pub/DIY/

The pkgtools in 'base' is version 11.0 with the xorg stuff removed and "slack-desc" changed to "desc" via patch, but vanilla otherwise. Once you finish the base system, you'll need to scour Pat's FTP site for the bootscripts. I personally use SysVinit cause I think they look purty... Really, I guess the only reason why I call it DIYSlackware is because of pkgtool... :scratch: I do use the network scripts from Slack tho. They are just modified to display evaluate_retval from rc.

Actually... Give me a day or so and I'll upload all my crap to that site all orderly with instructions as well. If people want to use it verbatum then cool, if not, it's a decent something to look at just to see what's possible.

I have some neat Xorg-7.1 scripts that some of you may be aware that I was working on a couple weeks ago. I'll throw them up there as well. They work a charm on slack and my DIY system.

Here is a preliminary README that I'll upload with all my scripts.
Code:

There are alot of personal prefrences in these build scripts that
you may want to change. Grub, base, etc, network to name a few.
Remember to read each build script before running for your
package. "grep -R Jaguar ." in the base directory too. I name my
OS "Jaguar" and there are a few refrences to it. Remove/change them.
Might also want to grep for lowercase "jaguar"...

Look at the pkgtools patch. You might want to add for the title,
"DIY pkgtools" or something, instead of just "pkgtools". You get
the idea. Customize the little things to make it more personal.

The ARCH variable is set to "powerpc" because I build this on
my powerbook. Do a global sed to change them for what arch you are
building for. I suggest using "i686". I do if/then checks on the
ARCH and they are only setup to handle "i686" or "powerpc".. Just
a word of warning.

Here is a command that might work to use from within your "base" source directory:

find . -type f -name *.build | xargs sed -i 's@ARCH=powerpc@ARCH=i686@g'

I'm almost positive that SHOULD only change the ARCH variable at the top
of each script. :-)

while your at it, do this:

chown -R root.root *
chmod -R 644 *

You could just run all these scripts as is and not worry about things,
but you'd be running the same exact thing I am. If your interested in
building your own UNIQUE OS, then you probably don't want that.

In a nut shell, this is a DIY/LFS build optimized for an {i686,powerpc} arch, using
SysVinit bootscripts but with Slackware's rc.inet{1,2},rc.wireless scripts,
modified to display SysVinit style. rc.wireless.conf and rc.inet1.conf are
located in /etc/sysconfig without the "rc" prefix. There's not a lot similar
to Slackware except for the package manager I suppose. That and the network aspect.

Build it how you want. You could make an exact clone of Slackware but just
optimize for an i686 arch. I don't see a point in doing that but it's your
call. This is how I choose to build it.

I've removed the glibc/gcc/binutils/kernel source to reduce the download size.
Go grab them yourself. I also like to stick with
gcc-3.4.6
glibc-2.3.6
binutils-2.16.1

I've tried other combinations and they work, for the most part, but you'll
most certainly run into problems with a "bleeding edge" build the further
you progress. Stick with the stable versions. Just my 2 cents. Other than
that, you can check for updated versions on everything else. I did have
problems with lzo-2 and expat-2.x... Stick with the 1.x versions.

The Linux-Libc-Headers project is now dead but with the release of
linux-2.6.18 or maybe 2.6.19 we can get sanitized headers straight
from the tarball!!! :-) with "make headers_install". Sweet.


Build order:
============

Toolchain:

Follow DIY but add file and mktemp at the end. tcl,expect,dejagnu too.


    Make (Pass 1)
    Sed (Pass 1)
    Binutils (Pass 1)
    GCC (Pass 1)
    Linux-Libc-Headers
    Glibc
    GCC (Pass 2)
    Binutils (Pass 2)
    Gawk
    Coreutils
    Bzip2
    Gzip
    Diffutils
    Findutils
    Make (Pass 2)
    Grep
    Sed (Pass 2)
    Gettext
    Ncurses
    Patch
    Tar
    Texinfo
    Bash
    M4
    Bison
    Flex
    Util-Linux
    Perl
    File
    Tcl
    Expect
    DejaGnu
    Mktemp (in pkgtools dir)


Begin Base Build:

Keep your eye out for any anomolies with the listed build order
(first 3 packages). I haven't refined this yet in my documentation
and I seem to remember having some problems last time around (first
couple packages). Nothing that I couldn't realize what was happening
and then fix.

Make sure you are also following the steps at DIY Linux. Performing
the system mounts and what not before starting. Also, /etc/config.site
is unecessary. We don't want man, info and docs to go to /usr/share.
The "base" package is set up to give us a Slackware style hirearchy...

Also make sure all the docs/info/man are getting to /usr and not
/usr/share. Doesn't matter I guess since we have symlinks setup in
/usr/share. I also don't gzip the info pages. I'm also a big HATER
of doc's. I remove pretty much all doc's from all packages with a
couple exceptions.

This whole thing takes alot of time and attention to what's happening
with the packages if your the anal type. My build scripts most certainly
could use some tweaking here and there.

===================

    Pkgtools (manually extract, follow echoed directions)
    Pkgtools (pass 2) (install with installpkg)

everything SHOULD be good to go with pkgtools now. Make sure
'desc's' are showing up and pkgtool is working correctly.
Remember to rebuild pkgtools after you delete your toolchain.

    Base (make sure you run /dev/MAKEDEV)
    Etc (rename /etc/{bashrc,profile})
    Linux-Libc-Headers (might want the inotify patch from LFS) (not included)
    Man-Pages
    Glibc
    GCC
    Binutils
    db
    Coreutils
    Zlib
    Debianutils
    Findutils
    Gawk
    Ncurses
    Readline
    Vim
    M4
    Bison
    Less
    Groff
    Sed
    Flex
    Gettext
    Network
    Procps
    Perl
    Texinfo
    Autoconf
    Automake
    Bash
    File
    Grep
    Libtool
    Bzip2
    Diffutils
    Kbd
    E2fsprogs
    Grub-0.97 (x86) or Yaboot-1.3.13 (ppc)
    Gzip
    Man
    Make
    Module-Init-Tools
    Patch
    Psmisc
    Shadow
    Sysklogd
    Sysvinit
    Tar
    Udev
    Util-Linux
    Linux Kernel
    Reiserfsprogs
    Xfsprogs
    mac-fdisk (ppc)
    hfsutils * (ppc) (can use tcl/tk/X if you want to rebuild later)
    Rename /etc/{bashrc,profile} back to original
    run "pwconv" and "grpconv" then
    SET THE ROOT PASSWORD & CONFIG FSTAB, YABOOT.CONF OR MENU.LST


Boot into new System:
=====================

You can take off in any direction you want but this is usually how
I work it. The quicker you can get a GUI the better off you'll be.
Build Eterm early, right after X infact. It's not listed (along with
it's deps). A terminal with scrollback capability is a great boon. This
order, after squaring away some of the "final" packages in "base", heads
directly towards getting firefox on the system. I'm crippled using links.

This is setup for Xorg-7.1 but you can still use 6.9 if
you wish... I don't like the font situation on Xorg-7.1... Not sure
if my setup is in error or that's the way it's supposed to be.

wget (1st pass)
pkgconfig
libpng
freetype2
expat
fontconfig
xorg-proto
xorg-utils
xorg-lib
libdrm
mesa
xorg-data (1st pass)
xorg-apps (1st pass)
xorg-data (final)
xorg-fonts
xorg-apps (final)
xorg-server
xorg-drivers
xorg-docs (man pages included?)(optional)(no build script yet)
links (1st pass)
perl (final)
gpm
ncurses (final)
tcl
tk
expect
dejagnu
hfsutils (final)
tcpwrappers
network (final) (newer versions of dhcpcd are quirky IMO)
openssl
wget (final)
libjpeg
libtiff
libgif
glib1
gtk1
glib2
cairo
pango
atk
gtk2
popt
links (final)
python
samba
vim (final)
nss
zip/unzip
libidl
firefox


Penguin of Wonder 09-06-2006 03:04 PM

Quote:

Originally Posted by byte weaver
Do any people here have experience with customizing their system with the latest and greatest stuff?

Is that even possible?

Sounds like somebody wishes thier distro was source based. :tisk: Your a bad slacker ;)

MannyNix 09-06-2006 05:12 PM

Thanks jong357, i really apreciate your help, no pressure on uploading your files, do it when you can, take your time. I got a crappy website at http://members.freewebs.com/ at least it's free :)
Thanks for sharing your custom work/knowledge, it seems an original and fun way to enjoy our fav distro and learning at the same time

MannyNix 09-06-2006 05:29 PM

Quote:

Originally Posted by Penguin of Wonder
Sounds like somebody wishes thier distro was source based. :tisk: Your a bad slacker ;)

heh, you're kidding right? or trolling (no offense) but i don't see how wanting to customize their system with "the latest and greatest stuff" means they have to run a source based distro :scratch:
and btw, some ports in gentoo are kinda old, so they are not the latest (as an example)
Quote:

Gentoo tends to be lag a bit behind in what they consider "stable", so its a good idea to first add..
from amarok website
well... nevermind, who cares anyway :)

jong357 09-06-2006 05:57 PM

I've uploaded just the scripts for "base". I'm uploading a scripts/source tarball in a few minutes. That site only allows 25MB uploads, so I'll have to segment it..

You can get as bleeding edge as you want. I've updated the README on the previous page concerning this. I don't think it's a good idea to go hard core with gcc/glibc/binutils... Other than that. you can build the latest versions of everything pretty much...

I've removed the source from:

kernel
glibc
binutils
gcc

Sorry for hijacking the thread too. :-) I asumed the OP got his/her answer already.

MannyNix 09-07-2006 03:22 AM

Quote:

Originally Posted by jong357
Sorry for hijacking the thread too. :-) I asumed the OP got his/her answer already.

I'm sorry too, but i also agree about the answer.

jong357, thanks so much for taking the time to upload your work and share your skills, i've been curious about it since i saw your profile about a DIY-Slacky.
Now that you've been kind enough to fulfill my request i feel overwhelmed about how much work it is, how much time it takes and mostly how little i know! :p
As you say, it needs some time but i'll definitely give it a try.
Got all the files, thanks again!
You guys should check again http://www.4shared.com/dir/722630/9c4d1565/sharing.html
It's full of goodies! :jawa:

ps. Just wiped out FreeBSD to try Crux some of you may like it

Penguin of Wonder 09-07-2006 11:57 PM

Quote:

Originally Posted by mannyslack
heh, you're kidding right? or trolling (no offense) but i don't see how wanting to customize their system with "the latest and greatest stuff" means they have to run a source based distro :scratch:
and btw, some ports in gentoo are kinda old, so they are not the latest (as an example) from amarok website
well... nevermind, who cares anyway :)

No, I was joking. Trolling pisses me off, so I always try to keep things in good humor. As far as Gentoo goes I never suggested you try Gentoo, though it is source based. There are others out there too.

I will have to apoligize though, upon second glance I realized I have quoted the wrong part of your message, which is probably where you came up with most of your responce (which had me confused till now). Its late so I'll skip quoting you again but you mentioned compiling your whole system after upgrading GCC, thats where I got what I said. The latest and greatest part had nothing to do with my comment.

Just as a p.s. though, I've noticed after hanging around Gentoo for a time, that most Gentoo-ers actually keep thier systems fairly far from the latest and greatest. They tend upgrade what they want and forget the rest exists, commands like "emerge --update --newuse --deep world" are the kind you hear people bragging about never running. (Which I can't blame them, it has a tendency to break your system if It's been a while)

byte weaver 09-09-2006 03:21 AM

Quote:

Originally Posted by mannyslack
heh, you're kidding right? or trolling (no offense) but i don't see how wanting to customize their system with "the latest and greatest stuff" means they have to run a source based distro :scratch:

I had no clue that Slackware was a binary-only distro, and that it's considered "trolling" if you'd like to keep your system up-to-date.

Frankly, after 2 years of Linux, I got fed up with the whole thing, especially the attitude that some Linux folk have towards users. Like, in this here thread, I expected to get serious answers on which GCC to use to have the least trouble. Now I learn that I'm not supposed to do that, along with the allegation that I'm a troll. Nice!

Recently, I deleted Slackware and installed FreeBSD instead, to try a different type of Unix. At least the BSD community seems more friendly, so I'll give it a go.

jong357 09-09-2006 09:43 AM

Oh.... Come on guys... This is getting a little out of hand... No one really insulted anyone... Peguin of Wonder apologized and mannyslack was defending you. He was implying that POW was a troll, not you. I think you've misunderstood entirely.

And ALL distro's are SOURCE BASED. These binary packages just don't automagically appear out of thin air. In order to make a binary package, you compile from source. You can update Slackware in anyway you see fit. Once it hit's your box, it's your distro.

And you'll get attitudes from any NIX forum be it BSD or Linux. Actually, Some BSD'ers tend to have a superority complex IMO when it comes to Linux and it's users. You can't escape it no matter where you go...

To answer your question directly, you can use whatever version of GCC you want. The only strike against using the latest is that your going to have to start patching some source code eventually. There have been alot of API changes in general with GCC-4.x... I like to give developers atleast a year to play catch up before I start using a new MAJ version compiler. If you don't mind patching, then by all means, use gcc-4.1.1.... I prefer 3.4.6 myself. It's a rock solid compiler.

If you are using glibc-2.4 then you will probably most defenately want to use gcc-4.1.x.... Take some of the new features for example in gcc-4.1.x... -fstack-protector and -D_FORTIFY_SOURCE=2.. Glibc-2.4 supports these new features whereas 2.3.6 has minimal to no support.

Southpaw76 09-09-2006 01:03 PM

I have to agreee with you Dr.Jong (heh,heh), no matter whether your using *BSD or Linux, you will always at some point run into people who seem to think "how dare you ask that question". However, after having used Gentoo, Slackware, and FreeBSD for quite some time I have to say that although FreeBSD is a rock solid distro, and it most definitely makes a great server, it isn't quite as ready for the desktop as Linux is...

On the other hand I kind of like the configuration process on a FreeBSD kernel as opposed to a Linux kernel sometimes. Lastly, so that this post is relevant to this thread, I have to agree with you on GCC versions. Although I haven't had extensive use with the GCC-4xx, and although most distro's including GNU themselves have marked GCC-4 stable, I've been pretty happy with with using GCC-3.4, whether it's FreeBSD, Gentoo, or Slackware :twocents:

byte weaver 09-09-2006 08:55 PM

GCC 4.1.1 definitely works much better than 4.0.3 for instance; much code that wouldn't compile with 4.0.3 compiles fine with 4.1.1. :)

Slackware is by far the easiest distro to handle; however, the whole dependency handling problems of Linux are still there. Package-based distros with built-in update mechanism like SuSE Linux don't work too well. SuSE could be great if its packages were actually tested; this is a great plus of Slackware; which just works out of the box. But when you run into problems on any Linux, things can get really complicated. And some packages on linuxpackages.net for Slackware aren't clean; the next time I use Slackware, I won't install any of the bigger ones, and instead compile them from source. There should be a system to install the whole dependency tree of an application (like with the ports system on FreeBSD), this could make things a lot easier.

After using FreeBSD now for a couple of days, I see that their package system is in principle well thought out (i.e. the ports system), but it can happen often that things aren't available on servers, versions have been updated without correcting the ports information, or that some security concern prevents the installation of an application. But the ports collection is huge, so many things do install fine.

FreeBSD interests me more architecture-wise, b/c it's not a Linux! ;)
Like, the driver system is very interesting: you just need to edit one file, and boom, you can load a different set of drivers at startup. My impression from Linux was that it's always necessary to make a custom kernel when you need a new driver. In FreeBSD, it's just editing a file. Some things like services are a little more complicated than on Linux.

So everything has its advantages and disadvantages, I guess.

But no matter which kind of these modern UNIXes you use, you always crash into problems left and right, and that's not good for users. My profession is software development, and not a single one of our customers would accept if we made only a single of the mistakes mentioned; that's because our company is small. Our company uses Windows, because it's much easier to use and maintain than any of these UNIXes. Thank god I know AIX and Solaris as well, and know that there are indeed UNIXes which come with no problems that cannot be overcome.

One of my previous employers used SuSE Linux always unpatched, because he feared to break it, but he failed to see that it just doesn't work right out of the box. Developing with broken compilers isn't fun ... ;)

(BTW, there I can mention right away that I had only problems with GCC 3.x, those just don't work; try enabling the optimizer for i686 on some code and these compilers crash)

But I'm optimistic that overall quality of the free systems will still grow, with time.

If I were to decide which OS to use in some company, they wouldn't have gotten past the evaluation stage.

(I say this only because I want free UNIXes for home users! So that the home user doesn't have to buy any of the cash cows, be it Windows or any other system like that; or just think about small businesses or low budget opportunities. This all must be tackled sometime; it's not good that the big industry is trying to take away power from the users and sparetime developers (just look at the TCPA efforts and what big corporations could do with it).)

dvpqew 11-14-2006 10:22 AM

install gcc-4.1.1 in gentoo ?
 
So greate.
I am currently install gentoo 2006.1 and trying to install gnome in my machine. But the installation always fails in emerge gcc-4.1.1, and report internal compiler error.
Inspired by this thread, can I first install gcc-4.1.1 in my gentoo kernel and then emerge gnome without encountering that error again? So I mean after I install gcc-4.1.1. in my machine, the emerge gnome will not compile gcc-4.1.1 and stops at gcc failure? Thanks for any advice.

BTW. My cpu is Athlon-xp 1800 (old one), is this processor supported by gcc-4.1.1?


Quote:

Originally Posted by byte weaver
OK, so here goes:
1. Download the full "gcc-4.1.1" source package from gcc.gnu.org (ca. 38 MB).
2. As a normal user (not root), enter the untarred directory (e.g. "gcc-4.1.1")
3. Run the command:
Code:

configure --prefix=/usr
4. Run make:
Code:

make
5. After a couple of hours ;) -- after make is done, become root, enter the directory, and type
Code:

make install
6. Et voila! ;)

I just compiled a bunch of stuff with 4.1.1, and things are looking very good indeed!! My kernel 2.6.16 compiled with 4.1.1 runs about 5-10 times faster than the old version that was compiled with 3.3.5 (subjective impression).

I built the dependencies for KDE 3.5.4 (from linuxpackages.net) and installed everything, and now I'm running KDE 3.5.4! :) (btw, I have to tell the maintainer of that package that is package list is incomplete).

The reason for me to upgrade to GCC 4.1.1 was that compiling "liboil" caused a GCC 3.3.5 crash with internal compiler error while compiling optimized SSE2 code. With GCC 4.1.1, no problem!! :)



All times are GMT -5. The time now is 12:32 AM.