Nginx unable to find libpcre.so.0 after install from source - nginx

I am building nginx from source on ubuntu 14.04 but after building, when I run nginx I get the following error:
/etc/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.0:
cannot open shared object file: No such file or directory
The reason is probably because it is called libpcre.so.3. Is there a package I can install for libpcre0?
Can I configure nginx to use libpcre.so.3 somehow?

Here is the how to compile Nginx with OpenSSL and Pcre-8.36, with custom Username and Group for additional privileges:
./configure --with-cc-opt="-I $STATICLIBSSL/include -I/usr/include" \
--with-ld-opt="-L $STATICLIBSSL/lib -Wl,-rpath -lssl -lcrypto -ldl -lz" \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-pcre=/lib/libpcre.so.1
--with-http_ssl_module \
--with-http_spdy_module \
--with-file-aio \
--with-ipv6 \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--without-mail_pop3_module \
--without-mail_smtp_module \
--without-mail_imap_module \
--user=nginx \
--group=nginx \
--with-http_spdy_module \
--with-http_auth_request_module \
--with-openssl=/root/openssl/openssl-1.0.2a/libssl.a
--with-zlib=/usr/lib/x86_64-linux-gnu/libz.a

Related

Fail compile nginx from source

dockerfile
FROM ubuntu:20.04
WORKDIR /tmp
COPY build.sh /tmp
RUN ./build.sh
build script
#!/bin/bash
set -xe
NGINX_DIR="/etc/nginx"
mkdir -p ${NGINX_DIR}
mkdir -p ${NGINX_DIR}/temp
mkdir -p /tmp/nginx_bin
apt update -y && apt install wget gcc make libpcre3 libpcre3-dev zlib1g-dev libssl-dev libgeoip-dev automake -y
wget https://nginx.org/download/nginx-1.22.1.tar.gz -P /tmp && tar zxvf /tmp/nginx-1.22.1.tar.gz -C /tmp
cd /tmp/nginx-1.22.1 && ./configure \
--with-debug \
--prefix=${NGINX_DIR} \
--sbin-path=${NGINX_DIR}/sbin/nginx \
--conf-path=${NGINX_DIR}/nginx.conf \
--pid-path=${NGINX_DIR}/logs/nginx.pid \
--lock-path=${NGINX_DIR}/logs/nginx.lock \
--error-log-path=${NGINX_DIR}/logs/error.log \
--http-log-path=${NGINX_DIR}/logs/access.log \
--with-cc-opt="-O2 -g -Wno-error" \
--with-ld-opt="-static" \
--with-pcre-jit \
--http-client-body-temp-path=${NGINX_DIR}/temp/client_body_temp \
--http-proxy-temp-path=${NGINX_DIR}/temp/proxy_temp \
--with-stream \
--with-stream_ssl_module \
--with-file-aio \
--with-threads \
--with-http_geoip_module \
--with-http_auth_request_module \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_v2_module \
--with-http_slice_module \
--with-http_gunzip_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_addition_module \
--with-http_gzip_static_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_dav_module \
--with-http_sub_module \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
--with-openssl-opt="-g" && make -j4 && make -j4 install && cp objs/nginx /tmp/nginx_bin
I use the above dockerfile and shell script to compile nginx from source, if remove --with-ld-opt="-static" parameter, it will compile success, but after I add --with-ld-opt="-static" parameter, the complie will fail with the below error
checking for GeoIP library ... not found
checking for GeoIP library in /usr/local/ ... not found
checking for GeoIP library in /usr/pkg/ ... not found
checking for GeoIP library in /opt/local/ ... not found
but I already install the libgeoip-dev when running shell script
Could any one help take a look, how to fix it, thanks.
I use the above dockerfile and shell script to compile nginx from source, if remove --with-ld-opt="-static" parameter, it will compile success, but after I add --with-ld-opt="-static" parameter, the complie will fail with the below error
checking for GeoIP library ... not found
checking for GeoIP library in /usr/local/ ... not found
checking for GeoIP library in /usr/pkg/ ... not found
checking for GeoIP library in /opt/local/ ... not found

geoip2 for nginx not wirking

