You are not logged in.

#1 2006-01-29 03:49:36

Jacek Poplawski
Member
From: Poland
Registered: 2006-01-10
Posts: 736
Website

older version of gcc

I have gcc-4.0.3 installed.
Is there gcc-3.3.x or gcc-3.4.x in Arch?
How to install it with pacman?

Offline

#2 2006-01-29 04:04:02

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: older version of gcc

no, they arent available via pacman. What do you need them for?

You could take a look at the Arch CVS and, pull down their pkgbuilds though.

Offline

#3 2006-01-29 05:07:14

Jacek Poplawski
Member
From: Poland
Registered: 2006-01-10
Posts: 736
Website

Re: older version of gcc

I curious are my problems with OpenGL stability may be related to gcc4, so I want to recompile Mesa with gcc3.

Offline

#4 2006-01-29 05:23:46

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: older version of gcc

Jacek Poplawski wrote:

I curious are my problems with OpenGL stability may be related to gcc4, so I want to recompile Mesa with gcc3.

Chances are they arent caused by GCC4

Have you got an ATI card? thats why
Are you using Xorg7? probably isnt helping.

iphitus

Offline

#5 2006-02-03 18:01:43

cro
Member
From: Germany
Registered: 2006-01-02
Posts: 101

Re: older version of gcc

I would also welcome a gcc3.3 package. Sometimes you need an older gcc version for development purposes. In my case gcc3.3.

Offline

#6 2006-02-03 21:34:42

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: older version of gcc

Similar thread here.

Offline

#7 2006-02-03 23:20:43

bpisciot
Member
From: Flyover Land
Registered: 2004-12-16
Posts: 78

Re: older version of gcc

iphitus wrote:

no, they arent available via pacman. What do you need them for?

I, for one, would like to know how to move to an earlier version of GCC because of the following in the Alsa-driver PKGBUILD:

# NOTE: You need gcc 2.95 to build this package (gcc4 will not work).
#       The gcc2 package is found in the AUR (http://aur.archlinux.org).

Is it as simple as installing an earlier version, building a new Alsa-driver package and then reupgrading to the current GCC?

This is important to me because I don't want to screw up my Arch system--which is working beautifully.

Bob Pisciotta


"You're only young once, but you can always be immature."

Offline

#8 2006-02-04 00:59:37

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: older version of gcc

I hate to say it, but it simply will not work building the alsa-drive package with gcc 2.x.

Firstly, if the package says it needs 2, it must be a very dated package. 2.x is quite old now.

Secondly, as a RULE, a driver, these alsa drivers are drivers, MUST, be compiled with the same GCC version as the kernel. No exceptions. None. Nada. The Arch Kernel is compiled with GCC4, these drivers MUST be compiled with GCC4.

This is a rule, do not waste time trying to work around it.

And lastly, why dont you use the alsa drivers included in the kernel package? They should be more than up to date enough for your usage.

iphitus.

Offline

#9 2006-02-04 05:35:19

bpisciot
Member
From: Flyover Land
Registered: 2004-12-16
Posts: 78

Re: older version of gcc

Iphitus,

Thanks for the explanation.  I'm in uncharted territory when it comes to messing with GCC.

I do have a working alsa installation on my machine.  I use it with my laptop's built-in intel-8x0 sound card.  I want to rebuild an alsa driver to work with a fancy pcmcia Echo IndigoIO sound card I own.  It was my intent to tweak the alsa PKGBUILD to configure and install this card.  Now, I'm not so sure I want to try this.  At any rate, here's the PKGBUILD that I have in my /var/abs/multimedia/alsa-driver folder:

