[Buildroot] Nginx fails to build with GCC 14

Edgar Bonet bonet at grenoble.cnrs.fr
Tue May 14 20:28:31 UTC 2024


Hello all!

Building nginx with GCC 14 fails at the configure step with:

    ./configure: error: libatomic_ops library was not found.

Steps to reproduce:

    git checkout 9764258aaf0e  # master as of 2024-05-14
    make clean
    make defconfig
    utils/config --enable GCC_VERSION_14_X
    utils/config --enable PACKAGE_NGINX
    make olddefconfig
    make

If the option GCC_VERSION_14_X is omitted (we then default to GCC 13),
the build succeeds.

Looking at output/build/nginx-1.24.0/objs/autoconf.err, it appears the
error is not caused by a missing library, but by an unrelated
“incompatible pointer type” error on the test program:

    ...
    checking for atomic_ops library
    objs/autotest.c: In function 'main':
    objs/autotest.c:9:48: error: passing argument 1 of 'AO_compare_and_swap' from incompatible pointer type [-Wincompatible-pointer-types]

I did not dig this much further. However, I noticed that the file
package/nginx/nginx.mk contains this comment:

    # disable external libatomic_ops because its detection fails.

which makes me wonder why ./configure is probing for the library anyway.

Regards,

Edgar Bonet.



More information about the buildroot mailing list