ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

【交叉编译三】nghttp2编译

2020-12-16 14:33:02  阅读:586  来源: 互联网

标签:ac configure 交叉 am Makefile 编译 nghttp2 LIBTOOL aclocal


nghttp2 是一个用 C 实现的 HTTP/2 库,支持 h2c。如下是君正平台的交叉编译内容。

1、下载源码:https://github.com/nghttp2/nghttp2

或者:git clone https://github.com/nghttp2/nghttp2.git

2、执行如下结果

cd nghttp2

autoreconf -i

但是报错如下:主要原因是 没有配置正确aclocal的库LIBTOOL.m4的路径

main::scan_file() called too early to check prototype at /usr/local/bin/aclocal line 617.

Useless use of /d modifier in transliteration operator at /usr/local/share/automake-1.11/Automake/Wrap.pm line 58.

configure.ac:37: installing `./config.guess'

configure.ac:37: installing `./config.sub'

configure.ac:41: installing `./install-sh'

configure.ac:41: installing `./missing'

examples/Makefile.am: installing `./depcomp'

lib/Makefile.am:35: Libtool library used but `LIBTOOL' is undefined

lib/Makefile.am:35:   The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'

lib/Makefile.am:35:   to `configure.ac' and run `aclocal' and `autoconf' again.

lib/Makefile.am:35:   If `AC_PROG_LIBTOOL' is in `configure.ac', make sure

lib/Makefile.am:35:   its definition is in aclocal's search path.

src/Makefile.am:156: library used but `RANLIB' is undefined

src/Makefile.am:156:   The usual way to define `RANLIB' is to add `AC_PROG_RANLIB'

src/Makefile.am:156:   to `configure.ac' and run `autoconf' again.

src/Makefile.am:231: Libtool library used but `LIBTOOL' is undefined

src/Makefile.am:231:   The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'

src/Makefile.am:231:   to `configure.ac' and run `aclocal' and `autoconf' again.

src/Makefile.am:231:   If `AC_PROG_LIBTOOL' is in `configure.ac', make sure

src/Makefile.am:231:   its definition is in aclocal's search path.

third-party/Makefile.am:30: Libtool library used but `LIBTOOL' is undefined

third-party/Makefile.am:30:   The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'

third-party/Makefile.am:30:   to `configure.ac' and run `aclocal' and `autoconf' again.

third-party/Makefile.am:30:   If `AC_PROG_LIBTOOL' is in `configure.ac', make sure

third-party/Makefile.am:30:   its definition is in aclocal's search path.

Makefile.am: installing `./INSTALL'

autoreconf: automake failed with exit status: 1

解决办法:查看aclocal的路径 aclocal --print-ac-dir

显示结果为:

/usr/local/share/aclocal

查看里面的*.m4文件只有:

则我将/usr/share/aclocal中的*.m4文件拷贝到查询到目录

3、执行automake

出现错误:Useless use of /d modifier in transliteration operator at /usr/local/share/automake-1.11/Automake/Wrap.pm line 58.

解决办法:执行yum install automake

(软件包 automake-1.13.4-3.el7.noarch 已安装并且是最新版本)

打开vim /usr/share/automake-1.13/Automake/Wrap.pm

发现该地方已经没有d

于是打开文件 /usr/local/share/automake-1.11/Automake/Wrap.pm 第 58行,删除d

再执行

autoconf

4、执行编译选项

./configure --prefix=$(pwd)/ISVP --host=mips-linux-uclibc --disable-examples --disable-threads CC=/opt/mips-gcc472-glibc216-64bit/bin/mips-linux-uclibc-gnu-gcc CXX=/opt/mips-gcc472-glibc216-64bit/bin/mips-linux-uclibc-gnu-g++

出现错误:

./configure: line 4096: syntax error near unexpected token `2.2.6'

./configure: line 4096: `LT_PREREQ(2.2.6)'

解决办法:

当打开configure文件在4096行看到如下信息:

LT_PREREQ(2.2.6)

LT_INIT()

该含义是

LT_PREREQ 定义libtool工具的版本

LT_INIT 对libtool初始化

【系统中应该安装automake,autoconf,及libtool工具,autoconf功能极大的简化了多源码的工作量系统中除了源码应该存在三个基本的文件autogen.sh configure.ac makefile.am】

解决办法:yum install libtool

(软件包 libtool-2.4.2-22.el7_3.x86_64 已安装并且是最新版本)

5、make && make install

标签:ac,configure,交叉,am,Makefile,编译,nghttp2,LIBTOOL,aclocal
来源: https://blog.csdn.net/Swallow_he/article/details/111269511

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有