nghttp2 is an HTTP/2 library implemented in C and supports h2c. The following is the cross-compiled content of Ingenics platform.
1. Download the source code: https://github.com/nghttp2/nghttp2
Or: git clone https://github.com/nghttp2/nghttp2.git
2. Perform the following results
cd nghttp2
autoreconf -i
But the error is as follows: The main reason is that the path to the library LIBTOOL.m4 of aclocal is not configured correctly
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
Solution: Check the path of aclocal aclocal --print-ac-dir
The display result is:
/usr/local/share/aclocal
View the *.m4 file inside only:
Then I copy the *.m4 file in /usr/share/aclocal to the query directory
3. Execute automake
An error occurred: Useless use of /d modifier in transliteration operator at /usr/local/share/automake-1.11/Automake/Wrap.pm line 58.
Solution: execute yum install automake
(The package automake-1.13.4-3.el7.noarch has been installed and is the latest version)
Open vim /usr/share/automake-1.13/Automake/Wrap.pm
Found that the place no longer has d
So open the file /usr/local/share/automake-1.11/Automake/Wrap.pm line 58 and delete d
Execute again
autoconf
4. Execute compilation options
./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++
An error occurred:
./configure: line 4096: syntax error near unexpected token `2.2.6'
./configure: line 4096: `LT_PREREQ(2.2.6)'
Solution:
When you open the configure file, you see the following information at line 4096:
LT_PREREQ(2.2.6)
LT_INIT()
The meaning is
LT_PREREQ defines the version of the libtool tool
LT_INIT initializes libtool
[Automake, autoconf, and libtool tools should be installed in the system. The autoconf function greatly simplifies the workload of multi-source code. In addition to the source code, there should be three basic files autogen.sh configure.ac makefile.am in the system]
Solution: yum install libtool
(The package libtool-2.4.2-22.el7_3.x86_64 has been installed and is the latest version)
5、make && make install