Opened 4 years ago

Closed 4 years ago

Last modified 17 months ago

#2152 closed defect (fixed)

compile error on armv7 (Raspberry Pi) quic branch

Reported by: DoM1niC@… Owned by: vl
Priority: critical Milestone:
Component: nginx-core Version: 1.19.x
Keywords: QUIC Cc:
uname -a: Linux cryexx 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux
nginx -V: 1.19.9

Description

NGINX QUIC branch
x64 works

BoringSSL -> master

cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/hom                                                                                                                                                             e/storage/compile/NGINX/src/boringssl-master/include -I src/core -I src/event -I                                                                                                                                                              src/event/modules -I src/event/quic -I src/os/unix -I /home/storage/compile/NGI                                                                                                                                                             NX/src/nginx-http-flv-module-master -I /usr/include/libxml2 -I objs \
        -o objs/src/event/ngx_event_openssl_stapling.o \
        src/event/ngx_event_openssl_stapling.c
src/core/ngx_bpf.c: In function 'ngx_bpf_load_program':
src/core/ngx_bpf.c:48:20: error: cast from pointer to integer of different size                                                                                                                                                              [-Werror=pointer-to-int-cast]
   48 |     attr.license = (uint64_t) program->license;
      |                    ^
src/core/ngx_bpf.c:50:18: error: cast from pointer to integer of different size                                                                                                                                                              [-Werror=pointer-to-int-cast]
   50 |     attr.insns = (uint64_t) program->ins;
      |                  ^
src/core/ngx_bpf.c: In function 'ngx_bpf_map_update':
src/core/ngx_bpf.c:109:16: error: cast from pointer to integer of different size                                                                                                                                                              [-Werror=pointer-to-int-cast]
  109 |     attr.key = (uint64_t) key;
      |                ^
src/core/ngx_bpf.c:110:18: error: cast from pointer to integer of different size                                                                                                                                                              [-Werror=pointer-to-int-cast]
  110 |     attr.value = (uint64_t) value;
      |                  ^
src/core/ngx_bpf.c: In function 'ngx_bpf_map_delete':
src/core/ngx_bpf.c:125:16: error: cast from pointer to integer of different size                                                                                                                                                              [-Werror=pointer-to-int-cast]
  125 |     attr.key = (uint64_t) key;
      |                ^
src/core/ngx_bpf.c: In function 'ngx_bpf_map_lookup':
src/core/ngx_bpf.c:139:16: error: cast from pointer to integer of different size                                                                                                                                                              [-Werror=pointer-to-int-cast]
  139 |     attr.key = (uint64_t) key;
      |                ^
src/core/ngx_bpf.c:140:18: error: cast from pointer to integer of different size                                                                                                                                                              [-Werror=pointer-to-int-cast]
  140 |     attr.value = (uint64_t) value;
      |                  ^
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1065: objs/src/core/ngx_bpf.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/storage/compile/NGINX/src/nginx-quic'
make: *** [Makefile:10: build] Error 2

Command

# Build BoringSSL
echo "Compile BoringSSL"
cd "$COMPILE_DIR/src/boringssl-master"
mkdir build 
cd $COMPILE_DIR/src/boringssl-master/build
cmake ..
make -j$THREADS

# Make an .openssl directory for nginx and then symlink BoringSSL's include directory tree
mkdir -p "$COMPILE_DIR/src/boringssl-master/.openssl/lib"
cd "$COMPILE_DIR/src/boringssl-master/.openssl"
ln -s ../include include

# Copy the BoringSSL crypto libraries to .openssl/lib so nginx can find them
cd "$COMPILE_DIR/src/boringssl-master"
cp "build/crypto/libcrypto.a" ".openssl/lib"
cp "build/ssl/libssl.a" ".openssl/lib"
echo "Compile NGINX"
cd $COMPILE_DIR/src/nginx-quic
./auto/configure \
--with-http_stub_status_module --with-http_v3_module --with-http_quic_module --with-stream_quic_module --with-stream --with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-http_xslt_module --with-http_realip_module --with-http_auth_request_module \
--with-cc-opt="-I$COMPILE_DIR/src/boringssl-master/include" --with-ld-opt="-L$COMPILE_DIR/src/boringssl-master/build/ssl  -L$COMPILE_DIR/src/boringssl-master/build/crypto"
# Fix "Error 127" during build
touch "$COMPILE_DIR/src/boringssl-master/.openssl/include/openssl/ssl.h"

make -j$THREADS

Change History (3)

comment:1 by vl, 4 years ago

Owner: set to vl
Status: newassigned

comment:2 by vl, 4 years ago

Component: documentationnginx-core
Keywords: QUIC added
Resolution: fixed
Status: assignedclosed

comment:3 by Vladimir Homutov <vl@…>, 17 months ago

In 8722:7a07724256c2/nginx:

Core: fixed build with BPF on non-64bit platforms (ticket #2152).

Note: See TracTickets for help on using tickets.