Re: distributing g++
On Friday 15 December 2006 22:30, Ferad Zyulkyarov wrote: Hi What are the standard practices with installing multiple versions of gcc on a system. I renamed this gcc to be gcc-4.1. However, it looks like it will still overwrite some files when I do 'make install'. Is this true? As far as I know, make install does not overwrite any files if there is not a previous version at the default installation path or the directory specified by the prefix switch. How do people put multiple version on the same machine? In my case, I just use different installation path with the --prefixe switch, i.e. /home/username/gcc-4.1, /home/username/gcc-4.2 ... Me too. Then I populate /usr/bin, /usr/lib with symlinks pointing to /whereever/gcc-N.M/bin/*, /whereever/gcc-N.M/lib/*.so* etc. Second, say I wanted to tar up a release of gcc that i've built for others to use. When the other user downloads and untars the file on there filesystem in an arbitrary point, I'm assumming it won't work because it's not in the --prefix=.. directory. I think it should work because the library paths are relative to the gcc, g++ executable. Doesn't work: renamed gcc-4.1.1 directory to gcc-4.1.1-, re-symlinked everyting as described above. gcc -v woks, but: 1.1 directory to # gcc t.c gcc: error trying to exec 'cc1': execvp: No such file or directory Is it possible to get around this? I would like a user to be able to untar it anywhere, and have it work just fine. If this is possible, please advise. Probably for the different target builds like linux and win it will not work.. What I mean is if you have gcc compiled to be hosted in linux it will not work under win and vice versa. For more details you can refer to the configuration documentation of gcc - http://gcc.gnu.org/install/configure.html. Hope it was useful, Ferad Zyulkyarov
Re: distributing g++
On Friday 15 December 2006 22:30, Ferad Zyulkyarov wrote: Hi What are the standard practices with installing multiple versions of gcc on a system. I renamed this gcc to be gcc-4.1. However, it looks like it will still overwrite some files when I do 'make install'. Is this true? As far as I know, make install does not overwrite any files if there is not a previous version at the default installation path or the directory specified by the prefix switch. How do people put multiple version on the same machine? In my case, I just use different installation path with the --prefixe switch, i.e. /home/username/gcc-4.1, /home/username/gcc-4.2 ... Me too. Then I populate /usr/bin, /usr/lib with symlinks pointing to /whereever/gcc-N.M/bin/*, /whereever/gcc-N.M/lib/*.so* etc. Second, say I wanted to tar up a release of gcc that i've built for others to use. When the other user downloads and untars the file on there filesystem in an arbitrary point, I'm assumming it won't work because it's not in the --prefix=.. directory. I think it should work because the library paths are relative to the gcc, g++ executable. Doesn't work: renamed gcc-4.1.1 directory to gcc-4.1.1-, re-symlinked everyting as described above. gcc -v works, but: # cat t.c int main() {} # gcc t.c gcc: error trying to exec 'cc1': execvp: No such file or directory Many other unix projects also suffer from this immovability. -- vda
distributing g++
Hi, I've compiled g++ for mingw with, ../gcc-4.1.1/configure --prefix=/home/bobbybrasko/g++/prefixdir --host=mingw32 \ --target=mingw32 --program-prefix= \ --program-suffix=-4.1 --with-gcc --with-gnu-ld --with-gnu-as --enable-threads --disable-nls \ --enable-languages=c,c++ --disable-win32-registry --disable-shared --without-x \ --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug Since i've used a prefix, I'm assumming gcc wants to be installed where I told it to be. I'm wondering 2 things. What are the standard practices with installing multiple versions of gcc on a system. I renamed this gcc to be gcc-4.1. However, it looks like it will still overwrite some files when I do 'make install'. Is this true? How do people put multiple version on the same machine? Second, say I wanted to tar up a release of gcc that i've built for others to use. When the other user downloads and untars the file on there filesystem in an arbitrary point, I'm assumming it won't work because it's not in the --prefix=.. directory. Is it possible to get around this? I would like a user to be able to untar it anywhere, and have it work just fine. If this is possible, please advise. Thanks, Bob Rossi
Re: distributing g++
Bob Rossi wrote: Since i've used a prefix, I'm assumming gcc wants to be installed where I told it to be. I'm wondering 2 things. It's not supposed to be that way. The toolchain is supposed to be relocatable for MinGW targets. I don't know if it currently is, but read the past threads on the topic first: http://gcc.gnu.org/ml/gcc/2006-04/threads.html#00227 http://gcc.gnu.org/ml/gcc/2006-04/threads.html#00441 Ranjit Mathew also has a web page somewhere describing what steps and/or patches are necessary to get a relocatable toolchain. But I think he does a crossed-native (canadian) build for speed reasons, so that may complicate the procedure. What are the standard practices with installing multiple versions of gcc on a system. I renamed this gcc to be gcc-4.1. However, it looks like it will still overwrite some files when I do 'make install'. Is this true? How do people put multiple version on the same machine? The standard way on *nix systems is by installing them to separate prefixes, or if using the same prefix, using --program-suffix (or variants like --program-transform-name) and possibly --enable-version-specific-runtime-libs. Second, say I wanted to tar up a release of gcc that i've built for others to use. When the other user downloads and untars the file on there filesystem in an arbitrary point, I'm assumming it won't work because it's not in the --prefix=.. directory. Is it possible to get around this? I would like a user to be able to untar it anywhere, and have it work just fine. If this is possible, please advise. Again, if built right the toolchain is supposed to be relocatable, that is it locates everything with relative paths to where the binaries are installed. You may have to configure it with the exact prefix --prefix=/mingw for this to work, I am not sure. And also note that configuring a --prefix of an emulated POSIX path to a native (MinGW) app will surely fail, you should use --prefix=`cd /home/bobbybrasko/g++/prefixdir pwd -W` instead if that is your goal. Brian
Re: distributing g++
Hi What are the standard practices with installing multiple versions of gcc on a system. I renamed this gcc to be gcc-4.1. However, it looks like it will still overwrite some files when I do 'make install'. Is this true? As far as I know, make install does not overwrite any files if there is not a previous version at the default installation path or the directory specified by the prefix switch. How do people put multiple version on the same machine? In my case, I just use different installation path with the --prefixe switch, i.e. /home/username/gcc-4.1, /home/username/gcc-4.2 ... Second, say I wanted to tar up a release of gcc that i've built for others to use. When the other user downloads and untars the file on there filesystem in an arbitrary point, I'm assumming it won't work because it's not in the --prefix=.. directory. I think it should work because the library paths are relative to the gcc, g++ executable. Is it possible to get around this? I would like a user to be able to untar it anywhere, and have it work just fine. If this is possible, please advise. Probably for the different target builds like linux and win it will not work.. What I mean is if you have gcc compiled to be hosted in linux it will not work under win and vice versa. For more details you can refer to the configuration documentation of gcc - http://gcc.gnu.org/install/configure.html. Hope it was useful, Ferad Zyulkyarov
Re: distributing g++
On Fri, Dec 15, 2006 at 12:35:23PM -0800, Brian Dessent wrote: Bob Rossi wrote: Since i've used a prefix, I'm assumming gcc wants to be installed where I told it to be. I'm wondering 2 things. It's not supposed to be that way. The toolchain is supposed to be relocatable for MinGW targets. I don't know if it currently is, but read the past threads on the topic first: http://gcc.gnu.org/ml/gcc/2006-04/threads.html#00227 http://gcc.gnu.org/ml/gcc/2006-04/threads.html#00441 Ranjit Mathew also has a web page somewhere describing what steps and/or patches are necessary to get a relocatable toolchain. But I think he does a crossed-native (canadian) build for speed reasons, so that may complicate the procedure. OK, I followed this tutorial I believe. http://rmathew.com/articles/gcj/bldgcj.html the section Building a Native Compiler. I ran this, #!/bin/sh tar -zxvf gcc-core-4.1.1.tar.gz tar -zxvf gcc-g++-4.1.1.tar.gz mkdir builddir cd builddir ../gcc-4.1.1/configure --prefix=/mingw --host=mingw32 \ --target=mingw32 --program-prefix= \ --program-suffix=-4.1 --with-gcc --with-gnu-ld --with-gnu-as --enable-threads --disable-nls \ --enable-languages=c,c++ --disable-win32-registry --disable-shared --without-x \ --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug \ 21 | tee configure-out.txt make bootstrap 21 | tee make-out.txt make DESTDIR=/home/bobbybrasko/g++-4.1-relocatable install $ ls /home/bobbybrasko/g++-4.1-relocatable mingw $ ls /home/bobbybrasko/g++-4.1-relocatable/mingw bin include info lib libexec man share Am I doing the correct thing here? Pretend this isn't mingw even, would this be the correct way to do this for native linux? Now, How would I tar this up so that it could be relocatable? Thanks, Bob Rossi