#2427 closed defect (invalid)

failed when compiling nginx with boringssl

Reported by: Cirooo@… Owned by:
Priority: blocker Milestone: nginx-1.23
Component: http/3 Version: 1.23.x
Keywords: configure compile install Cc:
uname -a: root
nginx -V: not properly.

Description

Ubuntu 22.04
I followed the guide from https://quic.nginx.org/readme.html to compile nginx with quic.
But it failed with not found error:
bash: --with-cc-opt=-I/../boringssl/include: No such file or directory
folders like these:
nginx source folder
/root/nginxCompileFolder/nginx-quic # git clone

/root/nginxCompileFolder/boringssl #git clone
boringssl is already compiled. there're file/folders as below.
API-CONVENTIONS.md CMakeLists.txt decrepit go.sum OpenSSLConfig.cmake SANDBOXING.md third_party
BREAKING-CHANGES.md codereview.settings fuzz include PORTING.md sources.cmake tool
build CONTRIBUTING.md FUZZING.md INCORPORATING.md README.md ssl util
BUILDING.md crypto go.mod LICENSE rust STYLE.md

it's already built.

then I launch the script under nginx-quic folder.
./auto/configure --with-debug --with-http_v3_module --with-stream_quic_module \

--with-openssl="/usr/bin/openssl"
--with-cc-opt="-I../boringssl/include" \
--with-ld-opt="-L../boringssl/build/ssl \

-L../boringssl/build/crypto"

bash: --with-cc-opt=-I/../boringssl/include: No such file or directory

I tried to change the parameter around -with-cc-opt and --with-ld-opt for different path such as /root/nginxCompileFolder/boringssl/include or ../../boringssl/include or ../../../boringssl/include . They are all not found.
How to fix this?

Change History (1)

comment:1 by Maxim Dounin, 15 months ago

Resolution: invalid
Status: newclosed

The link you've referenced says to use the following command:

./auto/configure --with-debug --with-http_v3_module         \
                 --with-cc-opt="-I../boringssl/include"     \
                 --with-ld-opt="-L../boringssl/build/ssl    \
                                -L../boringssl/build/crypto"

Note that there are no --with-openssl= parameter, it is not needed and will break things. Note well that the command uses line continuation, \, to make it possible to write the command in multiple lines. If unsure how to use line continuation properly, just use a single line command, e.g.:

./auto/configure --with-debug --with-http_v3_module --with-cc-opt="-I../boringssl/include" --with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto"

If you need further help with compiling nginx, please use support options available. Hope this helps.

Note: See TracTickets for help on using tickets.