i have Problem with compile "geoip2" for nginx. my ".so" is not working.
my install way:
cd /opt/
sudo add-apt-repository ppa:maxmind/ppa && apt update & sudo apt install libmaxminddb0 libmaxminddb-dev mmdb-bin
git clone https://github.com/leev/ngx_http_geoip2_module.git
wget http://nginx.org/download/nginx-1.15.8.tar.gz && tar xzfv nginx-1.15.8.tar.gz && cd nginx-1.15.8/
./configure --with-compat --add-dynamic-module=/opt/ngx_http_geoip2_module && make && make install
... test ! -f '/usr/local/nginx/modules/ngx_http_geoip2_module.so' \
|| mv '/usr/local/nginx/modules/ngx_http_geoip2_module.so' \
'/usr/local/nginx/modules/ngx_http_geoip2_module.so.old' cp
objs/ngx_http_geoip2_module.so
'/usr/local/nginx/modules/ngx_http_geoip2_module.so' make[1]: Leaving
directory '/opt/nginx-1.15.8 ...
cp /usr/local/nginx/modules/ngx_http_geoip2_module.so /usr/share/nginx/modules/ngx_http_geoip2_module.so
adding the line load_module "modules/ngx_http_geoip2_module.so"; in my nginx.conf an restart nginx.
and after restart is geoip2 not loaded in my nginx install
nginx version: nginx/1.15.8 built with OpenSSL 1.1.1 11 Sep 2018
(running with OpenSSL 1.1.1a 20 Nov 2018) TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2
-fdebug-prefix-map=/build/nginx-2CZdMa/nginx-1.15.8=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-compat --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_xslt_module=dynamic --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-mail=dynamic --with-mail_ssl_module --add-dynamic-module=/build/nginx-2CZdMa/nginx-1.15.8/debian/modules/http-auth-pam
--add-dynamic-module=/build/nginx-2CZdMa/nginx-1.15.8/debian/modules/http-dav-ext
--add-dynamic-module=/build/nginx-2CZdMa/nginx-1.15.8/debian/modules/http-echo
--add-dynamic-module=/build/nginx-2CZdMa/nginx-1.15.8/debian/modules/http-upstream-fair
--add-dynamic-module=/build/nginx-2CZdMa/nginx-1.15.8/debian/modules/http-subs-filter
who is my fail or problem?
There is no problem. You seem to be copying the dynamic module to existing nginx installation.
The nginx -V will show the configure command that was used while compiling nginx. So it won't show configure options for the dynamic module that you compiled in a separate step, and it won't show loaded modules.
Just use the module's directives. It should work.

Error while cross compiling Qt for a raspberry pi3

I want to cross compile Qt to develop a gui for a raspberry pi. I have been following this tutorial: https://wiki.qt.io/RaspberryPi2EGLFS
I am using this configure command:
./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option \
CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \
-sysroot ~/raspi/sysroot -opensource -confirm-license \
-make libs -no-use-gold-linker -prefix /usr/local/qt5pi \
-extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v
This is the error I'm getting back:
/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/vbox/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/vbox/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/vbox/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/vbox/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o
/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'verifyspec' failed
make: *** [verifyspec] Error 1
Note: Also available for Linux: linux-clang linux-icc
ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.`
This is the config.log:
vbox#vbox:~/qtbase$ cat config.log
Command line: -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/vbox/raspi/sysroot -opensource -confirm-license -make libs -no-use-gold-linker -prefix /usr/local/qt5pi -extprefix /home/vbox/raspi/qt5pi -hostprefix /home/vbox/raspi/qt5 -v
executing config test machineTuple
+ /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -dumpmachine
arm-linux-gnueabihf
test config.qtbase.tests.machineTuple succeeded
executing config test verifyspec
+ cd /home/vbox/qtbase/config.tests/verifyspec && /home/vbox/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/vbox/raspi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/vbox/raspi/sysroot" "QMAKE_LFLAGS += --sysroot=/home/vbox/raspi/sysroot" -early "CONFIG += cross_compile" /home/vbox/qtbase/config.tests/verifyspec
Info: creating stash file /home/vbox/qtbase/config.tests/.qmake.stash
+ cd /home/vbox/qtbase/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make
/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/home/vbox/raspi/sysroot -O2 -std=gnu++11 -w -fPIC -I. -I/home/vbox/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -o verifyspec.o verifyspec.cpp
/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/vbox/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/vbox/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/vbox/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/vbox/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'verifyspec' failed
make: *** [verifyspec] Error 1
I'm not sure where to go from here, I don't know enough to start debugging this issue. Are there alternate toolchains available? Or is the issue with the QMakeSpec? Any suggestions on things to try would be very helpful.
This blog post seems more specific to RPi3, and probably does it too (last Jan 12, 2017):
https://medium.com/#amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c
sudo apt-get upgrade
sudo apt-get update
sudo apt-get install libgl1-mesa-dev
...
sudo apt-get build-dep qt5-default
sudo apt-get install libxcb-xinerama0-dev
sudo apt-add-repository ppa:u-szeged/sedkit
sudo apt-get update
sudo apt-get install sedkit-env-qtwebkit
sudo apt-get install build-essential perl python git
sudo apt-get install “^libxcb.*” libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev
sudo apt-get install flex bison gperf libicu-dev libxslt-dev ruby
sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libcap-dev libxtst-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libxss-dev libegl1-mesa-dev gperf bison
sudo apt-get install libbz2-dev libgcrypt11-dev libdrm-dev libcups2-dev libatkmm-1.6-dev
sudo apt-get install libasound2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
There is a note on the wiki you are looking at of some things they did to get it to work on newer builds. Here is some of the history of that wiki page:
https://wiki.qt.io/index.php?title=RaspberryPi2EGLFS&type=revision&diff=31538&oldid=30634
And then there is the device creation licensed version of Qt then you would use these instructions:
http://doc.qt.io/QtForDeviceCreation/qtee-preparing-hardware-rasberrypi.html
I have always learned a lot while digging into the articles on Linux from Scratch. In my recent building of Qt with nothing, they have been super helpful.
http://www.linuxfromscratch.org/blfs/view/8.0/x/qt5.html
Hope those links help.
This is my bash script for cross-compiling Qt for raspberry-pi. You can
this script with command <script name> <TcpIp of Raspberrry> $USER
#!/bin/bash
RASP_ADR=$1
USERNAME=$2
if [ ! $RASP_ADR ]
then
echo "Error: need Ip address"
exit 1
fi
LOGFILE=install.log.txt
rm -f $LOGFILE
ID_RSA=/root/.ssh/cu4_rsa
SSH="ssh -i $ID_RSA root#$RASP_ADR"
DEST=~/raspi
QT_VERSION=5.9
function log {
local t=`date`
echo "[$t] $#" | tee -a $LOGFILE
}
function remote_src {
local message
local exitcode
message=$1
shift
log $message
log "Remote $RASP_ADR command: $#"
OUT=`$SSH "$#" | tee /dev/tty | tee -a $LOGFILE`
exitcode=$?
if [ $exitcode -ne 0 ]; then
log "Exit with ERROR $exitcode"
exit $exitcode
fi
}
function local_src {
local message
local exitcode
message=$1
shift
log $message
log "Local command: $#"
OUT=`bash -c "$#" | tee /dev/tty | tee -a $LOGFILE`
exitcode=$?
if [ $exitcode -ne 0 ]; then
log "Exit with ERROR $exitcode"
exit $exitcode
fi
}
function Append_Qt_Module {
local QtModule
QtModule=$1
log "install $QtModule"
local_src \
"Clone $QtModule Qt-module" \
"cd $DEST && git clone git://code.qt.io/qt/$QtModule.git -b $QT_VERSION"
local_src \
"Make $QtModule Qt-module" \
"cd $DEST/$QtModule && $DEST/qt5/bin/qmake -r && make && make install"
local_src \
"Synchronize qt5pi with Raspberry pi" \
"rsync -avz -e \"ssh -i $ID_RSA\" $DEST/qt5pi pi#$RASP_ADR:/usr/local"
}
local_src \
"open key -> Raspberry" \
"cat /root/.ssh/cu4_rsa.pub | ssh pi#$RASP_ADR \"sudo cat - > authorized_keys; sudo mkdir -p /root/.ssh; sudo mv authorized_keys /root/.ssh; sudo chown -R root:root /root/.ssh\""
remote_src \
"Update System" \
"apt-get update"
remote_src \
"Upgrade System" \
"apt-get -y upgrade"
remote_src \
"Install Synaptic" \
"apt-get -y install synaptic"
remote_src \
"Install Qt libraries" \
"apt-get -y install libfontconfig1-dev libdbus-1-dev libudev-dev"
remote_src \
"Install Xcb" \
"apt-get -y install \"^libxcb.*\" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev"
remote_src \
"Install Qt-WebKit" \
"apt-get -y install flex bison gperf libicu-dev libxslt-dev ruby"
remote_src \
"Install Qt WebEngine" \
"apt-get -y install libssl-dev libxcursor-dev libxcomposite-dev libxrandr-dev"
remote_src \
"Install Qt Multimedia" \
"apt-get -y install libasound2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev"
DEB_SRC="deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi"
remote_src \
"Проверка открытости deb_src" \
"cat /etc/apt/sources.list | grep -s -G '^$DEB_SRC' | cat"
if [ ! "$OUT" ]
then
remote_src \
"Открываем комментарии" \
"echo '$DEB_SRC' >> /etc/apt/sources.list"
else
log "DEB_SRC открыты ранее"
fi
remote_src \
"Update System" \
"apt-get update"
remote_src \
"Build dependences for qt4-x11" \
"apt-get -y build-dep qt4-x11"
remote_src \
"Build dependences for libqt5gui5" \
"apt-get -y build-dep libqt5gui5"
remote_src \
"Install more libs for Xcb" \
"apt-get -y install libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0"
remote_src \
"Make dir for Qt libs" \
"mkdir /usr/local/qt5pi; chown pi:pi /usr/local/qt5pi"
remote_src \
"Reboot" \
"reboot"
while true; do
sleep 1s
log "wait..."
$SSH "echo done"
if [ $? -eq 0 ]; then break; fi
done
local_src \
"Install Git" \
"apt-get -y install git && mkdir -p $DEST && cd $DEST"
local_src \
"Clone RaspberryPi tools" \
"git clone https://github.com/raspberrypi/tools $DEST/tools"
local_src \
"OR Update Raspberry Pi Tools" \
"cd $DEST/tools && git pull origin master"
fi
local_src \
"Synchronize local computer with Raspberry Pi" \
"cd $DEST && mkdir -p /sysroot /sysroot/usr /sysroot/opt && \
rsync -avz -e \"ssh -i $ID_RSA\" root#$RASP_ADR:/lib sysroot && \
rsync -avz -e \"ssh -i $ID_RSA\" root#$RASP_ADR:/usr/include sysroot/usr && \
rsync -avz -e \"ssh -i $ID_RSA\" root#$RASP_ADR:/usr/lib sysroot/usr && \
rsync -avz -e \"ssh -i $ID_RSA\" root#$RASP_ADR:/opt/vc sysroot/opt && \
rsync -avz -e \"ssh -i $ID_RSA\" root#$RASP_ADR:/usr/local/include sysroot/usr/local && \
rsync -avz -e \"ssh -i $ID_RSA\" root#$RASP_ADR:/usr/local/lib sysroot/usr/local"
local_src \
"Get sysroot-relative.py script" \
"cd $DEST && wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py && \
chmod +x sysroot-relativelinks.py && \
./sysroot-relativelinks.py sysroot "
exit 0
local_src \
"Получаем qtbase версии $QT_VERSION и конфигурируем Qt."
"`git clone -b $QT_VERSION git://code.qt.io/qt/qtbase.git $DEST/qtbase`"
local_src \
"OR Update qtbase версии $QT_VERSION" \
"cd $DEST/qtbase && git pull origin $QT_VERSION"
local_src \
"Конфигурация и установка Qt$QT_VERSION" \
"cd $DEST/qtbase && ./configure -release -opengl es2 -device linux-rasp-pi3-g++ \
-device-option CROSS_COMPILE=$DEST/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- \
-sysroot $DEST/sysroot -opensource -confirm-license -make libs -make tools -qt-pcre -optimized-qmake -reduce-exports \
-release -prefix /usr/local/qt5pi -extprefix $DEST/qt5pi -hostprefix $DEST/qt5 -no-use-gold-linker -v && \
make -j 4 && make install"
local_src \
"Change owner to $USERNAME on $DEST" \
"chown -R $USERNAME:$USERNAME $DEST"
local_src \
"Get new free types from http://dejavu-fonts.org" \
"cd $DEST && wget http://sourceforge.net/projects/dejavu/files/dejavu/2.37/dejavu-fonts-ttf-2.37.tar.bz2 && \
tar -xvf dejavu-fonts-ttf-2.37.tar.bz2"
local_src \
"Send type to target dir" \
"cd $DEST && mkdir -p qt5pi/lib/fonts && \
cp dejavu-fonts-ttf-2.37/ttf/DejaVuSansMono.ttf qt5pi/lib/fonts/"
local_src \
"Send libs to RaspberryPi" \
"cd $DEST && rsync -avz -e \"ssh -i $ID_RSA\" qt5pi root#$RASP_ADR:/usr/local"
local_src \
"Build Test application" \
"cd $DEST/qtbase/examples/opengl/qopenglwidget && \
$DEST/qt5/bin/qmake && \
make && \
scp -i $ID_RSA qopenglwidget root#$RASP_ADR:/home/pi "
remote_src \
"Добавляем пути к библиотекам Qt на Raspberry Pi" \
"echo /usr/local/qt5pi/lib | tee /etc/ld.so.conf.d/qt5pi.conf && \
ldconfig"
remote_src \
"Устранение неполадок в библиотеке EGL/GLES " \
"rm /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 && \
ln -s /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 && \
ln -s /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 && \
ln -s /opt/vc/lib/libEGL.so /opt/vc/lib/libEGL.so.1 && \
ln -s /opt/vc/lib/libGLESv2.so /opt/vc/lib/libGLESv2.so.2"
remote_src \
"Запуск теста" \
"nohup /home/pi/qopenglwidget > /dev/null 2>&1 &"
log "Please push the some key when you are ready to next operation"
read -n1
remote_src \
"Kill test" \
"pkill qopenglwidget"
#Add youre Qt modules
Append_Qt_Module qtserialport
remote_src \
"Обновляем символьные линки к библиотекам Qt на Raspberry Pi" \
"ldconfig"
log "DONE!!!!"
exit 0
I edited device mkspec file linux-rasp-pi3-g++/qmake.conf like this
VC_LIBRARY_PATH = $$[QT_SYSROOT]/opt/vc/lib
VC_INCLUDE_PATH = $$[QT_SYSROOT]/opt/vc/include
QMAKE_LIBDIR_OPENGL_ES2 = $${VC_LIBRARY_PATH}
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
QMAKE_LIBDIR_OPENVG = $$QMAKE_LIBDIR_OPENGL_ES2
QMAKE_INCDIR_EGL = \
$${VC_INCLUDE_PATH} \
$${VC_INCLUDE_PATH}/interface/vcos/pthreads \
$${VC_INCLUDE_PATH}/interface/vmcs_host/linux
QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_EGL = -lEGL -lGLESv2
QMAKE_LIBS_OPENVG = -lEGL -lOpenVG -lGLESv2
and use gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf toolchain.
I wrote this blog which may be helpful: Build Qt 5.10 for Raspberry Pi 3

Unable to build Nginx (unrecognized option)

I am having some issues when configuring nginx, I have the following:
./configure \
--user=www-data \
--group=www-data \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--with-debug \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-pcre \
--with-file-aio \
--with-http_realip_module \
--with-http_v2_module \
--with-pcre-jit \
--with-ipv6 \
--add-module=/root/modsecurity \
--add-module=/root/ngx_pagespeed-1.12.34.2-beta ${PS_NGX_EXTRA_FLAGS} \
--add-module=/root/headers-more-nginx
But I am getting the following error:
configure: error: unrecognized option: `--user=www-data'
If I try removing that option then the next option will give the exact same.
Does anyone know what I am doing wrong here?
Thanks!
Strangely I managed to fix it by removing the following:
--add-module=/root/modsecurity \

Compile Nginx with module from source in Centos error

./configure --prefix=/usr/local/nginx --sbin-path=/usr/local/sbin/nginx --conf-path=/etc/nginx/nginx.conf--error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_image_filter_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-debug
objs/ngx_modules.o \
-lpthread -lcrypt -lpcre -lssl -lcrypto -ldl -lz -lGeoIP
make[1]: Leaving directory `/tmp/nginx-1.8.0'
make -f objs/Makefile manpage
make[1]: Entering directory `/tmp/nginx-1.8.0'
sed -e "s|%%PREFIX%%|/usr/local/nginx|" \
-e "s|%%PID_PATH%%|/var/run/nginx.pid|" \
-e "s|%%CONF_PATH%%|/etc/nginx/nginx.conf|" \
-e "s|%%ERROR_LOG_PATH%%|/var/log/nginx/error.log|" \
< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory `/tmp/nginx-1.8.0'
Why show error compiled? How fixed? Thank you. OS: Centos 6.5. ; Source Nginx compile 1.8
Here Is full log
http://pastebin.com/zVgurAig

Resources