Closed rskennedy closed 6 years ago
This should be added to the DPDK issue queue, or simply added into the DPDK source (which I'm sure @rskennedy has already done).
@rskennedy Can you please explain how exactly you have solved this compilation error? Where have you added -D_GNU_SOURCE
flag?
@m-peko Within composite, a good place to add -D_GNU_SOURCE
would be the CFLAGS because this makefile affects every component.
If you are thinking of another system, adding this flag to a top-level makefile would most likely solve the problem.
@rskennedy Thanks for a response. I added it and it solved my problem.
@rskennedy This is likely something that we should add to the system, right? Should we add it in CFLAGS
, or should we add it locally in a component's Makefile as CFLAGS += -D_GNU_SOURCE
?
In attempting to compile DPDK with musl libc, we came across this compilation error (simplified) for various files:
This error occurs because
rte_lcore.h
expects a type to be defined insched.h
., butgcc
can't find it. The solution we found was to define gnu source by passing-D_GNU_SOURCE
.This problem seemed to be related to compilation for musl-libc, so it may appear in other parts of composite.