<cert.h>
<nss3/cert.h>
#ifdef LINUX
#ifdef __GLIBC__
Perhaps this should be done with configure instead of GLIBC define.
@codehotter You might find that configure is adding nss3 into the include path, which is why the sources use cert.h not nss3/cert.h.
I'm also not sure about the ifdef linux to glibc change, because of the (potential) to build on freebsd which requires a distinction for those platform features. It could be better to determine why on alpine linux is not defined as true?
On alpine linux is defined as true, however, alpine uses musl which does not support mallopt. Since freebsd uses glibc but also does not support mallopt, that just further confirms that the glibc define is not the proper solution.
Perhaps ./configure could check for mallopt and it should be behind a mallopt ifdef instead. I'll try to see if I can get that to work. I will also test if it then builds on alpine, freebsd and fedora.
I'm not sure if I understand your nss3 comment. Do you support the change to include cert.h instead of nss3/cert.h, since configure is already adding nss3 to the include path? On alpine the include path is /usr/include/nss, which is why it breaks if we hardcode nss3 in the source.
@codehotter Okay, so how about we make that "if linux && glibc" then around mallopt?
@mhonek What do you think about the nss3/cert.h change here?
(I'll defer to people to who know more about this than me :) )
The NSS path issue also occurs on Debian-based systems, since cert.h exists in /use/include/nss. Note that this needs to be fixed in two places in the codebase.
@firstyear Where is cert.h for you?
/usr/include/nss3/cert.h is the location on SUSE.
If it's an issue on debian that it's in /usr/include/nss then I think changing this to "nss3/cert.h" would break debian, because we need to -I the /usr/include/nss[3] into our configure process, so I think that changing this to and fixing our -I path is the right option here. I'd still like @mhonek's feedback though.
@firstyear Changing to (with no preceding path) is the correct fix. The recent pkg-config changes automatically generate the correct include path for nss.
pkg-config
I think this change should be a separate pull request.
For the record, the <cert.h> issue was fixed in Hugh's PR #50352, commit 06c9f53 in master.
I'm not sure about the LINUX vs. __GLIBC__. @codehotter what do you think about the William's proposal above?:
LINUX
__GLIBC__
The proper fix for this might be to check for it directly with configure, but that simple fix would certainly solve the problem for me.
So maybe we should rebase this ontop of #50352 (which is now master) and re-asses if more changes are needed around cert.h? Is that okay?
@codehotter Is this still an issue?
I've become much less enamored with alpine in general in the meantime, so I'm happy to close this, although I suspect some configure fix or ifdefs would still be necessary to make this work on alpine.
Sure. I'll close it and we can revive if there are requests. Currently I think the containerisation efforts are mainly driven by myself which means they'll be suse based, and that seems to be working today.
Pull-Request has been closed by firstyear
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This pull request has been cloned to Github as issue and is available here: - https://github.com/389ds/389-ds-base/issues/3394
If you want to continue to work on the PR, please navigate to the github issue, download the patch from the attachments and file a new pull request.
Thank you for understanding. We apologize for all inconvenience.
Pull-Request has been closed by spichugi
<cert.h>instead of<nss3/cert.h>- pkgconfig will pick up the proper include path#ifdef LINUXinto#ifdef __GLIBC__for malloc options so that we can build on musl