Skip to content

Commit

Permalink
utils_netperf: bypass compilation failure
Browse files Browse the repository at this point in the history
Starting from gcc 14.0, implicit function declarations are treated
as errors by default [1], which caused the following failure been
observed during the compilation.

> netlib.c:2343:9: error: implicit declaration of function ...
> ...
> make[3]: *** [Makefile:454: netlib.o] Error 1

One contributor has already sent a PR [2] to fix the issue to the
netperf upstream, however, it has not been merged yet since a year
ago. At the moment, let's just bypass this issue, while waiting
for a regular fix to be done.

References:
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91092
[2] HewlettPackard/netperf#74

Signed-off-by: Xu Han <[email protected]>
  • Loading branch information
luckyh committed Jun 17, 2024
1 parent f1f84d7 commit 6b6f372
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virttest/utils_netperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def pack_compile(self, compile_option=""):
np_build = build_type.get(build_arch, build_arch).strip()
setup_cmd = (
"./autogen.sh > /dev/null 2>&1 &&"
# Workaround for gcc >= 14.0
" CFLAGS=-Wno-implicit-function-declaration"
" ./configure --build=%s %s > /dev/null 2>&1" % (np_build, compile_option)
)
setup_cmd += " && make > /dev/null 2>&1"
Expand Down

0 comments on commit 6b6f372

Please sign in to comment.