[Linux] RockyLinux 9 编译安装 davfs2
官网:davfs2 - Summary [Savannah] (nongnu.org)
下载地址:Index of /releases/davfs2/ (nongnu.org)
下载最新版
wget https://download.savannah.nongnu.org/releases/davfs2/davfs2-1.7.0.tar.gz
tar zxvf davfs2-1.7.0.tar.gz
cd davfs2-1.7.0
mkdir build && cd build
CFLAGS="-fPIE" LDFLAGS="-fPIE" CPPFLAGS="-fPIE" ../configure
make -j8
make install
直接 ../configure 构建的时候会出现问题
/usr/bin/ld: cache.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: dav_fuse.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: kernel_interface.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: mount_davfs.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: webdav.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
大概意思就是编译的文件和库文件使用了不匹配的pie
选项,导致连接失败,所以需要指定-fPIE
这个选项是通过../configure --help
得到的
如果你是其他项目出现了这个问题,也可以试着添加
-no-pie
选项,总之用到的库和可执行程序的pie
选项要统一
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· NetPad:一个.NET开源、跨平台的C#编辑器
· PowerShell开发游戏 · 打蜜蜂
· 凌晨三点救火实录:Java内存泄漏的七个神坑,你至少踩过三个!