-
Notifications
You must be signed in to change notification settings - Fork 8
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
Compilation error #1
Comments
This belongs here, although knowing your compiler version may help. |
gcc --version reports: Following your link, it looks like the error is actually the bug listed at wahern/dns#33 , with a fix described at wahern/dns#35 , but that project hasn't been updated in years. Maybe one of the forks at https://github.com/wahern/dns/network/members would work as a replacement? |
Good find. I will take a look at the forks. If we find a fixed fork, I'll consider updating and committing a local version of libdill to this repo. The most important thing here is that it builds and works, less important that we get upstream updates if any. |
This fork works with |
Thanks @jvdp1, I prefer this PR which should work with all versions: wahern/dns#35. The one you list fixes GCC 9, but breaks the others (see sustrik/libdill#197 (comment)). I will wait to see if dns.c gets fixed in libdill master (we still have about a month before the book enters production). If not, I will commit the latest libdill into this repo and apply the patched dns.c, and fix the text to not download the libdill from its website. |
I ran in the same issue today with GCC 9.3.0 (on Windows WSL). PR wahern/dns#35 hasn't been merged yet but PR sustrik/libdill#197 has (which fixes it for me). Unfortunately the release packages haven't been updated and also the procedure to compile libdill seems to have changed (automake and libtool). For others running into this, I compiled libdill by cloning the master and following the description here: http://libdill.org/faq.html#how-can-i-access-the-source-code. Then the tcp-client-server worked. |
I got the same issue. Using |
While attempting to compile in Fedora 31:
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[2]: *** [Makefile:1785: libdill_la-ipaddr.lo] Error 1
make[2]: Leaving directory '/hd-c/Downloads/tcp-client-server/libdill-2.14'
make[1]: *** [Makefile:1926: all-recursive] Error 1
make[1]: Leaving directory '/hd-c/Downloads/tcp-client-server/libdill-2.14'
make: *** [Makefile:21: libdill.a] Error 2
The text was updated successfully, but these errors were encountered: