为 pygobject 和 pygtk 配置 gobject-introspection 时出现问题

发布于 2024-11-27 00:08:12 字数 265 浏览 2 评论 0原文

我正在尝试在我的Mac上安装 pygtk ,然后要求我安装 pygobject ,然后要求我获取 gobject-introspection 。我在此安装中遇到的问题是在配置它时显示此错误:

正在检查 FFI...否
检查 ffi.h...配置:错误:找不到 ffi.h

请帮助我,因为我需要获取 gtk 。

/usr/include/ffi->ffi.h 的位置

提前致谢

i am trying to install pygtk on my mac which then asked me to install pygobject which then asked me to get gobject-introspection . the problem i have in this installation is while configuring it shows this error :

checking for FFI... no
checking for ffi.h... configure: error: ffi.h not found

please do help me with this as i need to get gtk .

/usr/include/ffi->location of ffi.h

thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夏九 2024-12-04 00:08:12

试试这个:

export FFI_CFLAGS=/usr/include
export FFI_LIBS=/usr/lib

那么

./configure

我希望这能解决您的问题。

Try this:

export FFI_CFLAGS=/usr/include
export FFI_LIBS=/usr/lib

then

./configure

I hope this solves your problem.

风筝有风,海豚有海 2024-12-04 00:08:12

我最初在组装 GLib 时发现了这个编译失败(我尝试过的所有版本都比 2.28.7 更新),但我在 gobject 中再次遇到了它;它似乎与其他几个软件包的构建失败有关:

我尝试遵循所有这些线程中提供的建议(因为讨论的解决方案基本上是相同的) )没有成功。

最终解决方案:完全重新编译并安装 GCC (4.7.2)

为什么编译 GCC (4.7.2) 解决了问题?

我在 Debian Bug Archive 中找到了这篇文章:http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523869

在阅读时,我注意到我的系统正在使用受影响的 GCC 版本来编译我的各种源代码(来自旧笔记本电脑上的 FC9 安装)。

我选择 4.7.2 作为我的目标,因为在撰写本文时,它是稳定树中最新的版本。我相对确定在您的系统上安装最新的 GCC 的简单软件包会产生相同的结果(只要您获得 4.3.5-4 或更高版本),但我还没有对此进行测试,因为可以理解没有这样的结果FC9 安装的软件包。除了简单之外,该包路线还有许多潜在的积极方面,请阅读下文。

重要说明:如果您尝试编译 GCC,您可能需要一个工作(且当前)的 glibc 环境。 请先阅读此并发症 开始手动流程之前: http://cygwin.com/ml/libc-alpha/2012-02/ msg00646.html

解决方法是找到一个早于上面文章中提到的提交的 Glibc 版本(我使用的是 2.14),编译 GCC安装了 4.5(我选择了 4.5.3,因为版本与 glibc 2.14 接近),然后使用当前的 Glibc 和 GCC 再次开始该过程...祝你好运!

I initially found this compile failure while assembling GLib (all versions I tried that were more recent than 2.28.7), but I again encountered it with gobject; and it appears related to several other packages' build failures:

I tried following the advice provided in all of these threads (as the solutions discussed are largely the same) with no success.

The Final Solution: a complete recompile and install of GCC (4.7.2)

Why did compiling GCC (4.7.2) solve the issue?

I found this post in the Debian Bug Archive: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523869

While reading, I noted that my system was using an affected version of GCC to compile my various sources (from an FC9 installation on a relic laptop).

I chose 4.7.2 as my goal because it was, at the time of this writing, the most current build in the stable tree. I'm relatively sure that a simple package install of a recent GCC on your system will yield the same results (so long as you get 4.3.5-4 or later), but I haven't tested this as there are understandably no such packages for an FC9 install. The package route has many potential positive aspects beyond being easy, please read below..

Important Note: If you are trying to compile GCC, you'll probably need a working (and current) glibc enviroment... Please read up on this complication BEFORE you start the manual process: http://cygwin.com/ml/libc-alpha/2012-02/msg00646.html

The workaround is to find a Glibc version that predates the commit noted in the article above (i went with 2.14), compile GCC 4.5 with that installed (i chose 4.5.3 due to release proximity with glibc 2.14), and then start the process again with current Glibc and GCC... best of luck!

感受沵的脚步 2024-12-04 00:08:12

ffi.h 由 libffi-dev 包提供,它实际上来自 gcc 源码包。而且很可能它适用于 Linux。

ffi.h is provided by the package libffi-dev, which is actually from the gcc source package. and most probably it's available for linux.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文