加--with-x编译vim时报错 configure: error: could not configure X

本文针对在编译vim、ccls及gcc过程中遇到的各种错误进行了详细的分析,并提供了有效的解决方案,包括安装必要的开发库、配置编译参数等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. vim 编译报错

(1)
configure: error: could not configure X error: Bad exit status from /var/tmp/rpm-tmp.2xwoeZ (%build)`
先安装yum install libXt-devel,之后再重新编译
./configure --prefix=%{_prefix} --enable-pythoninterp --enable-multibyte --with-x

忘了需不需要加这个了yum install python3-devel
(2) RPM build error: empty %files file debugfiles.list
参考: https://superuser.com/questions/1091529/rpm-build-error-empty-files-file-debugfiles-list
rpmbuild -ba xx.spec改为rpmbuild -ba -D 'debug_package %{nil}' xx.spec

2. 编译ccls报错

(1)
在这里插入图片描述

Could not find a package configuration file provided by "LLVM" with any of
  the following names:

    LLVMConfig.cmake
    llvm-config.cmake

  Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
  "LLVM_DIR" to a directory containing one of the above files.  If "LLVM"
  provides a separate development package or SDK, be sure it has been
  installed.

llvm和clang的包是分开的,需要安装llvmllvm-devel

yum install -y llvm 
yum install -y llvm-devel

然后在/usr/lib64/cmake/llvm/LLVMConfig.cmake就可以看到这个文件了
在这里插入图片描述

(2) 编译时报错: fatal error: ‘optional’ file not found

3. 编译gcc时报错

cannot find crt1.o
安装gcc时没有装 multilib, 因此编译时加了-disable-multilib
即,configure改为../gcc-wxg-7.5.0/configure --prefix=/root/software/gcc/install --with-dwarf-2 --disable-libstdcxx-dual-abi --disable-multilib

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值