Error: suffix or operands invalid for '***'

Bug #172894 reported by __mario__ on 2007-11-29
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Low
Abdulaziz Ghuloum

Bug Description

Hi,

I ran into the following problem:

gcc -I/home/mdeilman/include -c -o ikarus-enter.o ikarus-enter.s
ikarus-enter.s: Assembler messages:
ikarus-enter.s:120: Error: suffix or operands invalid for `push'
ikarus-enter.s:122: Error: suffix or operands invalid for `push'
ikarus-enter.s:124: Error: suffix or operands invalid for `push'
ikarus-enter.s:126: Error: suffix or operands invalid for `push'
ikarus-enter.s:131: Error: suffix or operands invalid for `push'
ikarus-enter.s:136: Error: suffix or operands invalid for `call'
make[3]: *** [ikarus-enter.o] Error 1

System: Ubuntu 7.10 - 64 bit - Intel Core 2 Duo 2.13 Ghz.
uname-a: Linux isis 2.6.22-14-generic #1 SMP Sun Oct 14 21:45:15 GMT 2007 x86_64 GNU/Linux
gcc: gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

ikarus version: 0.0.2 and dev snapshot

Cheers

-- Mario

__mario__ (mario-deilmann) wrote :

binutils 2.18

__mario__ (mario-deilmann) wrote :

Hi,

sure this is the solution. Somehow I got the impression that ikarus would run in 64-bit mode on a 64-bit platform. Therefore I was surprised by the 32-bit assembler ;).

I will test tomorrow, in the meanwhile I switched to my 32-bit machine :).

Thanks

-- Mario

Michael D. Adams (mdmkolbe) wrote :

Maybe we could add something like the following to the assembly file:

#ifdef 64BIT
#error "Ikarus doesn't run in 64bit mode. For how to compile in 32 bit mode see http://..."
#endif

On Nov 29, 2007, at 4:17 PM, __mario__ wrote:

> Somehow I got the impression that ikarus
> would run in 64-bit mode on a 64-bit platform. Therefore I was
> surprised
> by the 32-bit assembler ;).

I wonder how you got that impression. The web page says:

     "Ikarus runs on the IA-32 (x86) architecture supporting SSE2
      extensions."

and the manual says:

     "Note: Ikarus runs in 32-bit mode only. To run it in 64-bit
      environments,you will have to obtain the 32-bit version of
      GMP, or compile it yourself after adding ABI=32 to its
      configuration options."

> I will test tomorrow, in the meanwhile I switched to my 32-bit machine

Let us know if there are any troubles.

Aziz,,,

Michael D. Adams (mdmkolbe) wrote :

Aziz, users never read the documentation. That's just something we have to live with and work around.

Abdulaziz Ghuloum (aghuloum) wrote :

On Nov 29, 2007, at 11:30 PM, Michael D. Adams wrote:

> Aziz, users never read the documentation. That's just something we
> have
> to live with and work around.

I was just wondering if *I* gave the impression that Ikarus was a 64-
bit system somewhere.

__mario__ (mario-deilmann) wrote :

Hey guys,

come on. I read

[...] This includes the Athlon 64, Sempron 64, and Turion 64 processors ...

so implying it could run on 64-bit is not so far off (without reading the docs). If you expect compatibility packages already be installed (which is not the default) you could also include Itanium as a supported platform ;) (there is also an x86 compatibilty package).

Anyhow it works now and I'm happy.

Thanks

-- Mario

Abdulaziz Ghuloum (aghuloum) wrote :

Will fix the web page to say that this is a 32-bit compiler even
though it requires a 64-bit capable processor :-)
Or maybe I should just port it to 64-bit and get it over with. Ahh,
not today.

Abdulaziz Ghuloum (aghuloum) wrote :

Fixed website by adding the following paragraph.

Note that Ikarus is a 32-bit system even on 64-bit architecutres. On 64-bit Mac OS X or Linux, special compatibility packages may need to be installed if they are not installed already. Refer to the user's guide for a detailed list of requirements and installation instructions.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Low
status: New → In Progress
Abdulaziz Ghuloum (aghuloum) wrote :

Michael,

How do you do 64bit test in the C preprocessor?
I thought there was a way of testing "sizeof(int*) == 8" in cpp but
now I'm not sure. Let me know if you have a reference handy, or not.

Michael D. Adams (mdmkolbe) wrote :

Ok, I'm still not sure I have an authoritative answer but here is what I have been able to dig up. You can check what things are defined by default with "cpp -dM /dev/null" and in 32 bit mode with "cpp -m32 -dM /dev/null". A diff of these two and grep for "64" turns up the following dandidates.

> #define __x86_64 1
> #define __amd64 1
> #define __LP64__ 1
> #define __x86_64__ 1
> #define __amd64__ 1
> #define _LP64 1

However, I am suspecting that maybe this is better handled as a ./configure check, for example if you add AC_CHECK_SIZEOF([void *]), then you will get a define SIZEOF_VOID_P that CPP can later check. Or, if the 64bit issue is not limited to this one source file, maybe ./configure should just fail if you aren't in 32bit mode. Based on http://sources.redhat.com/ml/gdb/2005-11/msg00180.html you could do something like the following.

# Sanity check; refuse to build in anything but 32-bit mode.
AC_CHECK_SIZEOF(void *)
AS_IF([test AS_VAR_GET(ac_cv_sizeof_void_p) != 4], [AC_MSG_ERROR([building with a non-32-bit compiler is not supported]]))

Or if you can't get that to work, you could fall back to:
AC_CHECK_SIZEOF(void *)
if test $ac_cv_sizeof_void_p != 4; then
  AC_MSG_ERROR([building a non-32-bit compiler is not supported])
fi

Abdulaziz Ghuloum (aghuloum) wrote :

Added sizeof(void*) check to configure.ac in revision 1164. Thank you all for your help.

Changed in ikarus:
status: In Progress → Fix Committed
Abdulaziz Ghuloum (aghuloum) wrote :

This bug report is about to be closed as the fix comitted
previously will be incorporated in the next 0.0.3 release of
Ikarus Scheme, scheduled for January 31, 2008. A release
candidate tarball is available for download from:
http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.3-rc1.tar.gz
Please do test it if you have the time and report any issues
you might encounter. Thank you very much for your support.
(Sorry for the duplicates; I'm updating every open bug.)

Changed in ikarus:
milestone: none → 0.0.3
Changed in ikarus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers