Skip to content

quic: fixup duplicate static function name (for cmake unity) - #13332

Closed
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:fixup-static-func-collision
Closed

quic: fixup duplicate static function name (for cmake unity)#13332
vszakats wants to merge 1 commit into
curl:masterfrom
vszakats:fixup-static-func-collision

Conversation

@vszakats

@vszakats vszakats commented Apr 10, 2024

Copy link
Copy Markdown
Member

Visible in daily curl-for-win builds:
https://github.com/curl/curl-for-win/actions/runs/8621925870

lib/vquic/curl_ngtcp2.c:1916:12: error: redefinition of 'ossl_new_session_cb'
static int ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
           ^
lib/vtls/openssl.c:2978:12: note: previous definition is here
static int ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
           ^

https://github.com/curl/curl-for-win/actions/runs/8621925870/job/23631885439#step:3:6965

Follow-up to 3210101 #13172
Closes #13332

@vszakats vszakats added build cmake HTTP/3 h3 or quic related labels Apr 10, 2024
@vszakats

vszakats commented Apr 10, 2024

Copy link
Copy Markdown
Member Author

CMake Unity builds break when reusing a static function (or other symbol)
name between source files.

What would be a good long-term solution to avoid this?

I can add a complete curl-for-win build as part of the curl CI. It would be
another option to start using CMake more in existing or new CI jobs, and
enable Unity mode in them. It'd be useful to have at least one such job
building with HTTP/2 + HTTP/3 as this is where the issue has been
reoccuring.

/cc @bagder @icing

@vszakats vszakats changed the title quic: fixup duplicate static function name quic: fixup duplicate static function name (for cmake unity) Apr 10, 2024
Visible in daily curl-for-win builds:
https://github.com/curl/curl-for-win/actions/runs/8621925870

```
lib/vquic/curl_ngtcp2.c:1916:12: error: redefinition of 'ossl_new_session_cb'
static int ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
           ^
lib/vtls/openssl.c:2978:12: note: previous definition is here
static int ossl_new_session_cb(SSL *ssl, SSL_SESSION *ssl_sessionid)
           ^
```
https://github.com/curl/curl-for-win/actions/runs/8621925870/job/23631885439#step:3:6965

Closes #xxxxx
@vszakats
vszakats force-pushed the fixup-static-func-collision branch from 35bebd1 to 317a3db Compare April 10, 2024 08:26
@vszakats

Copy link
Copy Markdown
Member Author

Bringing curl-for-win to curl CI in this PR: #13335

@vszakats vszakats closed this in 4f15443 Apr 10, 2024
@vszakats
vszakats deleted the fixup-static-func-collision branch April 10, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build cmake HTTP/3 h3 or quic related

Development

Successfully merging this pull request may close these issues.

1 participant