Welcome! Log In Create A New Profile

Advanced

[PATCH] Fix compile error in configure script

Edgar Bonet
May 16, 2024 05:26AM
# HG changeset patch
# User Edgar Bonet <bonet@grenoble.cnrs.fr>
# Date 1715850910 -7200
# Thu May 16 11:15:10 2024 +0200
# Node ID c2c3b0d74b1a7d3f967421c72760b5c573afcd81
# Parent 89093b003fcb54c7f8dc66042f17bc4dea4e7709
Fix compile error in configure script

Building with GCC 14 fails at the configure step with:

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

The error is not caused by a missing library, but by an unrelated
"incompatible pointer type" error in 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]

Fix the error by using the correct pointer types.

Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>

diff -r 89093b003fcb -r c2c3b0d74b1a auto/lib/libatomic/conf
--- a/auto/lib/libatomic/conf Fri May 03 20:26:05 2024 +0400
+++ b/auto/lib/libatomic/conf Thu May 16 11:15:10 2024 +0200
@@ -19,7 +19,7 @@
#include <atomic_ops.h>"
ngx_feature_path=
ngx_feature_libs="-latomic_ops"
- ngx_feature_test="long n = 0;
+ ngx_feature_test="AO_t n = 0;
if (!AO_compare_and_swap(&n, 0, 1))
return 1;
if (AO_fetch_and_add(&n, 1) != 1)
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Fix compile error in configure script

Edgar Bonet 230 May 16, 2024 05:26AM

Re: [PATCH] Fix compile error in configure script

Sergey Kandaurov 49 May 17, 2024 01:44PM

Re: [PATCH] Fix compile error in configure script

Edgar Bonet 54 May 17, 2024 03:28PM

Re: [PATCH] Fix compile error in configure script

Edgar Bonet 56 May 18, 2024 08:46AM

Re: [PATCH] Fix compile error in configure script

Sergey Kandaurov 49 May 20, 2024 04:22PM

Re: [PATCH] Fix compile error in configure script

Edgar Bonet 75 May 20, 2024 04:52PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 192
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready