gpt4 book ai didi

ruby - 无法安装/编译 asciidoctor-mathematical gem

转载 作者:行者123 更新时间:2023-12-04 18:46:11 28 4
gpt4 key购买 nike

在 OSX 上,按照说明,我有 brew install glib gdk-pixbuf cairo pango cmake并安装了字体,甚至尝试了brew link gettext --force (但无论如何编译错误似乎与此无关......)

以下是发生的情况:

$ sudo gem install asciidoctor-mathematical
... output omitted
In file included from /usr/local/Cellar/glib/2.48.1/include/glib-2.0/glib/galloca.h:32:
/usr/local/Cellar/glib/2.48.1/include/glib-2.0/glib/gtypes.h:422:3: error: '_GStaticAssertCompileTimeAssertion_0' declared as an array with a negative size
G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/glib/2.48.1/include/glib-2.0/glib/gmacros.h:232:103: note: expanded from macro 'G_STATIC_ASSERT'
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
^~~~~~~~~~~~~~~
1 error generated.
make: *** [lasem_overrides.o] Error 1

还尝试了 Ubuntu:
$ sudo gem install asciidoctor-mathematical
... output omitted
In file included from /usr/include/string.h:635:0,
from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/uthash.h:29,
from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/environment.h:4,
from /var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/mtex2MML.h:12,
from lasem_overrides.c:5:
/var/lib/gems/2.3.0/gems/mathematical-1.6.7/ext/mathematical/mtex2MML/src/../deps/uthash/../strdup/strdup.h:24:1: error: expected identifier or ‘(’ before ‘__extension__’
strdup(const char *str);
^
make: *** [lasem_overrides.o] Error 1

超出我的深度。很想让它在任何一个平台上工作。任何故障排除建议表示赞赏。

最佳答案

我在 Ubuntu 16.04 上遇到了同样的问题
它对以下命令进行了故障排除。

sudo MATHEMATICAL_SKIP_STRDUP=1 gem install mathematical

关于ruby - 无法安装/编译 asciidoctor-mathematical gem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39312532/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com