Building jamvm 1.5.4 on OS X Lion

一曲冷凌霜 提交于 2019-12-24 02:41:04

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/9940503/building-jamvm-1-5-4-on-os-x-lion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!