-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
lib: fix unity builds with BearSSL, MSH3, Quiche, OmniOS #14932
Conversation
Proposing it for 8.10.1. |
f6f1b56
to
f403724
Compare
|
In "unity" all code ends up in a single source, making it catch more symbol clashes and mixups. IOW it raises the risk for clashes when using non-namespaced local symbols because the namespace is filled with all the symbols used by libcurl, not just those pulled into an individual source file. Then, depending on the order of define/declare and use, it causes a redefinition issue, or messes up the user code that comes after the definition/declaration. I think what happens here is that
edit: The issue would have surfaced earlier if the OmniOS job used cmake, but it happens to use autotools, so it only surfaced when unity mode arrived to autotools. |
Analysis of PR #14932 at f4037249: Test 301 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Test 306 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Test 300 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Test 304 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Test 309 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Test 325 failed, which has NOT been flaky recently, so there could be a real issue in the PR. Test 303 failed, which has NOT been flaky recently, so there could be a real issue in the PR. There are more failures, but that's enough from Gha. Generated by Testclutch |
``` In file included from ../../lib/urldata.h:197, from ../../lib/altsvc.c:32, from libcurlall.c:2: ../../lib/cf-socket.h:55:25: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token 55 | #define sa_addr _sa_ex_u.addr | ^ In file included from ../../lib/urldata.h:197, from ../../lib/altsvc.c:32, from libcurlall.c:2: ../../lib/cf-socket.h:55:25: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token 55 | #define sa_addr _sa_ex_u.addr | ^ ``` Ref: https://github.com/curl/curl/actions/runs/10738314933/job/29781644299?pr=14772#step:3:6115
f403724
to
3900d68
Compare
- fix MSH3 static symbol clash. - fix Quiche static symbol clash. - fix local macro clash with BearSSL header. - fix local macro clash with OmniOS system header. ``` In file included from ../../lib/urldata.h:197, from ../../lib/altsvc.c:32, from libcurlall.c:2: ../../lib/cf-socket.h:55:25: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token 55 | #define sa_addr _sa_ex_u.addr | ^ In file included from ../../lib/urldata.h:197, from ../../lib/altsvc.c:32, from libcurlall.c:2: ../../lib/cf-socket.h:55:25: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token 55 | #define sa_addr _sa_ex_u.addr | ^ ``` Ref: https://github.com/curl/curl/actions/runs/10738314933/job/29781644299?pr=14772#step:3:6115 Discovered while adding support for "unity" builds for autotools. Required-by: curl#14922 Cherry-picked from curl#14815 Closes curl#14932
Discovered while adding support for "unity" builds for autotools.
Required-by: #14922
Cherry-picked from #14815
w/o whitespace: https://github.com/curl/curl/pull/14932/files?w=1