Thanks for the prompt reply Brian! I tried out what you suggested, and indeed a different assembler was being invoked when running through the make files. The reason why the problem was not being seen on the console is, the build machine's environment got modified, and I had an older console open. The moment I refreshed my console, I was seeing the same error on the console as well. I've since tracked down the erring entry in the environment, and fixed it. Many thanks for pointing me in the right direction! Prasad On 6/5/07, Brian Dessent <brian@xxxxxxxxxxx> wrote:
Prasad Athawale wrote: > gcc -fPIC -g -Wall -m64 -I../../include/internal -I. -I../../include > -c -osample.o sample.c > /tmp/ccqkJFT6.s: Assembler messages: > /tmp/ccqkJFT6.s:28: Error: suffix or operands invalid for `push' > /tmp/ccqkJFT6.s:30: Error: suffix or operands invalid for `movq' > /tmp/ccqkJFT6.s:34: Error: `-8(%rbp)' is not a valid 32 bit base/index > expression As the error message indicates, these are from the assembler (as) which is a separate program that is invoked by (but not a part of) gcc. And it appears that it's a version of gas that wasn't built with 64 bit support. > If I do each of the steps manually - with the exact same commands on > the command line, the library gets built fine, and the file command > indeed indicates it's a valid 64-bit library. If you are indeed invoking the exact same commands as the Makefile but getting different results, then it could be an environmental difference. For example, perhaps PATH or some other variable is set differently in the Makefile, resulting in a different/older version of the assembler being called. You could add -v to both the failing and the succeeding commands, and you will explicitly see the invocation of the various sub-processes: cc1, as, collect2, etc. This should tell you if the same assembler is being called in both cases, or if there is some other difference in 'as' invocation between the failing and suceeding. Brian