日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

openwrt编译smartdns_老大静态编译openwrt平台mipsel_24kc架构的smartdns时报错,求救!...

發(fā)布時(shí)間:2023/12/8 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 openwrt编译smartdns_老大静态编译openwrt平台mipsel_24kc架构的smartdns时报错,求救!... 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

在x86_64架構(gòu)下的Arch Linux上交叉編譯smartdns時(shí)報(bào)錯(cuò)

# ./Configure --cross-compile-prefix=mipsel-openwrt-linux- linux-mips32 --prefix=/root/smartdns_mips/openssl --openssldir=/root/smartdns_mips/openssl no-shared no-asm

# make

# make install

成功靜態(tài)編譯openssl-1.1.1g

# export PKG_CONFIG_PATH=/root/smartdns_mips/openssl/lib/pkgconfig

# cd /root/smartdns_mips/smartdns/src

# vi Makefile

...

override CFLAGS +=-Iinclude -I/root/smartdns_mips/openssl/include

...

ifeq ($(STATIC), yes)

override LDFLAGS += -L/root/smartdns_mips/openssl/lib -lssl -lcrypto -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -ldl -static

# cd /root/smartdns_mips/smartdns/package

最后靜態(tài)編譯smartdns

# ./build-pkg.sh --platform openwrt --arch mips_24kc --static

輸出信息如下

...

gcc -O2 -g -Wall -Wstrict-prototypes -fno-omit-frame-pointer -Wstrict-aliasing -Iinclude -I/root/smartdns_mips/openssl/include -DBASE_FILE_NAME=\"radix.c\" -DSMARTDNS_VERION=\"1.2020.05.03-0020\" -c -o lib/radix.o lib/radix.c

gcc -O2 -g -Wall -Wstrict-prototypes -fno-omit-frame-pointer -Wstrict-aliasing -Iinclude -I/root/smartdns_mips/openssl/include -DBASE_FILE_NAME=\"conf.c\" -DSMARTDNS_VERION=\"1.2020.05.03-0020\" -c -o lib/conf.o lib/conf.c

gcc smartdns.o fast_ping.o dns_client.o dns_server.o dns.o util.o tlog.o dns_conf.o dns_cache.o http_parse.o lib/rbtree.o lib/art.o lib/bitops.o lib/radix.o lib/conf.o -o smartdns -L/root/smartdns_mips/openssl/lib -lssl -lcrypto -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -ldl -static

/usr/bin/ld: skipping incompatible /root/smartdns_mips/openssl/lib/libssl.a when searching for -lssl

/usr/bin/ld: cannot find -lssl

/usr/bin/ld: skipping incompatible /root/smartdns_mips/openssl/lib/libcrypto.a when searching for -lcrypto

/usr/bin/ld: cannot find -lcrypto

/usr/bin/ld: fast_ping.o: in function `_fast_ping_getdomain':

/root/smartdns_mips/smartdns/src/fast_ping.c:329: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

collect2: error: ld returned 1 exit status

make[1]: *** [Makefile:46: smartdns] Error 1

make[1]: Leaving directory '/root/smartdns_mips/smartdns/src'

make: *** [Makefile:29: SMARTDNS_BIN] Error 2

make: Leaving directory '/root/smartdns_mips/smartdns'

make smartdns failed

總結(jié)

以上是生活随笔為你收集整理的openwrt编译smartdns_老大静态编译openwrt平台mipsel_24kc架构的smartdns时报错,求救!...的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。