您尚未登录。

#1 2024-05-28 09:07:57

wste
会员
注册时间: 2024-02-26
帖子: 23

【已解决】在对qt5ct-kde使用makepkg时报告了无法找到ld的错误

如题,以下是log信息

==> Making package: qt5ct-kde 1.8-4 (Tue 28 May 2024 08:50:18 AM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found qt5ct-1.8.tar.bz2
  -> Found qt5ct-shenanigans.patch
==> Validating source files with sha256sums...
    qt5ct-1.8.tar.bz2 ... Passed
    qt5ct-shenanigans.patch ... Passed
==> Extracting sources...
  -> Extracting qt5ct-1.8.tar.bz2 with bsdtar
==> Starting prepare()...
patching file CMakeLists.txt
patching file src/qt5ct/CMakeLists.txt
patching file src/qt5ct/appearancepage.cpp
patching file src/qt5ct-common/qt5ct.cpp
patching file src/qt5ct-qtplugin/CMakeLists.txt
patching file src/qt5ct-qtplugin/qt5ctplatformtheme.cpp
patching file src/qt5ct-qtplugin/qt5ctplatformtheme.h
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- The CXX compiler identification is GNU 14.1.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:73 (message):
  The C++ compiler

    "/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/tmp/makepkg/qt5ct-kde/src/build/CMakeFiles/CMakeScratch/TryCompile-JaYG0x'

    Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_df312/fast
    /usr/bin/make  -f CMakeFiles/cmTC_df312.dir/build.make CMakeFiles/cmTC_df312.dir/build
    make[1]: Entering directory '/tmp/makepkg/qt5ct-kde/src/build/CMakeFiles/CMakeScratch/TryCompile-JaYG0x'
    Building CXX object CMakeFiles/cmTC_df312.dir/testCXXCompiler.cxx.o
    /usr/bin/c++   -march=native -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/tmp/makepkg/qt5ct-kde/src=/usr/src/debug/qt5ct-kde -flto=auto  -o CMakeFiles/cmTC_df312.dir/testCXXCompiler.cxx.o -c /tmp/makepkg/qt5ct-kde/src/build/CMakeFiles/CMakeScratch/TryCompile-JaYG0x/testCXXCompiler.cxx
    Linking CXX executable cmTC_df312
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_df312.dir/link.txt --verbose=1
    /usr/bin/c++ -march=native -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/tmp/makepkg/qt5ct-kde/src=/usr/src/debug/qt5ct-kde -flto=auto  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fuse-ld=mold -flto=auto  CMakeFiles/cmTC_df312.dir/testCXXCompiler.cxx.o -o cmTC_df312
    collect2: fatal error: cannot find ‘ld’
    compilation terminated.
    make[1]: *** [CMakeFiles/cmTC_df312.dir/build.make:99: cmTC_df312] Error 1
    make[1]: Leaving directory '/tmp/makepkg/qt5ct-kde/src/build/CMakeFiles/CMakeScratch/TryCompile-JaYG0x'
    make: *** [Makefile:127: cmTC_df312/fast] Error 2





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...

但是我在shell中运行

which ld

得到了正确的返回结果

/usr/bin/ld

我该怎么办呢。

ps:
下载这个软件的目的是为了在使用sway时也可以使用主题为breeze dark的kde软件(如dolphin和kile),之前尝试过在环境变量设置

 XDG_CURRENT_DESKTOP=KDE 

但是这样会导致neovim的markdwonpreview插件无法正确的在浏览器打开页面。所以大佬们对这个问题有什么想法吗?

最近编辑记录 wste (2024-06-02 11:54:56)


总之,先找时光机

离线

#2 2024-05-28 10:09:12

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,773
个人网站

Re: 【已解决】在对qt5ct-kde使用makepkg时报告了无法找到ld的错误

你试试手动编译链接一个简单的 C++ 程序?

离线

#3 2024-05-28 12:26:49

wste
会员
注册时间: 2024-02-26
帖子: 23

Re: 【已解决】在对qt5ct-kde使用makepkg时报告了无法找到ld的错误

手动编译连接了输出a+b的程序,可执行文件运行正常。
小白不太懂 c++编译,参考了这篇文章


总之,先找时光机

离线

#4 2024-05-28 13:02:48

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,773
个人网站

Re: 【已解决】在对qt5ct-kde使用makepkg时报告了无法找到ld的错误

那我想不到办法了……太怪了。

离线

#5 2024-05-28 18:26:30

wste
会员
注册时间: 2024-02-26
帖子: 23

Re: 【已解决】在对qt5ct-kde使用makepkg时报告了无法找到ld的错误

额,请教了身边的大佬。貌似是这个aur软件的问题,我是不是因该去那里问一下?


总之,先找时光机

离线

#6 2024-05-28 18:36:35

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,773
个人网站

Re: 【已解决】在对qt5ct-kde使用makepkg时报告了无法找到ld的错误

问问呗。

离线

#7 2024-06-02 11:54:29

wste
会员
注册时间: 2024-02-26
帖子: 23

Re: 【已解决】在对qt5ct-kde使用makepkg时报告了无法找到ld的错误

对不起,大佬,我在makepkg.conf设置了

-fuse-ld=mold

但是我并没有安装mold所以爆出了这个错误,我愚蠢了,谢谢你的解答。


总之,先找时光机

离线

页脚