在x86_64架构下的Arch Linux上交叉编译smartdns时报错

# ./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

成功静态编译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

最后静态编译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

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

  1. Java静态编译技术:突破Java“冷启动”桎梏,实现启动性能“质”的飞跃

    自1996年诞生以来,Java语言长期在最受欢迎的编程语言排行榜中占据领先地位.除了语言本身的优秀特性之外,Java语言持续演进.不断发展也是它能够保持长盛不衰的重要原因. |Java市场份额不断下降 ...

  2. 【Flutter】Dart 语言 ( Dart 语言特征 | JIT 即时编译 | AOT 静态编译 )

    文章目录 I . Dart 语言特征 II . JIT 即时编译 III . AOT 静态编译 I . Dart 语言特征 1 . Dart 语言特征 : ① 语言类型 : 强类型语言 ; ② 编译类 ...

  3. 通过实战探究 GraalVM 静态编译

    通过实战探究 GraalVM 静态编译 GraalVM 是什么 什么是 Java 静态编译 GraalVM 静态编译优点 GraalVM 静态编译缺点 Substrate VM 是什么 native ...

  4. apache动态编译/静态编译区别

    总结百度 google了好多文档! 关于静态的缺点是:编译进APACHE内核,如果要新加模块,要重新编译: 动态:DSO模式动态加载:如果编译中包含任何DSO模块,则mod_so会被自动包含进核心. ...

  5. Qt5.14.2MinGW-32静态编译及压缩过程配置教程

    目录 下载 下载Qt5.14.2 下载upxn 下载Python2 安装 检查配置 检查perl版本 检查python版本 静态编译 配置 编译 安装 新增静态编译环境 添加Qt Version 添加 ...

  6. QT5静态编译教程,主要针对vs2012

    - 本帖被 XChinux 设置为精华(2013-03-24) - QT5,VS2012静态编译,所有的库准备充分的话qwebkit也可以静态编译通过,但是我编译的版本使用中如果用了QWEBVIEW控 ...

  7. cmake源码静态编译

    cmake源码静态编译 如需转载请标明出处:http://blog.csdn.net/itas109 QQ技术交流群:129518033 文章目录 cmake源码静态编译 前言 1.cmake直接编译 ...

  8. 【Android 逆向】Android 逆向通用工具开发 ( Windows 平台静态库程序类型 | 编译逆向工具依赖的 Windows 平台静态库程序 )

    文章目录 一.Windows 平台静态库程序类型 二.编译逆向工具依赖的 Windows 平台静态库程序 一.Windows 平台静态库程序类型 在 Android 逆向通用工具 MobileGame ...

  9. openwrt 安装尔雅云_[网络]openwrt的阿里云编译

    不知道有没有感觉搭建linux编译openwrt困难的,此篇选择租个云服务器编译. 以下我编译之旅 注册服务器 阿里云登录,选择ECS产品 选择地区美国(硅谷)(其实选国内的也是可以的,这边为了演示方 ...

最新文章

  1. if...else..的错误用法
  2. BZOJ1578: [Usaco2009 Feb]Stock Market 股票市场
  3. 双向链表的(CRUD)
  4. CentOS 7 防火墙操作
  5. vue 前端商城框架_前端工程师要掌握几个Vue框架
  6. server sql top速度变慢解决方案_SQL Server的性能调优:解决查询速度慢的五种方法-数据库...
  7. 集合练习。学生信息包括学号、姓名、出生日期、性别。把N个学生的信息放入一个集合中。可以根据学号,对学生信息进行检索。并可以根据生日进行排序输出。
  8. 大数据学习笔记47:Flume - 下载、安装与配置
  9. Hololens开发入门篇-郑洪智-专题视频课程
  10. 面向对象和面向过程思想 oc
  11. 用js把数据从一个页面传到另一个页面
  12. ESXi主机性能问题
  13. 二十、对象的引用与传递
  14. 国内太极AI智能交易系统
  15. 通过u盘启动计算机使用ghost安装系统步骤,ghost怎么重装系统 使用ghost重装系统步骤...
  16. 11.7 项目:下载所有 XKCD 漫画
  17. 用户管理系统 - 用户权限设计从入门到精通
  18. 京东上线“友家铺子”,社区团购进入洗牌阶段
  19. 华为交换机路由器密码重置笔记
  20. 阶段二第一部分:第2章 Nginx进阶与实战

热门文章

  1. 如何解决Beyond Compare中文乱码问题
  2. java实验5_java实验5
  3. Python ABC(抽象基类)
  4. TMT: A Transformer-based Modal Translator for Improving Multimodal Sequence Representations in Audio
  5. docx_demos(创建文档类Document及属性方法, 创建段落文本类Paragraph及段落格式设置, 创建字体设置类Run及属性等)
  6. BAT批处理批量修改文件后缀名
  7. php frameset不显示,如何解决php加载frameset页面时显示空白问题
  8. 【杂谈】诗集序以及一点杂谈
  9. BI Publisher(rtf)模板开发语法大全(转)
  10. CSS精灵图(sprite)