Re: alternatives for gcc
On 2011-02-02 03:01 +0100, Andrew Reid wrote: On Tuesday 01 February 2011 20:11:31 Joe Riel wrote: Why are there no alternatives, configurable with update-alternatives, for gcc? Seems like I should be able to configure whether /usr/bin/gcc is linked to gcc-4.3, gcc-4.4, etc. Of course I can just set the link manually (which I do), but ... See /usr/share/doc/gcc/README.Debian why gcc is not managed via alternatives. Can't you set up new alterantives within the update-alternatives mechanism? I have never done this, but it was one of the options I was considering a while ago to control which version of an app was the default -- as it turned out, I was able to use the stow mechanism to good effect, because it was a non-packaged app, so I only got as far as reading the update-alterantives documentation. The man-page says that the --install option sets up a new batch of alternatives. I don't know if this will interact constructively with the package manager. It will break very badly when you install/upgrade the gcc package which sets up the compiler links itself. Therefore, don't do that and use CC=gcc-4.3 when necessary. Sven -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/87pqraq287@turtle.gmx.de
Re: alternatives for gcc
Joe Riel wrote: update-alternatives --install as part of their postinstall routine. is not that bad idea -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/iibhol$ks8$2...@dough.gmane.org
Re: alternatives for gcc
On Wed, 02 Feb 2011 09:18:00 +0100 Sven Joachim svenj...@gmx.de wrote: On 2011-02-02 03:01 +0100, Andrew Reid wrote: On Tuesday 01 February 2011 20:11:31 Joe Riel wrote: Why are there no alternatives, configurable with update-alternatives, for gcc? Seems like I should be able to configure whether /usr/bin/gcc is linked to gcc-4.3, gcc-4.4, etc. Of course I can just set the link manually (which I do), but ... See /usr/share/doc/gcc/README.Debian why gcc is not managed via alternatives. Thanks for pointing me here. -- Joe Riel -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110202073203.2e563728@gauss
alternatives for gcc
Why are there no alternatives, configurable with update-alternatives, for gcc? Seems like I should be able to configure whether /usr/bin/gcc is linked to gcc-4.3, gcc-4.4, etc. Of course I can just set the link manually (which I do), but ... -- Joe Riel -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110201171131.491f2628@gauss
Re: alternatives for gcc
On Tuesday 01 February 2011 20:11:31 Joe Riel wrote: Why are there no alternatives, configurable with update-alternatives, for gcc? Seems like I should be able to configure whether /usr/bin/gcc is linked to gcc-4.3, gcc-4.4, etc. Of course I can just set the link manually (which I do), but ... Can't you set up new alterantives within the update-alternatives mechanism? I have never done this, but it was one of the options I was considering a while ago to control which version of an app was the default -- as it turned out, I was able to use the stow mechanism to good effect, because it was a non-packaged app, so I only got as far as reading the update-alterantives documentation. The man-page says that the --install option sets up a new batch of alternatives. I don't know if this will interact constructively with the package manager. -- A. -- Andrew Reid / rei...@bellatlantic.net -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201102012101.13639.rei...@bellatlantic.net
Re: alternatives for gcc
Joe Riel wrote: Why are there no alternatives, configurable with update-alternatives, for gcc? Seems like I should be able to configure whether /usr/bin/gcc is linked to gcc-4.3, gcc-4.4, etc. Of course I can just set the link manually (which I do), but ... every normal automake or cmake accepts the CC,CXX, CPP or equivalents to manage this. Especially in later releases of gcc this seems to be working very well, so I'm not sure if it's really necessary to do so. Let me know if you are able to update it with update-alternatives and how, because I've been asking myself how this could be setup as default in the past. regards -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/iiaq7i$6ck$1...@dough.gmane.org
Re: alternatives for gcc
On Tue, 01 Feb 2011 21:01:13 -0500 Andrew Reid rei...@bellatlantic.net wrote: On Tuesday 01 February 2011 20:11:31 Joe Riel wrote: Why are there no alternatives, configurable with update-alternatives, for gcc? Seems like I should be able to configure whether /usr/bin/gcc is linked to gcc-4.3, gcc-4.4, etc. Of course I can just set the link manually (which I do), but ... Can't you set up new alterantives within the update-alternatives mechanism? I have never done this, but it was one of the options I was considering a while ago to control which version of an app was the default -- as it turned out, I was able to use the stow mechanism to good effect, because it was a non-packaged app, so I only got as far as reading the update-alterantives documentation. The man-page says that the --install option sets up a new batch of alternatives. I don't know if this will interact constructively with the package manager. -- A. The following worked: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 60 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.3 50 Then, to configure 4.3 as the default, I did sudo update-alternatives --config gcc and selected 4.3. The packages that install gcc-4.3 and gcc-4.4 should possibly call update-alternatives --install as part of their postinstall routine. -- Joe Riel -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110201220515.1f365b41@gauss
Re: alternatives for gcc
On Wed, 02 Feb 2011 06:31:30 +0100 deloptes delop...@yahoo.com wrote: Joe Riel wrote: Why are there no alternatives, configurable with update-alternatives, for gcc? Seems like I should be able to configure whether /usr/bin/gcc is linked to gcc-4.3, gcc-4.4, etc. Of course I can just set the link manually (which I do), but ... every normal automake or cmake accepts the CC,CXX, CPP or equivalents to manage this. Especially in later releases of gcc this seems to be working very well, so I'm not sure if it's really necessary to do so. Let me know if you are able to update it with update-alternatives and how, because I've been asking myself how this could be setup as default in the past. The problem I ran into was that Matlab R2010b works with gcc 4.3 but not 4.4 and I didn't know how to configure Matlab to use 4.3. However, I now see that that can be solved by editing ~/.matlab/R2010b/mexopts.sh, changing CC=gcc to CC=gcc-4.3 So I didn't need the use the debian alternatives after all. But see my other response for how I did it. As you suggest, this is probably the typical case, which explains why alternatives are not used with gcc. -- Joe Riel -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110201221544.440805e1@gauss
Re: update-alternatives and gcc
On Sun, Jun 08, 2003 at 09:20:47PM -0700, Ross Boylan wrote: On Wed, Jun 04, 2003 at 11:24:40PM -0400, Joey Hess wrote: Yes, they were very carefully compiled with good old 2.95, until mid-may week, when they finally switched over to using 3.2. That raises a couple of more general issues. I thought the default compiler for the next release was 3.2. Will it in fact be 3.3? My testing system has moved to 3.3 with recent updates (actually very soon after it went to 3.2). Yes, it'll be 3.3. Are 3.3 and 3.2 binary compatible, particularly for C++? I know 3.2 was incompatible with previous versions for C++. I've looked at the gcc website, but I can't tell from there. I think they're more or less binary compatible; I've heard rumours of one or two wrinkles in the C++ ABI but don't know the details. Finally, Colin Watson wrote in some previous threads that the avoidance of update-alternatives for gcc was deliberate. Could he, or someone else, say a bit more about why? I don't see why setting gcc (and friend, I assume) up as a symlink is any different from using alternatives (which is just two symlinks). Well, I'm not a toolchain guru by any means, but: It's because some of the heaviest and pickiest users of gcc on Debian are the developers and build daemons themselves. It's important for those use cases to be able to guarantee some degree of consistency just by installing the current versions of gcc-defaults packages, particularly in cases like C++ where nasty ABI compatibility problems are involved, but also for example when code generation bugs are discovered on certain architectures. The build daemon administrators and individual developers working on those architectures aren't necessarily experts in all the issues affecting the toolchain; the people uploading the compiler are. Alternatives are notoriously flaky anyway; there are all kinds of complicated bugs open surrounding manual and auto mode and the times when it decides to use one or the other. There was great amusement in unstable a couple of years ago when perl was trying to use update-alternatives for different versions of itself, it broke, and suddenly you could no longer use update-alternatives to put it right because that program is written in Perl. In this case where consistency and the idea of a single clean and consistent compiler installation are important, I'm just as happy that we don't use them. Users can still do everything they want with diversions, and I think dpkg-divert is an underused tool anyway. And does the gcc toolchain know how to call the right version of related tools once you start it (e.g., linker, assembler)? The linker and assembler are part of binutils and so are on a different version scheme, but gcc does know how to call the right version of subprograms like cc1, yes. Cheers, -- Colin Watson [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: update-alternatives and gcc
On Wed, Jun 04, 2003 at 11:24:40PM -0400, Joey Hess wrote: Chris Caldwell wrote: Anyone know what the pre-packaged kernel-images are compiled with? I haven't used one beyond a base install in years. Yes, they were very carefully compiled with good old 2.95, until mid-may week, when they finally switched over to using 3.2. That raises a couple of more general issues. I thought the default compiler for the next release was 3.2. Will it in fact be 3.3? My testing system has moved to 3.3 with recent updates (actually very soon after it went to 3.2). Are 3.3 and 3.2 binary compatible, particularly for C++? I know 3.2 was incompatible with previous versions for C++. I've looked at the gcc website, but I can't tell from there. Finally, Colin Watson wrote in some previous threads that the avoidance of update-alternatives for gcc was deliberate. Could he, or someone else, say a bit more about why? I don't see why setting gcc (and friend, I assume) up as a symlink is any different from using alternatives (which is just two symlinks). And does the gcc toolchain know how to call the right version of related tools once you start it (e.g., linker, assembler)? Thanks. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]