Lighttpd cross compilation

System requirements: Ubuntu14.04

1. Create XXX.sh in the Lighttpd source directory, the content is as follows

#!/bin/bash

CROSS_COMPILER=arm-hisiv100nptl-linux-
CC=arm-hisiv100nptl-linux-gcc
AR=arm-hisiv100nptl-linux-ar
LD=arm-hisiv100nptl-linux-ld
RANLIB=arm-hisiv100nptl-linux-ranlib
STRIP=arm-hisiv100nptl-linux-strip
 ./configure --prefix=/opt/web/lighttpd --host=arm-hisiv100nptl-linux  --build=i686-pc-linux --disable-FEATURE --enable-shared --disable-static \
 --disable-lfs --disable-ipv6 --without-PACKAGE --without-valgrind \
 --without-openssl --without-kerberos5 --with-pcre --without-zlib --without-bzip2 --without-lua

Then run the file, it will appear

configure: error: pcre-config not found, install the pcre-devel package or build with –without-pcre

2, Download the source code of pcre, cross-compile, and set the bin directory of the cross-compiled pcre to one of the PATH paths

示例./configure --host=arm-hisiv100nptl-linux --prefix=/home/adminn/web/pcre-install

然后make&& make install

Add the bin path of the cross-compiled pcre to the PATH

Go to modify .bashrc, add the bin path of pcre to PATH: add PATH=$PATH:/home/adminn/web/pcre-install/bin at the end of the file

To make it work run source ~/.bashrc

Or run export PATH=$PATH:/home/adminn/web/pcre-install/bin directly

3. Then, re-configure Lighttpd and you’re done

4. make&&make install Remember that if you need permission when installing in the system directory, make up your own brain.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325906363&siteId=291194637