Skip to content
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

explicit_bzero() compatibility function symbol exported in library #647

Closed
mledford opened this issue Dec 23, 2020 · 3 comments
Closed

explicit_bzero() compatibility function symbol exported in library #647

mledford opened this issue Dec 23, 2020 · 3 comments

Comments

@mledford
Copy link

mledford commented Dec 23, 2020

While trying to compile Postgresql 13.1 using libressl 3.2.3 as the ssl library on macOS 11 (Big Sur) I discovered that Postgresql's configure thought that macOS has the explicit_bzero() function. This was confusing as macOS 11 does not ship with this function. Looking further into how Postgresql's configure script determines if explicit_bzero() exists on a system it looks like it creates the a program with a call to the function and then tries to compile and link that program. It appears that explicit_bzero() is exported in the libcrypto global symbol table which caused configure to think that it is supported. Later when the headers couldn't be found and the function not defined the compile failed. For now I'm having to hack the configure script to get things to compile but I would rather not.

I think that only API interface functions should be exported if at all possible.

Thank you for all the great work everyone puts into this project!

@busterb
Copy link
Contributor

busterb commented Jan 3, 2021

Thanks, I'll see if we can just directly link libcompat.a into libssl as well and avoid exporting the symbol, though it also sounds like Postgresql's configure script aught to unset LDFLAGS when doing the test as well.

A possible complication post-fix could be Apple appears to still ship 2.8.3 with macOS Big Sur, so I'm not sure when they might pick up the fix at the OS level, but this should help if folks like yourself are using newer versions.

@ryandesign
Copy link

This also causes kerberos5 to fail to build for the same reason.

https://trac.macports.org/ticket/66601

@busterb
Copy link
Contributor

busterb commented Jul 5, 2023

We no longer ship with the compatibility functions exported from libcrypto, instead statically linking them in directly, since 3.7.1 or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants