原始文献 / 论坛帖 / Re: Gentoo Linux Ebuild

Re: Gentoo Linux Ebuild

Bitcointalk · 2010-08-27 00:49:43 UTC

AuthorSatoshi Nakamoto
TitleRe: Gentoo Linux Ebuild
Date2010-08-27 00:49:43 UTC
ForumBitcointalk · 原文

试试 -datadir=

上次我试 $(shell /usr/bin/wx-config) 时,立刻就有人嚷嚷说用它构建有问题。当时没时间细查。

$(shell /usr/bin/wx-config) 的一个问题是,它会随便抓到当时存在的任意版本(wx 2.8)和任意配置(非 UTF-8)的 wxWidgets。-lwx_gtk2ud-2.9 只匹配正确的配置。如果 wxWidgets 用了错误的配置构建,它就会失败。

引用

Iirc,我在 freenode 的 #wxwidgets 频道跟开发者们聊过,他们对为什么用这个感到不解。

他们说了为什么觉得不可思议吗?

引用

这是因为在我的系统上路径是 /usr/include/wx-2.9/wx/wx.h

它为什么在那?是操作系统自带的,还是你自己构建的?如果你是自己构建的,我很好奇它为什么会把自己放到别处。

wxWidgets 2.9 终于有 debian 包了吗?

也许我们应该这样:

INCLUDEPATHS= \
-I"/usr/local/include/wx-2.9" \
-I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" \
-I"/usr/include/wx-2.9" \
-I"/usr/lib/wx/include/gtk2-unicode-debug-static-2.9"

同样,这些路径能确保只用 2.9,遇到 2.8 会失败。

wxWidgets 2.8 有 ANSI 和 UTF-16 两种,都不合我们用。它诱人是因为很容易装到包;很多人被它折腾得够呛,直到我们开始在 makefile 里硬编码 2.9。

英文原文

Try -datadir=

Last time I tried $(shell /usr/bin/wx-config), there was immediate hollering about build problems with it.  There wasn't time to investigate at the time.

One problem with $(shell /usr/bin/wx-config) is it will pick up any version (wx 2.8 ) and any configuration (non-UTF-8 ) of wxWidgets that happens to be there.  -lwx_gtk2ud-2.9 only matches the right configuration.  It fails if wxWidgets was built with the wrong configuration.

Quote

Iirc, chatting in #wxwidgets on freenode, the devs there were baffled why that was used.

Did they say why they were baffled?

Quote

This is because on my system the path is /usr/include/wx-2.9/wx/wx.h

Why is it there?  Was it included by the OS, or did you have to build it?  If you built it, I wonder why it would put itself in a different place.

Has wxWidgets 2.9 finally started to become available as a debian package?

Maybe we should do this:

INCLUDEPATHS= \
 -I"/usr/local/include/wx-2.9" \
 -I"/usr/local/lib/wx/include/gtk2-unicode-debug-static-2.9" \
 -I"/usr/include/wx-2.9" \
 -I"/usr/lib/wx/include/gtk2-unicode-debug-static-2.9"

Again, those paths help make sure it's only 2.9 and will fail with 2.8.

wxWidgets 2.8 comes in ANSI and UTF-16, both wrong for us.  It's tempting because it's so easily available as a package; a lot of people were frustrated by it until we started hardcoding 2.9 into the makefile.