在Mountain Lion上安装Pygame时出错 [英] Error when Installing Pygame on Mountain Lion

查看:121
本文介绍了在Mountain Lion上安装Pygame时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图让Pygame在Mac OS X Mountain Lion上运行,但在安装它时遇到了问题.我已经使用自制软件安装了以下软件包:

I've been trying to get Pygame running on Mac OS X Mountain Lion and have had problems installing it. I have installed the following packages using homebrew:

  • sdl
  • sdl_image
  • sdl_mixer
  • sdl_ttf
  • smpeg

,并且在尝试编译Pygame时(使用Xcode 4.4提供的最新Mac OS X命令行工具)时,我收到一条错误消息,指出以下内容:

and when trying to compile Pygame (using the latest Mac OS X command line tools provided with Xcode 4.4) I get an error message stating the following:

src/scale_mmx64.c:499:27:错误:无效的指令助记符'movsxl'

src/scale_mmx64.c:499:27: error: invalid instruction mnemonic 'movsxl'

,我不知道如何解决此问题. Pygame在Mac OS X Lion上运行良好,这似乎是由于升级到最新版本的Xcode(已将GCC从系统中删除)或升级到Mountain Lion本身引起的.我怀疑升级到Xcode是负责任的,但我不确定.

and I have no idea how to solve this issue. Pygame worked perfectly on Mac OS X Lion and this seems to have been caused either by the upgrade to the latest version of Xcode (which has removed GCC from the system) or the upgrade to Mountain Lion itself. I suspect the upgrade to Xcode is responsible but I am not sure.

有人对解决此问题有任何建议吗?

Does anyone have any suggestions for fixing this issue at all?

推荐答案

我在同一件事上把头撞在墙上.我仍然很生气,我正在考虑在MacBook Air上安装Linux,但是我们会看到的.

I was beating my head against the wall on the same thing. I'm still so irritated that I'm thinking about installing Linux on my MacBook Air, but we'll see.

在对此处列出的源代码进行修改之后,我从源代码构建了它: https://bitbucket.org/pygame/pygame/changeset/e296ada67fad

I built it from source, after making the modification to source listed here: https://bitbucket.org/pygame/pygame/changeset/e296ada67fad

基本上,在src/scale_mmx64.c中,您需要用'movslq'替换两次出现的'movsxl'

Basically, in src/scale_mmx64.c you need to replace the two occurrences of 'movsxl' with 'movslq'

如果您使用自制软件,请确保已将root设置为首先引用您的自制库等.当我有机会再次进行修改时,仍在修复该问题. (不使用SDL_image并在加载PNG时令人窒息)

If you're using homebrew, make sure root is setup to refer to your homebrew libs etc first. Still fixing that one now when I get the chance to work on it again. (Wasn't using SDL_image and choking on loading a PNG)

这篇关于在Mountain Lion上安装Pygame时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