-
-
Notifications
You must be signed in to change notification settings - Fork 513
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
zlib name clashes since #1142 #1176
Comments
Related question: how does the check for We had a similar issue with name clashes and At present I see two options:
My preference right now is to avoid namespacing, but I think it could work either way. |
That's a shame multiple libraries are subverting zlib symbol management by using the symbols directly instead of including the headers.
There isn't a check for it. Without specifying custom settings when building
Thanks for providing examples on where namespacing causes issues. What if we namespaced the symbols, but outside of |
/* confdefs.h stuff above */
char zlibVersion (void);
int
main (void)
{
return zlibVersion ();
;
return 0;
} The above snippet does not include
I was trying something like this before, but it was not comprehensive. It can be done better now that we know the different constraints to balance. |
This would be greatly appreciated as I ended up having some test failures with @ahgamut I can't do it immediately, but longer term I'm up to make the wrapper lib so maintaining a copy of cosmo's/chrome's zlib in or for superconfigure won't be necessary. |
Since #1142
Perl includes vendored zlib in
Compress-Raw-Zlib
and attempts build and link it in. In attempt to avoid name clashes,Compress-Raw-Zlib
applies Z_PREFIXPerl_crz_
, but unfortunately some symbols fall through the cracks, see below.For APPerl it's easy enough for me to patch Perl's
Compress-Raw-Zlib
to use cosmo's zlib asCompress-Raw-Zlib
allows building the Perl module with existing zlib or from source. However, I'd prefer if we reverted 5488f0b as I think there's likely other existing software that doesn't expect zlib to already be linked in. Either way, to save space, I'm going to setCompress-Raw-Zlib
to use cosmo's zlib, but namespacing the symbols probably allows more software to build out of the box. The only downside I'm seeing is that naive cosmocc builds may include multiple versions of zlib, which can occur anyways if they have their own properly namespaced zlib. Are there any examples of existing software that uses zlib that is dependent on zlib using non-namespaced symbol names (so it couldn't be configured to use cosmo's namespaced zlib)?cc @ahgamut
with Perl 5.36 included
Compress-Raw-Zlib
with
Compress-Raw-Zlib-2.212
released April 2024:The text was updated successfully, but these errors were encountered: