snmp linux arm,Net-SNMP的交叉编译 for ARM64
1.交叉編譯openssl
去官網下載openssl-1.0.2q.tar.gz,解壓縮到目錄/home/lwang/work/chengw/github/下,然后進入openssl目錄按照如下步驟操作
1) 配置編譯選項
1$./config no-asm shared --cross-compile-prefix=aarch64-linux-gnu- --prefix=/home/lwang/work/chengw/github/openssl-1.1.1a/release
其中參數的含義為:
no-asm:在交叉編譯過程中不使用匯編代碼代碼加速編譯過程;
shared:生成動態鏈接庫;
–prefix:指定生成lib、include、bin三個核心目錄的路徑,不修改此項則默認為OPENSSLDIR目錄。
2) 修改生成的Makefile,去掉-m64選項,否則會編譯報錯
3) 編譯
1$make -j4
4) 安裝
1$make install
最終編譯生成的頭文件和lib文件都位于當前release目錄下
2.交叉編譯net-snmp
在官網下載net-snmp-5.7.3.tar.gz,解壓縮到/home/lwang/work/chengw/github/目錄,然后進入net-snmp目錄,并按照如下步驟操作
1) 配置編譯選項
1$./configure --host=arm-linux --target=arm-linux --build=i686-linux --with-cc=aarch64-linux-gnu-gcc --with-ar=aarch64-linux-gnu-ar --prefix=/home/lwang/work/chengw/github/net-snmp-5.7.3/release --with-endianness=little --disable-manuals --disable-embedded-perl --disable-perl-cc-checks --without-perl-modules --disable-scripts --disable-applications --with-openssl=/home/lwang/work/chengw/github/openssl-1.0.2q/release
2) 編譯
1$make -j4
3) 安裝
1$make install
最終編譯生成的頭文件和lib文件都位于當前release目錄下
注意:實際測試發現,net-snmp 5.7.3只能搭配openssl-1.0.2q版本使用,更新的版本會編譯報錯.
總結
以上是生活随笔為你收集整理的snmp linux arm,Net-SNMP的交叉编译 for ARM64的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 哈弗首保最近服务中心在哪?
- 下一篇: 有没有人听说过飞行汽车的?找到了一个沃飞