Skip to content

Fix gcc15 stricter check for headers #281

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mikelolasagasti
Copy link

This patch has been required since Fedora-42 adopted GCC15.

Signed-off-by: Mikel Olasagasti Uranga <[email protected]>
@thegushi
Copy link
Collaborator

thegushi commented May 5, 2025

Heyo, what platform did you test this on? I'm not sure how it would play on some of the other "special" platforms.

@mikelolasagasti
Copy link
Author

Patch was required for Fedora 42, but it's been applied also to F41, F40, EPEL10 & EPEL9.

The best solution would be to rely on pkgconfig if libspf2 would provide it, but it's not the case.

@futatuki
Copy link

futatuki commented May 6, 2025

With https://github.com/shevek/libspf2/tree/d14abff4b544cfc53a8b5ef54cbc2353866b5081 (master at 2025-05-06), doing ./configure --prefix=/foo and then doing make install then spf.h will be installed as /foo/include/spf2/spf.h.

So the difference between without this change and with it, is only difference of the argment of --with-spf2-include we should pass on doing configure of OpenDMARC. For example, in the example above we shoud pass --with-spf2-include=/foo/include --with-spf2-lib=/foo/lib if the patch applied otherwise --with-spf2-include=/foo/include/spf2 --with-spf2-lib=/foo/lib.

I don't think this is related to gcc15.

@futatuki
Copy link

futatuki commented May 7, 2025

So the difference between without this change and with it, is only difference of the argment of --with-spf2-include we should pass on doing configure of OpenDMARC. For example, in the example above we shoud pass --with-spf2-include=/foo/include --with-spf2-lib=/foo/lib if the patch applied otherwise --with-spf2-include=/foo/include/spf2 --with-spf2-lib=/foo/lib.

My bad, it is incorrect. It affects the result of the configure: in the formar case, it adds '-I /foo/include' to CFLAGS in Makefile, and in the later case, it adds '-I /foo/include/spf2'. More over with this patch, with './configure --with-spf -with-spf2-include=/foo/include --with-spf2-lib=/foo/lib' brings build error:

libtool: compile:  cc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -DCONFIG_BASE=\"/usr/local/etc\" -I /foo/include -g -O2 -MT opendmarc_dns.lo -MD -MP -MF .deps/opendmarc_dns.Tpo -c opendmarc_dns.c  -fPIC -DPIC -o .libs/opendmarc_dns.o
In file included from opendmarc_dns.c:16:
./opendmarc_internal.h:251:10: fatal error: 'spf.h' file not found
  251 | #include "spf.h"
      |          ^~~~~~~
1 error generated.
*** Error code 1

(I'm using FreeBSD 14.2 for confirmation, however, I believe this is generic problem on C compiler driver which support -I option)

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

Successfully merging this pull request may close these issues.

3 participants