Joachim Durchholz
2008-Mar-24 14:16 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
(Apologies if this appears twice, it seems to not have made it into the list. I added an update for SVN trunk.) Just a quick heads-up for 2.2 and SVN trunk: ./configure in the llvm package will work on my amd64 machine with this command line: ./configure --prefix=$HOME --enable-optimized \ --build=i686-pc-linux-gnu CC=gcc-4.2 CXX=g++-4.2 Note that the CC and CXX flags are set on the command line, not as environment variables - trying to submit them via the environment got me all kinds of breakage. Also not that this needs to set just --build, not --host (which defaults to the setting of --build) nor --target (which defaults to whatever value --host ends up as). Now the ./configure in llvm-gcc4.2 will choke badly on such a command line. First, it misinterprets the CC= and CXX= strings as target architecture names, and continues to complain that it cannot configure for multiple architectures at once. Second, it does not default --host or --target to --build. Third, even with --target and --host explicitly set to i686-pc-linux-gnu, the assembler will be fed with 64-bit code. The failing command is /home/jo/llvm-gcc-wrk/gcc/xgcc -B/home/jo/llvm-gcc-wrk/gcc/ -B/home/jo/i686-pc-linux-gnu/bin/ -B/home/jo/i686-pc-linux-gnu/lib/ -isystem /home/jo/i686-pc-linux-gnu/include -isystem /home/jo/i686-pc-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I/home/jo/llvm-gcc-src/gcc -I/home/jo/llvm-gcc-src/gcc/. -I/home/jo/llvm-gcc-src/gcc/../include -I/home/jo/llvm-gcc-src/gcc/../libcpp/include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer -c /home/jo/llvm-gcc-src/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -o crtbeginT.o (slightly edited to leave out multiple blanks and line continuation backslashes). The error messages are just what I had seen earlier: /tmp/ccVjR8Qt.s: Assembler messages: /tmp/ccVjR8Qt.s:33: Error: suffix or operands invalid for `push' /tmp/ccVjR8Qt.s:43: Error: suffix or operands invalid for `call' /tmp/ccVjR8Qt.s:61: Error: suffix or operands invalid for `push' /tmp/ccVjR8Qt.s:71: Error: suffix or operands invalid for `call' It seems that the ./configure for llvm-gcc is doing some, er, seriously nonstandard things with autoconf... This is close to a showstopper for integrating an llvm-gcc bootstrap into the nightly tester. The llvm-gcc ./configure needs to be called very differently from the llvm ./configure, and keeping two sets of options is Not Worth The Trouble, at least IMHO. Regards, Jo P.S.: Don't worry, I'll use LLVM for my projects even if I don't manage to bootstrap it or run the nightly tester :-D
Daniel Berlin
2008-Mar-24 15:37 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
> > ./configure in the llvm package will work on my amd64 machine > with this command line: > > ./configure --prefix=$HOME --enable-optimized \ > --build=i686-pc-linux-gnu CC=gcc-4.2 CXX=g++-4.2 > > Note that the CC and CXX flags are set on the command line, not as > environment variables - trying to submit them via the environment got me > all kinds of breakage.Err, you should set them as env vars. Really.> > Also not that this needs to set just --build, not --host (which defaults > to the setting of --build) nor --target (which defaults to whatever > value --host ends up as). > > > Now the ./configure in llvm-gcc4.2 will choke badly on such a command line. > > First, it misinterprets the CC= and CXX= strings as target architecture > names, and continues to complain that it cannot configure for multiple > architectures at once.Which is why you should be setting them as env vars :)> > Second, it does not default --host or --target to --build.This is normal. Crappy, but normal.> > Third, even with --target and --host explicitly set to > i686-pc-linux-gnu, the assembler will be fed with 64-bit code. The > failing command is > > /home/jo/llvm-gcc-wrk/gcc/xgcc -B/home/jo/llvm-gcc-wrk/gcc/ > -B/home/jo/i686-pc-linux-gnu/bin/ -B/home/jo/i686-pc-linux-gnu/lib/ > -isystem /home/jo/i686-pc-linux-gnu/include > -isystem /home/jo/i686-pc-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall > -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes > -Wold-style-definition -isystem ./include -I. -I. > -I/home/jo/llvm-gcc-src/gcc -I/home/jo/llvm-gcc-src/gcc/. > -I/home/jo/llvm-gcc-src/gcc/../include > -I/home/jo/llvm-gcc-src/gcc/../libcpp/include -g0 > -finhibit-size-directive -fno-inline-functions -fno-exceptions > -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer > -c /home/jo/llvm-gcc-src/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O > -o crtbeginT.o > > (slightly edited to leave out multiple blanks and line continuation > backslashes). > > The error messages are just what I had seen earlier: > > /tmp/ccVjR8Qt.s: Assembler messages: > /tmp/ccVjR8Qt.s:33: Error: suffix or operands invalid for `push' > /tmp/ccVjR8Qt.s:43: Error: suffix or operands invalid for `call' > /tmp/ccVjR8Qt.s:61: Error: suffix or operands invalid for `push' > /tmp/ccVjR8Qt.s:71: Error: suffix or operands invalid for `call' >This is interesting, and I wonder if it appears in gcc itself. If so, it is a bug.
Joachim Durchholz
2008-Mar-24 18:41 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
Am Montag, den 24.03.2008, 11:37 -0400 schrieb Daniel Berlin:> > > > ./configure in the llvm package will work on my amd64 machine > > with this command line: > > > > ./configure --prefix=$HOME --enable-optimized \ > > --build=i686-pc-linux-gnu CC=gcc-4.2 CXX=g++-4.2 > > > > Note that the CC and CXX flags are set on the command line, not as > > environment variables - trying to submit them via the environment got me > > all kinds of breakage. > > Err, you should set them as env vars. > Really.Hm. For some reason, ld kept searching the wrong (64-bit) library paths when trying to link the 32-bit results. I just retried and now everything is fine. Mystifying. Ah well. Probably my first experiments had some stry env var set that shouldn't have been, derailing the build machinery.> > Also not that this needs to set just --build, not --host (which defaults > > to the setting of --build) nor --target (which defaults to whatever > > value --host ends up as). > > > > > > Now the ./configure in llvm-gcc4.2 will choke badly on such a command line. > > > > First, it misinterprets the CC= and CXX= strings as target architecture > > names, and continues to complain that it cannot configure for multiple > > architectures at once. > Which is why you should be setting them as env vars :) > > > > > Second, it does not default --host or --target to --build. > > This is normal. > Crappy, but normal.According to the autoconf docs, this should be everything but normal! In fact it works for llvm. It's just llvm-gcc that fails to do that right. (Checked with the config.logs of both runs.) My best guess is that something is wrong in the .ac file for llvm-gcc, and the llvm .ac file got it right. Regards, Jo
Joachim Durchholz
2008-Mar-24 18:47 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
Am Montag, den 24.03.2008, 11:37 -0400 schrieb Daniel Berlin:> > > > Third, even with --target and --host explicitly set to > > i686-pc-linux-gnu, the assembler will be fed with 64-bit code. The > > failing command is > > > > /home/jo/llvm-gcc-wrk/gcc/xgcc -B/home/jo/llvm-gcc-wrk/gcc/ > > -B/home/jo/i686-pc-linux-gnu/bin/ -B/home/jo/i686-pc-linux-gnu/lib/ > > -isystem /home/jo/i686-pc-linux-gnu/include > > -isystem /home/jo/i686-pc-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall > > -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes > > -Wold-style-definition -isystem ./include -I. -I. > > -I/home/jo/llvm-gcc-src/gcc -I/home/jo/llvm-gcc-src/gcc/. > > -I/home/jo/llvm-gcc-src/gcc/../include > > -I/home/jo/llvm-gcc-src/gcc/../libcpp/include -g0 > > -finhibit-size-directive -fno-inline-functions -fno-exceptions > > -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer > > -c /home/jo/llvm-gcc-src/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O > > -o crtbeginT.o > > > > (slightly edited to leave out multiple blanks and line continuation > > backslashes). > > > > The error messages are just what I had seen earlier: > > > > /tmp/ccVjR8Qt.s: Assembler messages: > > /tmp/ccVjR8Qt.s:33: Error: suffix or operands invalid for `push' > > /tmp/ccVjR8Qt.s:43: Error: suffix or operands invalid for `call' > > /tmp/ccVjR8Qt.s:61: Error: suffix or operands invalid for `push' > > /tmp/ccVjR8Qt.s:71: Error: suffix or operands invalid for `call' > > > > This is interesting, and I wonder if it appears in gcc itself. If so, > it is a bug.The problem persists even when submitting gcc-4.2 and g++-4.2 via environment variables per your suggestion. (The failing xgcc command has slightly different options, and the reported line numbers differ slightly, but that's all.) I don't know how to check whether it appears in gcc itself. I don't have an xgcc command installed other than via llvm. Regards, Jo
Tanya M. Lattner
2008-Mar-24 19:06 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
> This is close to a showstopper for integrating an llvm-gcc bootstrap > into the nightly tester. The llvm-gcc ./configure needs to be called > very differently from the llvm ./configure, and keeping two sets of > options is Not Worth The Trouble, at least IMHO.So you didn't like the suggestion of having the configure for llvm-gcc set via an environment variable? That avoids having to deal with this directly in the script. Or am I missing something? -Tanya> > > Regards, > Jo > > P.S.: Don't worry, I'll use LLVM for my projects even if I don't manage > to bootstrap it or run the nightly tester :-D > > _______________________________________________ > 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-24 19:16 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
Am Montag, den 24.03.2008, 12:06 -0700 schrieb Tanya M. Lattner:> > This is close to a showstopper for integrating an llvm-gcc bootstrap > > into the nightly tester. The llvm-gcc ./configure needs to be called > > very differently from the llvm ./configure, and keeping two sets of > > options is Not Worth The Trouble, at least IMHO. > > So you didn't like the suggestion of having the configure for llvm-gcc set > via an environment variable? That avoids having to deal with this directly > in the script. Or am I missing something?No, that was written under the assumption that passing in CC and CXX via env variables wouldn't work. Things work now, so that assumption is obviously wrong. I still don't like environment variables. They tend to remain in effect long after I forgot that I set them, creating all sorts of hassle. In fact I suspect I already fell prey to this, getting llvm to compile and check one day and nearly despairing when trying to reproduce that success on the next day. But, well, you use what you need to use to get the job done, so there :-) Regards, Jo
Anton Korobeynikov
2008-Mar-24 19:34 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
Hello, Joachim> Hm. For some reason, ld kept searching the wrong (64-bit) library paths > when trying to link the 32-bit results.Hrm. This looks like to be old story about 'lib vs lib32 vs lib64' directories in different distributions. Almost every of them patch gcc inside their packages to provide valid library paths. Look for example, here: http://gcc.gnu.org/ml/gcc-patches/2007-09/msg01991.html -- With best regards, Anton Korobeynikov. Faculty of Mathematics & Mechanics, Saint Petersburg State University.
Joachim Durchholz
2008-Mar-24 20:26 UTC
[LLVMdev] Potential breakage in llvm-gcc's ./configure
Am Montag, den 24.03.2008, 22:34 +0300 schrieb Anton Korobeynikov:> Hello, Joachim > > > Hm. For some reason, ld kept searching the wrong (64-bit) library paths > > when trying to link the 32-bit results. > Hrm. This looks like to be old story about 'lib vs lib32 vs lib64' > directories in different distributions. Almost every of them patch gcc > inside their packages to provide valid library paths.Right. However, I don't think that's the issue here. After all, it will work when CC and GCC are passed in via environment variables. Regards, Jo
Possibly Parallel Threads
- [LLVMdev] Potential breakage in llvm-gcc's ./configure
- [LLVMdev] Potential breakage in llvm-gcc's ./configure
- [LLVMdev] Compiling llvm-gcc on amd64 with 32 bits: assembler still carps
- [LLVMdev] Compiling llvm-gcc on amd64 with 32 bits: assembler still carps
- [LLVMdev] Compiling llvm-gcc on amd64 with 32 bits: assembler still carps