-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app-i18n/libime-1.0.17:5/5::gentoo-zh fail to build with clang-16.0.0 #3051
Comments
可能是clang升级之后默认使用了更新的C++标准的缘故?有好几个其他官方包也是升级之后由于c++标准不同寄了的 |
@ArcheyChen 我认为可以通过patch 或者mycmakeargs参数指定C++11,并且报告给 https://github.com/fcitx/libime |
我通过简单的设置 env 没有复现,你试试这样改能编过么? diff --git a/app-i18n/libime/libime-1.0.17.ebuild b/app-i18n/libime/libime-1.0.17.ebuild
index 53995e0..3b1807f 100644
--- a/app-i18n/libime/libime-1.0.17.ebuild
+++ b/app-i18n/libime/libime-1.0.17.ebuild
@@ -37,6 +37,7 @@ src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_LIBDIR="${EPREFIX}/usr/$(get_libdir)"
-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DCMAKE_CXX_STANDARD=11
)
cmake_src_configure
} |
你好,请问这个patch要如何使用?我才刚换到gentoo不久,我把文件放到 1 out of 1 hunk ignored [ !! ]
* ERROR: app-i18n/libime-1.0.17::gentoo-zh failed (prepare phase):
* patch -p1 failed with /etc/portage/patches/app-i18n/libime/libime.patch
*
* Call stack:
* ebuild.sh, line 136: Called src_prepare
* environment, line 2075: Called cmake_src_prepare
* environment, line 1008: Called default_src_prepare
* phase-functions.sh, line 948: Called __eapi8_src_prepare
* environment, line 333: Called eapply_user
* environment, line 1204: Called eapply '/etc/portage/patches/app-i18n/libime/libime.patch'
* environment, line 1164: Called _eapply_patch '/etc/portage/patches/app-i18n/libime/libime.patch'
* environment, line 1102: Called __helpers_die 'patch -p1 failed with /etc/portage/patches/app-i18n/libime/libime.patch'
* isolated-functions.sh, line 112: Called die
* The specific snippet of code:
* die "$@"
|
刚刚我试图手动修改了/var/db/repo。。。。。中的ebuild文件,不知道这可能会产生什么后果。 |
是改 ebuild。 |
我现在的情况:1.修改了ebuild, 2.关闭了ccache。 但是仍然不能用。 我现在全局使用libc++,可能是产生问题的原因? 同时,我尝试使用 (我默认是采用-stdlib=libc++参数) 成功编译通过了那几个报错的文件,但是后面lld进行连接的时候出错了。 编译日志在这 http://sprunge.us/FhICvX |
到周末下班了,可能需要周一才能继续反馈这问题的更多细节。希望我刚才提供的信息对您有用。 |
我在 CXXFLAGS 加上 -stdlib=libc++ 复现到了,之前没注意到你的这个设置。 |
我想可以有两种解决方法:
--- a/app-i18n/libime/libime-1.0.17.ebuild
+++ b/app-i18n/libime/libime-1.0.17.ebuild
@@ -34,6 +34,10 @@ src_prepare() {
}
src_configure() {
+ if [[ $(tc-get-cxx-stdlib) == libc++ ]]; then
+ append-cxxflags -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
+ fi
+
local mycmakeargs=(
-DCMAKE_INSTALL_LIBDIR="${EPREFIX}/usr/$(get_libdir)"
-DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" fcitx 的 ld 问题我也遇到了,在我使用 clang 重编 app-i18n/fcitx-5.0.23 后解决了。 并且因为同样的原因,需要用 clang 重编 boost。 |
Closes: #3051 Signed-off-by: jinqiang zhang <peeweep@0x0.ee>
在最新的 gentoo-zh 上还有问题吗? |
刚刚测试,已经能正常编译,感谢各位 |
I update my clang to 16.0.0 yesterday, and found libime failed to build:
/var/tmp/portage/app-i18n/libime-1.0.17/work/libime-1.0.17/src/libime/core/kenlm/lm/../util/joint_sort.hh:104:68: error: no template named 'binary_function' in namespace 'std'; did you mean '__binary_function'?
build log :https://bpa.st/DAPSQ
emerge info:https://bpa.st/FQXTO
The text was updated successfully, but these errors were encountered: