Skip to content
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

Cannot build Pktgen on Ubuntu 24.04 LTS #271

Open
MathewColin opened this issue Jul 10, 2024 · 7 comments
Open

Cannot build Pktgen on Ubuntu 24.04 LTS #271

MathewColin opened this issue Jul 10, 2024 · 7 comments

Comments

@MathewColin
Copy link

Hello,

I installed DPDK 24.03 and I can run the sample testpmd app without any problems.
However, when I try to build Pktgen 24.07.0 I get the following error:

FAILED: lib/utils/libutils.a.p/_atoip.c.o
cc -Ilib/utils/libutils.a.p -Ilib/utils -I../lib/utils -Ilib/common -I../lib/common -I/usr/local/include -I/usr/include/x86_64-linux-gnu -I/usr/include/libnl3 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -Werror -O3 -march=native -mavx -mavx2 -DALLOW_EXPERIMENTAL_API -D_GNU_SOURCE -Wno-pedantic -Wno-format-truncation -fPIC -include rte_config.h -march=native -mrtm -MD -MQ lib/utils/libutils.a.p/_atoip.c.o -MF lib/utils/libutils.a.p/_atoip.c.o.d -o lib/utils/libutils.a.p/_atoip.c.o -c ../lib/utils/_atoip.c
In function ‘inet_ipton6’,
    inlined from ‘inet_ipton’ at ../lib/utils/_atoip.c:213:16,
    inlined from ‘_atoip’ at ../lib/utils/_atoip.c:271:16:
../lib/utils/_atoip.c:185:27: error: writing 32 bytes into a region of size 0 [-Werror=stringop-overflow=]
  185 |             endp[-i]      = colonp[n - i];
      |             ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
../lib/utils/_atoip.c: In function ‘_atoip’:
../lib/utils/_atoip.c:105:19: note: at offset [-2147483600, -16] into destination object ‘tmp’ of size 16
  105 |     unsigned char tmp[RTE_IN6ADDRSZ], *tp = 0, *endp = 0, *colonp = 0;
      | 

I am using gcc 13.2.0

Any advice on how can i solve this issue?

Thank you in advance!

@dosarudaniel
Copy link

+1

@KeithWiles
Copy link
Collaborator

KeithWiles commented Jul 10, 2024

Pktgen builds in my machine.
DPDK 24.07.0-rc1
Pktgen 24.07.0
GCC (Ubuntu 13.2.0-23ubuntu4) 13.2.0
Ubuntu 24.04 LTS

@dosarudaniel
Copy link

dosarudaniel commented Jul 10, 2024

I have tried as well with the exact versions mentioned by you, I still have the same error..

What about your ninja and meson version?
We have:

$ meson -v
1.3.2
$ ninja --version
1.11.1

Attaching here the entire build output:
build_output.txt

@KeithWiles
Copy link
Collaborator

KeithWiles commented Jul 10, 2024

I have the same versions. I would not expect meson and ninja to cause a compile error.

@mp1-bvd
Copy link

mp1-bvd commented Aug 8, 2024

Same compile error Debian 12 on gcc 12.2.0. switching to gcc 11.30 resolved and was able to compile and use pktgen.

@KeithWiles
Copy link
Collaborator

Interesting I am using GCC 13.2.0 and it works, not sure why 12.12.0 is not working and 11.30 is working. :-(

@mp1-bvd
Copy link

mp1-bvd commented Aug 20, 2024

was also able to work around this problem on default debian gcc-12 by lowering the default optimization level from 3 to 2 via 'meson setup builddir -Doptimization=2'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants