I am trying to cross-compile Nginx for Armv7l. See the followings steps already done (following this tutorial mainly Nginx for arm)
Step 1
./configure --without-pcre --without-http_rewrite_module --without-http_gzip_module
Step 2
make
Step 3
vi objs/Makefile
Replace
CC = cc
toCC = arm-linux-gcc
Step 4
find . -name "*.o" | xargs rm -f
Step 5
make
Step 6
My binary file "nginx" is available in objs/nginx.
Command file
gives the following result
objs/nginx: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.28, not stripped
Step 7
Copy this binary nginx inside
/sbin
on my arm machine and use the commandsh /sbin/nginx
nginx: line 1: syntax error: word unexpected (expecting ")")
I cannot find any help on internet. What does that error mean ? Is my file corrupted ? Should I copy the whole objs
folder or only the binary as I did ?
Is there an already compiled version of nginx for armv7l (I did not find one) ?