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? |
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.
|
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? |
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:
|
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 :)
|
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. :) |
Well, that is the whole idea behind Linux as well as Slackware. It's your system so do what you want with it.
|
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 |
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 Code:
make Code:
make install 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!! :) |
Quote:
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 :) |
Quote:
How du you measure the speed of your running kernel? And 5-10 times - isn't it too much, even for subjective impression? :) |
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. |
Quote:
Code:
#!/bin/sh |
Quote:
|
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 |
Quote:
|
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 |
Quote:
and btw, some ports in gentoo are kinda old, so they are not the latest (as an example) Quote:
well... nevermind, who cares anyway :) |
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. |
Quote:
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 |
Quote:
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) |
Quote:
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. |
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. |
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: |
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).) |
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:
|
All times are GMT -5. The time now is 12:32 AM. |