-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fatal error: 'stdatomic.h' file not found #9059
Comments
For the case where there is no stdatomic.h header but Atomic works, does it still build fine without including the header? |
If so, then we could just do this: diff --git a/lib/easy_lock.h b/lib/easy_lock.h
index 07c85c5ff..174c0222c 100644
--- a/lib/easy_lock.h
+++ b/lib/easy_lock.h
@@ -33,11 +33,13 @@
#define curl_simple_lock_lock(m) AcquireSRWLockExclusive(m)
#define curl_simple_lock_unlock(m) ReleaseSRWLockExclusive(m)
#elif defined (HAVE_ATOMIC)
+#ifdef HAVE_STDATOMIC_H
#include <stdatomic.h>
+#endif
#if defined(HAVE_SCHED_YIELD)
#include <sched.h>
#endif
#define curl_simple_lock atomic_bool
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index ec406f56a..80bc4ca3c 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -6584,10 +6584,11 @@ AC_DEFUN([CURL_ATOMIC],[
],[
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(HAVE_ATOMIC, 1,
[Define to 1 if you have _Atomic support.])
tst_atomic="yes"
+ AC_CHECK_HEADERS(stdatomic.h)
],[
AC_MSG_RESULT([no])
tst_atomic="no"
])
]) |
I suppose it's not likely to work without the header since we use |
... and only set HAVE_ATOMIC if that exists Reported-by: Ryan Schmidt Fixes #9059
Yeah, |
yeah, I figured that out as well, so in the #9060 PR, configure will only set |
I have tried building libCurl 7.84.0 in AIX 7.2 using XLC 16.1.0 , but we facing issue, while running gmake:
while in configure step we saw: I tried with the fix provided in #9060 |
@Vibhanshu09 can you please try the current git master, and if that still doesn't work file a new issue for your case? |
Thank you for the help. I tried with latest main branch, which is working fine. Can you please provide me Estimated date for official release of 7.85.0. |
I did this
Compile curl
I expected the following
Successful compile
curl/libcurl version
7.84.0
operating system
OS X 10.8
Xcode 5.1.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
OS X 10.9
Xcode 6.2
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
https://build.macports.org/builders/ports-10.8_x86_64-builder/builds/95200/steps/install-port/logs/stdio
https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/193386/steps/install-port/logs/stdio
So the problem seems to be that it checks if
_Atomic
is available, and, if so, it assumes stdatomic.h is available, which is evidently not the case on all systems.On Mac OS X 10.7 there is no problem because
checking if _Atomic is available... no
On OS X 10.10 this problem doesn't occur because stdatomic.h exists (but a different problem occurs; see #9058)
The text was updated successfully, but these errors were encountered: