net-snmp编译的时候报错

/usr/bin/ld: /usr/local/lib/libnetsnmp.a(default_store.o): relocation R_X86_64_PC32 against symbol `netsnmp_ds_set_string' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:462: recipe for target '../blib/arch/auto/NetSNMP/default_store/default_store.so' failed
make[2]: *** [../blib/arch/auto/NetSNMP/default_store/default_store.so] Error 1
make[2]: Leaving directory '/media/build/cyf/snmp/net-snmp-5.9.1/perl/default_store'
Makefile:485: recipe for target 'subdirs' failed
make[1]: *** [subdirs] Error 2
make[1]: Leaving directory '/media/build/cyf/snmp/net-snmp-5.9.1/perl'
Makefile:299: recipe for target 'perlmodules' failed
make: *** [perlmodules] Error 1

解决方法:

./configure --build=x86_64 --host=x86_64 --with-default-snmp-version="2" --with-logfile="/var/log/snmpd.log"

指定编译平台和运行平台

net-snmp编译的时候报错/usr/bin/ld: /usr/local/lib/libnetsnmp.a(default_store.o): relocation R_X86_64_PC32 against symbol `netsnmp_ds_set_string' can not be used when making a shared object; recompile with -fPIC/usr/bin/ld: final link failed: Bad valuecollect2
/ usr / bin / ld : */ linux _x 32 /lib/libhpsocket.a(HPSocket.o): unrecognized re location (0x2b) in section `.text' / usr / bin / ld : final link failed : Bad value 在网上一番搜索后, 基本确定是 ld 链接器版本过低造成的。我的系统是 ubuntu 14.04 1、查看我的当前版本: root@ubuntu:# ld -v GNU ld (GNU Bin utils.
今天看到go1.16发布了,修改了内存管理的方式,打算升级试下,结果编译时遇到下面的错误: / usr /local/go/pkg/tool/ linux _amd 64 / link : running g++ failed : exit status 1 / usr / bin / ld : /tmp/go- link -852636201/000012.o: unrecognized re location (0x2a) in section `.text' / usr / bin / ld : final link failed : Bad val
如果GD报错:configure.ac: 64 : warning: macro `AM_ICONV' not found in library 你就make clean一下,然后再make 如果你安装别的出现libtool没有找到,你就从/ usr / bin /libtool cp 一个过来用就好了! 在 64 位下编译GD 如果/ usr / bin / ld : / usr /local/lib/libz.a(compress.o): re location R_ X86 _ 64 _ 32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC 这说明zlib没用用-fPIC进行编译修改zlib的Makefile CFLAGS=-O3 -DUSE_MMAP -fPIC make;make install然后再编译gd 就过去了!
数据文件: AE_test_arrivals.mat-在滑移测试期间记录的96个AE事件的P波到达拾取。 AE_train.mat-训练数据中铅笔折断事件的位置(x,z)及其相对的P波到达选择。 AErelocNet_2D_Deploy.mat-经过训练可在实验室故障(x,z)上输出AE源位置的ANN。 代码文件: AErelocNet_train_ANN.m-训练ANN模型 AErelocNet_train_ANN_picking_quality_test.m-检查ANN模型对到达拣货质量的敏感性。 AErelocNet_train_ANN_with_Xvalid.m-具有十倍交叉验证的ANN模型准确性估计。 AEreloc_ANN.m
关于ros2安装前言一、ros2安装1. Set Locale2. Setup Sources3. Install ROS2 Package4. Environment Setup5. Try Some Examples二、创建第一个ROS2包1. 创建ROS2包2. colcon: command not found总结 为什么要使用ros2? 对于这个问题,ros官网以及各大网络平台给出了很多答案,至于其真实性以及有效性,本人没有认真比对过。暂且贴图,至少ros2在实时性上是更胜一筹的。
这个错误通常出现在链接器( ld )的最后阶段,意味着在生成共享对象时遇到了问题。错误消息"/ usr / bin / ld : 最后的链结失败: bad value collect2: error: ld returned 1 exit status" 表示链结器最后的阶段失败,并返回了错误码1。这通常是由于编译过程中使用了不兼容的选项或库引起的。 引用中提到了一个可能的原因是库文件没有使用-fPIC选项进行重新编译。-fPIC选项指定生成位置无关代码(Position Independent Code)的编译选项。如果库文件没有使用该选项进行编译,那么在生成共享对象时会出现错误。重新编译库文件时,请确保使用了-fPIC选项。 另一个可能的原因可以从引用中找到。该引用提到了一个与符号重定位(re location )相关的错误。这可能意味着代码中使用了不兼容的符号或库。重新编译代码时,请确保使用了正确的库文件或修复了相关的符号错误。 最后,引用提供了一个与缺少libGL环境相关的错误信息。这可能是由于缺少libGL库或库路径配置不正确导致的。确保已正确安装了libgl1-mesa-dev包,并且库路径配置正确。如果仍然出现问题,可以尝试更新源或解决依赖关系问题。 总结起来,/ usr / bin / ld : 最后的链结失败: bad value collect2: error: ld returned 1 exit status错误通常是由于编译选项不兼容、库文件或符号错误、缺少库文件或库路径配置错误等问题引起的。请根据具体情况重新编译代码、重新编译库文件、安装所需的依赖项或更新库路径配置来解决这个错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Ubuntu20 安装编译R语言时报错](https://blog.csdn.net/m0_71510787/article/details/127433903)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_ pc _result","utm_medium":"distribute. pc _search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [LibreCAD_3编译遇到的问题](https://blog.csdn.net/FifthII/article/details/120619138)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_ pc _result","utm_medium":"distribute. pc _search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Ubuntu环境QT问题 / usr / bin / ld : 找不到 -lGL(已解决)](https://download.csdn.net/download/weixin_38655990/14043339)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_ pc _result","utm_medium":"distribute. pc _search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]