We need to port and upgrade an existing gpc application from 32 to 64 bit Linux. (If you fly anywhere within/to/from North America your flight is indirectly affected - airport delays, etc. - by this application.) Naturally 64 bit gpc is our first choice for this task.
However when I compile the simplest possible "hello world" on RHEL 5.4 (a fedora variant) I always get the following assembler errors:
Error: suffix or operands invalid for "push" Error: suffix or operands invalid for "pop"
Does anyone know what is causing these errors - and/or a fix for them?
Background:
The development system does NOT have gcc installed (since gcc cannot be installed on the machines that will be running our application). On the dev system I installed the 2002 gpc BINARY (the "gpc-2.1-with-gcc.i686-pc-linux-gnu.tar.gz" file) from the gnu-pascal.de/binary/ web page. I also tried the 20070904 Linux binary downloaded from brandeis.edu and got exactly the same results.
Both downloads are i686 versions. Will these versions work on x68_64 Linux variants? If not what version of GPC should I be using for XEON based systems? 32-bit i586? Or - and as the very, very last resort - should I install gcc 3.4.6 and, heaven help me, attempt to compile GPC from source code?
For more details (including results from "gpc -v") see my original post of 2008-10-12 entitled "RE: hello world causes Linux assembler errors".
Thanks.
John Morton NavCanada Technical Services Centre 280 Hunt Club Road, Ottawa, Ont, Canada K1V 1C1 (613) 248-7184, mortonj@navcanada.ca
On 24 Aug 2010, at 17:47, Morton, John wrote:
However when I compile the simplest possible "hello world" on RHEL 5.4 (a fedora variant) I always get the following assembler errors:
Error: suffix or operands invalid for "push" Error: suffix or operands invalid for "pop"
Does anyone know what is causing these errors - and/or a fix for them?
This means that GPC is generating 32 bit code, but that it is being assembled as 32 bit code. Try passing the "-m32" parameter to gp/gpc, and if that does not work, try -Wa,-m32. Note that you may have to install 32 bit versions of all dev packages (including libc-dev) that you need, unless those are installed by default.
Background:
The development system does NOT have gcc installed (since gcc cannot be installed on the machines that will be running our application).
I don't understand this condition. They presumably won't have GPC installed either, but only your application. Why does it matter what is installed on the machine that compiles the application?
On the dev system I installed the 2002 gpc BINARY (the "gpc-2.1-with-gcc.i686-pc-linux-gnu.tar.gz" file) from the gnu-pascal.de/binary/ web page. I also tried the 20070904 Linux binary downloaded from brandeis.edu and got exactly the same results.
Both downloads are i686 versions. Will these versions work on x68_64 Linux variants?
Yes, x86-64 Linux systems in general (and RHEL in particular) can perfectly run 32 bit applications.
Jonas
On 24 Aug 2010, at 18:00, Jonas Maebe wrote:
On 24 Aug 2010, at 17:47, Morton, John wrote:
However when I compile the simplest possible "hello world" on RHEL 5.4 (a fedora variant) I always get the following assembler errors:
Error: suffix or operands invalid for "push" Error: suffix or operands invalid for "pop"
Does anyone know what is causing these errors - and/or a fix for them?
This means that GPC is generating 32 bit code, but that it is being assembled as 32 bit code.
... as *64* bit code
Jonas
We run into a similar problem
Compilers are not allowed on production servers where I work. To ensure identical configurations dev machines don't have them either.
However the libraries are often needed for operation.
If I understand him correctly Jonas what he is saying is the dev machines are really staging machines. True development occurs on developers workstations. Its the "Java Development" methodology.... Actual compilation occurs on the developers workstation.,, not on the dev servers.
Always amazes me we spend over 100 grand on machines that aren't used to develop.. just test...
No wonder IBM loves java }:O)
----- Original Message ---- From: Jonas Maebe jonas.maebe@elis.ugent.be To: GNU Pascal mailing list gpc@gnu.de Sent: Tue, August 24, 2010 11:00:52 AM Subject: Re: GPC Assembler errors - help needed
On 24 Aug 2010, at 17:47, Morton, John wrote:
However when I compile the simplest possible "hello world" on RHEL 5.4 (a fedora variant) I always get the following assembler errors:
Error: suffix or operands invalid for "push" Error: suffix or operands invalid for "pop"
Does anyone know what is causing these errors - and/or a fix for them?
This means that GPC is generating 32 bit code, but that it is being assembled as 32 bit code. Try passing the "-m32" parameter to gp/gpc, and if that does not work, try -Wa,-m32. Note that you may have to install 32 bit versions of all dev packages (including libc-dev) that you need, unless those are installed by default.
Background:
The development system does NOT have gcc installed (since gcc cannot be installed on the machines that will be running our application).
I don't understand this condition. They presumably won't have GPC installed either, but only your application. Why does it matter what is installed on the machine that compiles the application?
On the dev system I installed the 2002 gpc BINARY (the "gpc-2.1-with-gcc.i686-pc-linux-gnu.tar.gz" file) from the gnu-pascal.de/binary/ web page. I also tried the 20070904 Linux binary downloaded from brandeis.edu and got exactly the same results.
Both downloads are i686 versions. Will these versions work on x68_64 Linux variants?
Yes, x86-64 Linux systems in general (and RHEL in particular) can perfectly run 32 bit applications.
Jonas