-
Notifications
You must be signed in to change notification settings - Fork 164
Build fails on dns.h / dns.c with gcc-13.2.0 #229
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
Comments
Fails on macOS likewise:
|
weird this was fixed a long time ago with #197 |
@mjolk Well, I can try it with gcc-14 and share a log, if it fails. |
@barracuda156 i can clearly see in the posted stuff that you do not have the changes of the PR I referenced, check the source you're compiling from. edit: ok i see what's going on, you're compiling from latest tag, you should compile from master |
@mjolk Well, because the last release does not include it. Time to make a new release, finally, which will be buildable. |
fyi to compile with gcc you now need to add "-std=gnu17" (or anything before gnu23) to CFLAGS , with "-std=gnu23" which is the standard now it will fail on variadic (pointer) functions. Cleaning this up to fix this is a lot of fiddling with function prototypes and casts? |
@mjolk gcc14 defaults to C++17 (at least at 14.2.0), but if gcc15 defaults to C++23, then manual flag will be needed. I can try, I have a recent pre-release snapshot of gcc15 built. |
@barracuda156 yeah this issue is only with gcc 15, lower versions use std=gnu17 by default |
I am running Ubuntu 23.10 and gcc-13.2.0.
When I attempt to build libdill from source using:
$ ./autogen.sh
$ ./configure
$ make
the build halts with the following error(s):
CC libdill_la-ipaddr.lo
In file included from ipaddr.c:44:
ipaddr.c: In function 'dill_ipaddr_remotes':
dns/dns.h:1009:24: error: lvalue required as unary '&' operand
1009 | #define dns_opts(...) (&dns_quietinit((struct dns_options)DNS_OPTS_INIT(VA_ARGS)))
| ^
ipaddr.c:335:47: note: in expansion of macro 'dns_opts'
335 | dill_dns_hosts, dill_dns_hints, NULL, dns_opts(), &rc);
| ^~~~~~~~
make[1]: *** [Makefile:1855: libdill_la-ipaddr.lo] Error 1
make[1]: Leaving directory '/home/jnorrid/data/wip/libdill/libdill-2.14'
make: *** [Makefile:1996: all-recursive] Error 1
Is this due to a change in compiler behavior with the newer gcc?
I read about dns_quietinit in the "COMPILER ANNOTATIONS" section of dns/dns.h but have not been able to identify a solution.
The text was updated successfully, but these errors were encountered: