OLSR / OONF

OLSR.org Network Framework - olsrd v2 / DLEP
55 stars 35 forks source link

Build failing due to DNS library with GCC >9.0 #30

Open aJunk opened 4 years ago

aJunk commented 4 years ago

When compiling with GCC 10 dns_rr_i_init() in _include/oonf/generic/dnsquery/dns.h:527 throws "lvalue required as unary '&' operand".

Apparently this code working was a bug as it should have been an r-value (see here and here).

There was a workaroung for GCC > 9.0 in another project here. However, I just (very quickly) tried doing the same for version 10 which did not work.

The same issue cropped up in several projects I found including GnuPG. They seem to have fixed it for them. Maybe their solution can be used here as well. (link to the official repo, history in github mirror)

PolynomialDivision commented 3 years ago

which branch? we deploy some patchset for olsrd2 in the openwrt-routing feed.

fredleb commented 3 years ago

Same here when trying to compile the "develop" branch:

In file included from /home/jenkins/dev/OONF/src/generic/dns_query/dns.c:89:
/home/jenkins/dev/OONF/src/generic/dns_query/dns.c: In function 'dns_ai_nextent':
/home/jenkins/dev/OONF/include/oonf/generic/dns_query/dns.h:527:16: error: lvalue required as unary '&' operand
  527 |  dns_rr_i_init(&dns_quietinit((struct dns_rr_i){ 0, __VA_ARGS__ }), (P))
aJunk commented 3 years ago

I am sorry for the late reply, I did not see the message.

which branch?

The develop branch was the one i tried it with. I added a couple of "extern"s to some declaration (see pull request) and then I notices the problem I described above.

we deploy some patchset for olsrd2 in the openwrt-routing feed.

That is great news! Do you know how long it has been there? Because I believe I started trying to compile it as a colleague of mine from FunkFeuer in Vienna had trouble with the (at the time) current version, which we needed. I can not remember the specifics unfortunately.

mathiashro commented 2 years ago

Hello @aJunk, are we good to move on closing the case? There were also some recent compile error resolutions, may be your issue is now solved.