在运行 OS X 10.7 Lion 的 Mac 上从源代码编译 SDL
我已经从 libsdl 网站下载了 SDL 源 SDL-1.2.14.zip 并进入了 make 步骤。 当我 ./configure
时,我没有任何问题。然而,当我 make
时,它在编译过程中似乎走了很长一段路,并以以下输出结束:
/bin/sh ./libtool --mode=compile gcc -g -O2 -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/SDL_RLEaccel.c -o build/SDL_RLEaccel.lo
libtool: compile: gcc -g -O2 -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/SDL_RLEaccel.c -fno-common -DPIC -o build/.libs/SDL_RLEaccel.o
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:1168:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:1829:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:2566:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:2836:suffix or operands invalid for `movd'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:2934:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:3884:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:4433:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:4992:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:5207:suffix or operands invalid for `movd'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:5307:suffix or operands invalid for `movq'
make: *** [build/SDL_RLEaccel.lo] Error 1
我已经尝试了我能想到的一切,并做了我认为相当多的事情搜索这个主题,但找不到任何看起来密切相关的内容。
有人尝试为 Lion 编译 SDL 并成功吗?
I've downloaded the SDL source SDL-1.2.14.zip from the libsdl website and gotten to the make step.
When I ./configure
, I have no issues. However, when I make
, it gets what seems like a long way through the compilation process and dies with this output:
/bin/sh ./libtool --mode=compile gcc -g -O2 -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/SDL_RLEaccel.c -o build/SDL_RLEaccel.lo
libtool: compile: gcc -g -O2 -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/SDL_RLEaccel.c -fno-common -DPIC -o build/.libs/SDL_RLEaccel.o
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:1168:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:1829:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:2566:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:2836:suffix or operands invalid for `movd'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:2934:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:3884:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:4433:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:4992:suffix or operands invalid for `movq'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:5207:suffix or operands invalid for `movd'
/var/folders/l_/_b6srsss7sggnnclplzx59280000gn/T//ccG8MUwb.s:5307:suffix or operands invalid for `movq'
make: *** [build/SDL_RLEaccel.lo] Error 1
I've tried everything I could think of and done what I think is a fair amount of searching on this subject, but can't find anything that looks closely related.
Has anyone tried compiling SDL for Lion and succeeded?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试
./configure --disable- assembly
。Try
./configure --disable-assembly
.假设您不想因禁用所有程序集而降低性能,那么它实际上是一个一个更改字符以修复 LLVM 上的构建。
Assuming you don't want to take the performance hit of disabling all the assembly, it's actually a one character change to fix the build on LLVM.