* gcc multiple instances conflict [not found] <1063852459.26095.ezmlm@gcc.gnu.org> @ 2003-09-18 2:39 ` Vinod Joseph 2003-09-18 12:00 ` Eljay Love-Jensen 2003-09-18 12:08 ` Claudio Bley 0 siblings, 2 replies; 4+ messages in thread From: Vinod Joseph @ 2003-09-18 2:39 UTC (permalink / raw) To: gcc-help Hi I have installed gcc 2.95.3 on a redhat 9 which already had gcc 3.2.2. i want my application to be built and use make with gcc 2.95.3 ONLY Please can u guide me how to solve this problem. I have tried alias in bashrc but GNU make and g++ still used gcc 3.2.2 Thanks in advance for ur timely guidance Vinod __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gcc multiple instances conflict 2003-09-18 2:39 ` gcc multiple instances conflict Vinod Joseph @ 2003-09-18 12:00 ` Eljay Love-Jensen 2003-09-19 2:13 ` Vinod Joseph 2003-09-18 12:08 ` Claudio Bley 1 sibling, 1 reply; 4+ messages in thread From: Eljay Love-Jensen @ 2003-09-18 12:00 UTC (permalink / raw) To: Vinod Joseph, gcc-help Hi Vinod, You can put the location of GCC 2.95.3 first in your PATH variable. You can make sure that any makefiles haven't hard coded the path to GCC 3.2.2 in the file itself. One convention for makefiles is to use CPP for the preprocessor (gcc -E), CC for the C compiler (gcc), CXX for the C++ compiler (g++), LINK for the linker (gcc). So those are my first "usual suspects". You could hard code the path to GCC 2.95.3 in the make file itself. (Similar to previous.) Or pass in those settings to the make file explicitly, on the command line. Makefiles do not honor your bash alias settings, because a make script is a lot like a non-interactive shell with its own environment. The bash alias settings are not "inherited" in the make environment. HTH, --Eljay ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gcc multiple instances conflict 2003-09-18 12:00 ` Eljay Love-Jensen @ 2003-09-19 2:13 ` Vinod Joseph 0 siblings, 0 replies; 4+ messages in thread From: Vinod Joseph @ 2003-09-19 2:13 UTC (permalink / raw) To: Eljay Love-Jensen, gcc-help Dear Eljay/Phil/Claudio/Chris et all I have installed gcc 2.95.2 and have an installation problem... i guess it is the primary reason why the application make file compiles c++ programs with gcc 3.2.2 and returns errors... The application works only on gcc 2.95.2(3) gcc 2.95.2 is installed successfully when i give $make LANGUAGES=c but fails with the following errors on giving $make ( Note - failure is in g++ ) /home/vinod/gcc/gcc-2.95.2/gcc/xgcc -B/home/vinod/gcc/gcc-2.95.2/gcc/ -B/usr/local/i686-pc-linux-gnu/bin/ -c -g -O2 -fvtable-thunks -D_GNU_SOURCE -fno-implicit-templates -I. -I. -nostdinc++ -D_IO_MTSAFE_IO indstream.cc indstream.cc: In method `struct streampos indirectbuf::seekoff(long long int, ios::seek_dir, int = 3)': indstream.cc:82: `struct streampos' used where a `int' was expected indstream.cc:85: `struct streampos' used where a `int' was expected indstream.cc:87: `struct streampos' used where a `int' was expected indstream.cc:89: conversion from `int' to non-scalar type `streampos' requested indstream.cc: In method `struct streampos indirectbuf::seekpos(_G_fpos64_t, int = 3)': indstream.cc:99: `struct streampos' used where a `int' was expected indstream.cc:102: `struct streampos' used where a `int' was expected indstream.cc:104: `struct streampos' used where a `int' was expected indstream.cc:106: conversion from `int' to non-scalar type `streampos' requested make[1]: *** [indstream.o] Error 1 make[1]: Leaving directory `/home/vinod/gcc/gcc-2.95.2/i686-pc-linux-gnu/libio' make: *** [all-target-libio] Error 2 [root@vinod gcc-2.95.2]# Please advise me what to do. I am a newbie to this.... Thanks in advance..... Vinod --- Eljay Love-Jensen <eljay@adobe.com> wrote: > Hi Vinod, > > You can put the location of GCC 2.95.3 first in your > PATH variable. > > You can make sure that any makefiles haven't hard > coded the path to GCC 3.2.2 in the file itself. One > convention for makefiles is to use CPP for the > preprocessor (gcc -E), CC for the C compiler (gcc), > CXX for the C++ compiler (g++), LINK for the linker > (gcc). So those are my first "usual suspects". > > You could hard code the path to GCC 2.95.3 in the > make file itself. (Similar to previous.) Or pass > in those settings to the make file explicitly, on > the command line. > > Makefiles do not honor your bash alias settings, > because a make script is a lot like a > non-interactive shell with its own environment. The > bash alias settings are not "inherited" in the make > environment. > > HTH, > --Eljay > > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gcc multiple instances conflict 2003-09-18 2:39 ` gcc multiple instances conflict Vinod Joseph 2003-09-18 12:00 ` Eljay Love-Jensen @ 2003-09-18 12:08 ` Claudio Bley 1 sibling, 0 replies; 4+ messages in thread From: Claudio Bley @ 2003-09-18 12:08 UTC (permalink / raw) To: gcc-help On Wed, Sep 17, 2003 at 07:39:01PM -0700, Vinod Joseph wrote: > Hi Hi. > I have installed gcc 2.95.3 on a redhat 9 which > already had gcc 3.2.2. I don't know what your reasons are, but be aware that you can't link a C++ program compiled with gcc 2.95 to libraries compiled with 3.x. > i want my application to be built and use make with > gcc 2.95.3 ONLY > > Please can u guide me how to solve this problem. > > I have tried alias in bashrc but GNU make and g++ > still used gcc 3.2.2 Aliases are not expanded when the shell is not interactive. So, that won't work. If you installed gcc 2.95 into another location than gcc 3.2.2 (e.g. /usr/local/bin) you just need to add this directory before the directory where gcc 3.x is installed in the PATH variable: $ export PATH="/usr/local/bin:$PATH" Alternatively, you can specify which compiler make calls when setting the CC and CXX variables: $ make CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ Of course, that assumes that you used these variables in your Makefile rules (which virtually every Makefile does). g++ (3.2.2) always uses gcc 3.2.2. You can't change the behaviour of that command you just need to call the g++ which came with gcc 2.95. Read 'man bash' for more information. HTH -- Claudio Bley ASCII ribbon campaign (") Debian GNU/Linux user - against HTML email X http://www.cs.uni-magdeburg.de/~bley/ & vCards / \ ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-09-19 2:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1063852459.26095.ezmlm@gcc.gnu.org> 2003-09-18 2:39 ` gcc multiple instances conflict Vinod Joseph 2003-09-18 12:00 ` Eljay Love-Jensen 2003-09-19 2:13 ` Vinod Joseph 2003-09-18 12:08 ` Claudio Bley
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).