Shantonu Sen
2008-Mar-20 22:27 UTC
[LLVMdev] Just got bitten by accidentally using the wrong gcc
llvm's ./configure already does that for gcc < 3. What are valid versions? Exactly 4.0 and 4.2? 4.0 and >=4.2? dnl Verify that GCC is version 3.0 or higher if test "$GCC" = "yes" then AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3 #error Unsupported GCC version #endif ]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower version])]) fi Shantonu Sen ssen at apple.com Sent from my Mac Pro On Mar 20, 2008, at 3:14 PM, Eric Christopher wrote:> > On Mar 20, 2008, at 3:00 PM, Joachim Durchholz wrote: >> Hi all, >> >> I just forgot to ./configure with CC=gcc-4.2 CXX=g++-4.2, getting the >> (broken-for-LLVM) gcc-4.1 as a compiler. >> The error message that I got was this: >> make[1]: Entering directory `/home/jo/llvm-wrk/lib/VMCore' >> make[1]: *** No rule to make target >> `/home/jo/llvm-wrk/Release/bin/tblgen', needed by >> `/home/jo/llvm-wrk/lib/VMCore/Release/Intrinsics.gen.tmp'. Stop. >> make[1]: Leaving directory `/home/jo/llvm-wrk/lib/VMCore' >> make: *** [install] Error 1 >> >> It took me a while to figure out what went wrong. >> >> I guess I'm not the only one to stumble upon this problem. >> >> Would it be a good idea to make ./configure check whether there's an >> incompatible tool configured, and carp if it finds one? > > Probably be a good idea. It's reasonably easy to check major/minor > versions. > > -eric > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Joachim Durchholz
2008-Mar-20 22:43 UTC
[LLVMdev] Just got bitten by accidentally using the wrong gcc
Am Donnerstag, den 20.03.2008, 15:27 -0700 schrieb Shantonu Sen:> llvm's ./configure already does that for gcc < 3. > > What are valid versions? Exactly 4.0 and 4.2? 4.0 and >=4.2?There's a list at http://llvm.org/docs/GettingStarted.html#brokengcc so there is a reasonable basis. The list isn't comprehensive, of course, and will likely grow in the future. OTOH extending it as new problems come up should be easy to do.> dnl Verify that GCC is version 3.0 or higher > if test "$GCC" = "yes" > then > AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3 > #error Unsupported GCC version > #endif > ]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower > version])]) > fiIt might be simpler (and faster) to check the output of gcc -v. Extending the list to other tools would be easier, too. Anybody able to give model code for that? Regards, Jo
Duncan Sands
2008-Mar-21 08:16 UTC
[LLVMdev] Just got bitten by accidentally using the wrong gcc
Hi,> There's a list at http://llvm.org/docs/GettingStarted.html#brokengcc so > there is a reasonable basis. > The list isn't comprehensive, of course, and will likely grow in the > future. OTOH extending it as new problems come up should be easy to do.that list is not very reliable. For example it says that gcc-4.1 is problematic, but I never had any problems with it on ubuntu linux. So it's probably best to warn if a dubious tool is seen, rather than erroring out. Ciao, Duncan.
Shantonu Sen
2008-Mar-21 13:56 UTC
[LLVMdev] Just got bitten by accidentally using the wrong gcc
I recommend you don't parse version strings. In fact I switch the check to use AC_COMPILE precisely for the reason that gcc --version is totally unreliable and vendor specific. For example, what's the regular expression that tells you what the GCC version is: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5470) (Aspen 5470.3) Per the rest of this thread, you can't even be sure that gcc 4.x.y on one linux distribution is compile the same as on another. If there are test cases that you'd like to embed directly into the configure script that will crash the compiler, that's probably worth doing up front. For the "gcc miscompiles llvm" bugs, can we rely on anything other than the testsuite? Shantonu Sent from my MacBook On Mar 20, 2008, at 3:43 PM, Joachim Durchholz wrote:> > Am Donnerstag, den 20.03.2008, 15:27 -0700 schrieb Shantonu Sen: >> llvm's ./configure already does that for gcc < 3. >> >> What are valid versions? Exactly 4.0 and 4.2? 4.0 and >=4.2? > > There's a list at http://llvm.org/docs/GettingStarted.html#brokengcc > so > there is a reasonable basis. > The list isn't comprehensive, of course, and will likely grow in the > future. OTOH extending it as new problems come up should be easy to > do. > >> dnl Verify that GCC is version 3.0 or higher >> if test "$GCC" = "yes" >> then >> AC_COMPILE_IFELSE([[#if !defined(__GNUC__) || __GNUC__ < 3 >> #error Unsupported GCC version >> #endif >> ]], [], [AC_MSG_ERROR([gcc 3.x required, but you have a lower >> version])]) >> fi > > It might be simpler (and faster) to check the output of gcc -v. > Extending the list to other tools would be easier, too. > > Anybody able to give model code for that? > > Regards, > Jo > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Possibly Parallel Threads
- [LLVMdev] Just got bitten by accidentally using the wrong gcc
- [LLVMdev] Just got bitten by accidentally using the wrong gcc
- [LLVMdev] Just got bitten by accidentally using the wrong gcc
- [LLVMdev] Just got bitten by accidentally using the wrong gcc
- [LLVMdev] Just got bitten by accidentally using the wrong gcc