acassen / keepalived

Keepalived
https://www.keepalived.org
GNU General Public License v2.0
4.02k stars 736 forks source link

Install linux-headers pkg to build in Docker #2501

Closed rmartin16 closed 2 weeks ago

rmartin16 commented 2 weeks ago

Avoids this error when building on Alpine in Docker:

9.540 configure: error: Missing/unusable kernel header file <linux/types.h> - is kernel headers package installed?

Of course, this still requires you comment out #include <linux/if_ether.h> first.

rmartin16 commented 2 weeks ago

hmm...looking at some of the history, it seems like these musl headers have been problematic before:

I'm not sure I understand all this enough to know what's best....

Furthermore, to your point in #2499 about opening an issue for musl, I did some Google searching and this seems to have been a well-known issue for over ten years. Their recommendation seems to be "don't include both headers"...

At any rate, I cannot build master in Docker without this patch. The only other solution I can imagine is to switch the precedence of the headers and defer to netinet instead....but I really don't know...

pqarmitage commented 2 weeks ago

glibc has worked hard over the last few years to resolve the issue of which header files can and cannot be included together, and in what order, and my understanding is that they have solved all the problems. It is a shame that musl seem not to be interesting in doing likewise, although I may be maligning them.