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

Build fails on dns.h / dns.c with gcc-13.2.0 #229

Open
jnorrid opened this issue Mar 19, 2024 · 5 comments
Open

Build fails on dns.h / dns.c with gcc-13.2.0 #229

jnorrid opened this issue Mar 19, 2024 · 5 comments

Comments

@jnorrid
Copy link

jnorrid commented Mar 19, 2024

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.

@barracuda156
Copy link

Fails on macOS likewise:

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);
      |                                               ^~~~~~~~
  CC       libdill_la-prefix.lo
make[1]: *** [libdill_la-ipaddr.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_libdill/libdill/work/libdill-2.14'
make: *** [all-recursive] Error 1

@mjolk
Copy link
Contributor

mjolk commented Jul 19, 2024

weird this was fixed a long time ago with #197
i'm on gcc (GCC) 14.1.1 and it compiles fine.

@barracuda156
Copy link

@mjolk Well, I can try it with gcc-14 and share a log, if it fails.

@mjolk
Copy link
Contributor

mjolk commented Jul 20, 2024

@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

@barracuda156
Copy link

@mjolk Well, because the last release does not include it. Time to make a new release, finally, which will be buildable.

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