2

I have Xcode installed and the commandline tools are working. Macports fails to build jamvm 1.5.0 correctly so I'm trying to build the latest version (1.5.4) manually.

./configure doesn't complain about anything.

make fails with the following error:

Making all in src
make  all-recursive
Making all in os
Making all in darwin
Making all in i386
/bin/sh ../../../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../src  -I../../../../src   -g -O2 -MT init.lo -MD -MP -MF .deps/init.Tpo -c -o init.lo init.c
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I../../../../src -I../../../../src -g -O2 -MT init.lo -MD -MP -MF .deps/init.Tpo -c init.c  -fno-common -DPIC -o .libs/init.o
mv -f .deps/init.Tpo .deps/init.Plo
/bin/sh ../../../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../src  -I../../../../src   -g -O2 -MT dll_md.lo -MD -MP -MF .deps/dll_md.Tpo -c -o dll_md.lo dll_md.c
 gcc -DHAVE_CONFIG_H -I. -I../../../../src -I../../../../src -g -O2 -MT dll_md.lo -MD -MP -MF .deps/dll_md.Tpo -c dll_md.c  -fno-common -DPIC -o .libs/dll_md.o
/var/folders/32/hp4r3m7140q7_d3y4j9lw31m0000gn/T//ccG8KLc8.s:159:suffix or operands invalid for `sub'
/var/folders/32/hp4r3m7140q7_d3y4j9lw31m0000gn/T//ccG8KLc8.s:175:suffix or operands invalid for `push'
/var/folders/32/hp4r3m7140q7_d3y4j9lw31m0000gn/T//ccG8KLc8.s:187:suffix or operands invalid for `push'
/var/folders/32/hp4r3m7140q7_d3y4j9lw31m0000gn/T//ccG8KLc8.s:192:suffix or operands invalid for `push'
/var/folders/32/hp4r3m7140q7_d3y4j9lw31m0000gn/T//ccG8KLc8.s:264:suffix or operands invalid for `add'
make[5]: *** [dll_md.lo] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

How can I fix this?

NOTE: the Macports build fails with a different error.

Tomas Andrle
  • 13,132
  • 15
  • 75
  • 92
  • some googling suggests it's a 32/64 bit confusion in assembler. is there a configure flag to set 64bit (assuming that is what you have) or force 32bit compatibility? – andrew cooke Mar 30 '12 at 16:15

1 Answers1

3

As Andrew suggests this is a problem related to having 32 bit ASM instructions and trying to compile it as 64bit. The easy way out is to force GCC into 32 bit mode.

make clean
CFLAGS="-m32" ./configure

This makes compilation work and produces a working binary for me.

Squeaky
  • 31
  • 3