# $Id: PKGBUILD,v 1.52 2005/11/23 19:41:10 judd Exp $
# Maintainer: judd <jvinet@zeroflux.org>
pkgname=alsa-driver
pkgver=1.0.10
pkgrel=1
pkgdesc="An alternative implementation of Linux sound support"
url="http://www.alsa-project.org"
makedepends=('gcc2')
depends=('glibc')
source=(ftp://ftp.alsa-project.org/pub/driver/$pkgname-${pkgver}.tar.bz2)
md5sums=('e9e7c1ca664a14275d67185049f933f9')

# NOTE: You need gcc 2.95 to build this package (gcc4 will not work).
#       The gcc2 package is found in the AUR (http://aur.archlinux.org).

build() {
  cd $startdir/src/$pkgname-${pkgver}
  sed -i 's|/usr/bin/awk|/bin/awk|g' utils/convert_isapnp_ids
  export CC=/opt/gcc2/bin/gcc
  ./configure --prefix=/usr
  # make GCC 3.4 play nice
  #sed -i 's|-pipe|-pipe -fno-unit-at-a-time|g' Makefile.conf
  make || return 1
  make DESTDIR=$startdir/pkg install
  rm -rf $startdir/pkg/lib/modules/2.4*/modules.*

Can I use this PKGBUILD as is.  Or should I just drop it?

Thanks,

Bob Pisciotta


"You're only young once, but you can always be immature."

Offline

#10 2006-02-04 09:10:31

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: older version of gcc

The point with gcc2 to build alsa is because the alsa modules are meant to be used with kernel24, which doesn't compile with gcc4.

I don't know what the state of the latest 2.4 kernels with gcc4 is nowadays, but I'm thinking about getting gcc3.3 parallel installable in /usr like debian does with all those gcc versions.

Offline

#11 2006-02-04 12:31:31

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: older version of gcc

I thought Arch dropped support for 2.4 when we dropped devfs?

iphitus

Offline

#12 2006-02-04 12:36:42

Jacek Poplawski
Member
From: Poland
Registered: 2006-01-10
Posts: 736
Website

Re: older version of gcc

Back to topic... so there is no (easy) way to have multiple versions of gcc in Arch? Do I need to prepare all packages myself?

Offline

#13 2006-02-04 13:20:48

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: older version of gcc

Back to the topic, are you using kernel2.4? If not, then this package isnt relevant to you as it is for kernel 2.4.

Just grab the source from the alsa site and build it yourself if you need it so badly.

iphitus

Offline

#14 2006-02-04 13:39:36

Jacek Poplawski
Member
From: Poland
Registered: 2006-01-10
Posts: 736
Website

Re: older version of gcc

Back to topic... I use 2.6, but I need different compilers to test my software for example.

Offline

#15 2006-02-04 14:07:17

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: older version of gcc

i wouldnt bother testing with 2.x now though. Even the kernel has dropped support for it. As for 3.x theres plenty of threads here on how to set that up. Search.

iphitus

Offline

#16 2006-05-21 12:18:42

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: older version of gcc

So is the conclusion to all this that we can't have a gcc 3.x and a 4.x on a system at the same time?

I'm trying to get some source built that I know works fine in 3.x but fails in 4.x, on my gentoo box I have both and just switch a symlink of gcc to point at the one I need ta the time.

I'm trying the older abs PKGBUILD file to make a package and I'll see what happens once I've got it working.

Offline

#17 2006-05-21 15:13:29

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: older version of gcc

Look at the AUR, there are packages for both gcc2 and gcc3. The gcc2 one could be improved, but gcc3 is even in community.

Offline

#18 2006-05-22 04:13:28

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: older version of gcc

Fix the package not the distro imho

Offline

#19 2006-05-22 13:54:22

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: older version of gcc

iphitus wrote:

Fix the package not the distro imho

In case that is possible, yes. Look at the two popular examples kernel24 and qemu.
I am not sure what the kernel24 problem is, but fixing it is a huge task.
All existing fixes for qemu are hackish at best. While structural changes for making qemu compatible to gcc4 are in the works (google for qop), the best solution for the moment is using gcc3.

For most other pkgs I agree that fixing them is easy with little C/C++ knowledge. If you don't have that knowledge, you can google for a patch or find someone who helps you (for example in the "Making packages" forum).

Offline

#20 2006-05-22 16:00:47

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: older version of gcc

I'm new to Arch so hadn't looked at the AUR wiki stuff, once I started looking I found someone had fixed the package I've been trying to get working so I'm happy, no need for gcc 3.x anymore.

Offline

#21 2006-05-23 00:01:06

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: older version of gcc

brain0 wrote:
iphitus wrote:

Fix the package not the distro imho

In case that is possible, yes. Look at the two popular examples kernel24 and qemu.

use kernel26 tongue arch is dropping support for kernel24 in 0.8 anyway.

I am not sure what the kernel24 problem is, but fixing it is a huge task.
All existing fixes for qemu are hackish at best. While structural changes for making qemu compatible to gcc4 are in the works (google for qop), the best solution for the moment is using gcc3.

For most other pkgs I agree that fixing them is easy with little C/C++ knowledge. If you don't have that knowledge, you can google for a patch or find someone who helps you (for example in the "Making packages" forum).

i thought qemu CVS worked with GCC4...?

Offline

#22 2006-05-23 00:19:55

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: older version of gcc

iphitus wrote:

i thought qemu CVS worked with GCC4...?

Last time I tried it didn't. And I am pretty sure I tried it with 0.8.1 which didn't work either.

Offline

Board footer

Powered by FluxBB