Re: Getting started guide && ./src/configure.sh

Tom Herbert <[email protected]> Tue, 11 Nov 2025 11:07:51 -0800
Newsgroups dev.linux.lists.xdp2
Message-ID <CALx6S37Hy-=9q262EmSqPC_Gny76i_r7gjeTO2buPYfrYf1qjw@mail.gmail.com>
On Tue, Nov 11, 2025 at 10:45=E2=80=AFAM dave seddon <dave.seddon.ca@gmail.=
com> wrote:
>
> Thanks Tom!
>
> Sorry, I know this must have been time consuming.  That's great the
> way you split it up.  I'll try for smaller commits going forward.
>
> I just cloned "main" branch and retested
> - Ubuntu24 ( cd src; ./conigure.sh; make clean; make; make install ) work=
s
> - Ubuntu25 ( cd src; ./conigure.sh; make clean; make; make install ) work=
s
> - Fedora42 ( make[2]: *** [Makefile:37: parsers/parser_big.p.c]
> Segmentation fault (core dumped) ) - Which I know how to resolve
>
> Do the samples work for you?

Did you intend to add samples in the sample directory or just the README?

Tom

>
>
> On Mon, Nov 10, 2025 at 3:46=E2=80=AFPM Tom Herbert <[email protected]>=
 wrote:
> >
> > Hi Dave,
> >
> > I pushed your pull request. There were quite a bit of nice changes so
> > I broke it up into eighteen patches. Please take a look when you have
> > a chance.
> >
> > Tom
> >
> > On Sat, Nov 8, 2025 at 6:09=E2=80=AFPM dave seddon <dave.seddon.ca@gmai=
l.com> wrote:
> > >
> > > Woot woot!  Ok, "make" and "make install" works on fedora42!  I made
> > > some improvements to configure.sh, so I'll update the pull request
> > >
> > > ------------
> > > xdp2 installed into directory: /home/das/xdp2/src/../install/x86_64
> > > das@fedora42:~/xdp2/src$ cat /etc/fedora-release
> > > Fedora release 42 (Adams)
> > > ------------
> > >
> > > Not working on Fedora 43 still, but fedora 43 has python 3.14, rather
> > > than 3.13.9 on fedora 42.  I've found that when stracing
> > > parser_big.p.c does get written.  Without strace, it seems to
> > > something python related causing the segfault.
> > >
> > > Anyway, big progress!
> > >
> > > On Fri, Nov 7, 2025 at 5:33=E2=80=AFPM dave seddon <dave.seddon.ca@gm=
ail.com> wrote:
> > > >
> > > > G'day,
> > > >
> > > > Some good news.  Using configure.sh, xdp2 compiles and installs
> > > > happily on the latest Ubuntu 25.10 server.
> > > >
> > > > It turns out that on Ubuntu 25.10, the un-versioned and versioned
> > > > packages are the same.  e.g. llvm20 is the default
> > > >
> > > > Ubuntu 25.10 using llvm ( no version )
> > > > -------------
> > > > das@ubuntu2510-no-nix:~/xdp2/src$ ./configure.sh
> > > > Platform is default
> > > > Architecture is x86_64
> > > > Architecture includes for x86_64 not found, using generic
> > > > Target Architecture is
> > > > COMPILER is gcc
> > > > LLVM_VER:20.1.8
> > > > HOST_LLVM_CONFIG:/usr/bin/llvm-config-20
> > > > XDP2_CLANG_VERSION=3D20.1.8
> > > > XDP2_C_INCLUDE_PATH=3D/usr/lib/llvm-20/lib/clang/20/include
> > > > XDP2_CLANG_RESOURCE_PATH=3D/usr/lib/llvm-20/lib/clang/20
> > > >
> > > > xdp2 installed into directory: /home/das/xdp2/src/../install/x86_64
> > > >          <--- make install completes happily
> > > > das@ubuntu2510-no-version:~/xdp2/src$
> > > > -------------
> > > >
> > > > Ubuntu 25.10 using llvm20
> > > > -------------
> > > > xdp2 installed into directory: /home/das/xdp2/src/../install/x86_64
> > > >          <--- make install completes happily
> > > > das@ubuntu2510-no-nix:~/xdp2/src$
> > > > -------------
> > > >
> > > > This is nice, because Ubuntu 25.10 has a much newer kernel and lots=
 of
> > > > newer packages.  ( 25.10 also has a lot more of the new Rust stuff.
> > > > E.g. Rust sudo, and they screwed up "date" )
> > > > -------------
> > > > das@ubuntu2510-no-nix:~/xdp2/src$ uname -a
> > > > Linux ubuntu2510-no-nix 6.17.0-6-generic #6-Ubuntu SMP PREEMPT_DYNA=
MIC
> > > > Tue Oct  7 13:34:17 UTC 2025 x86_64 GNU/Linux
> > > > -------------
> > > >
> > > >
> > > >
> > > > The [less good] other news is that I also tried Fedora 42 and 43 (l=
atest).
> > > >
> > > > This command installs packages to satisfy the configure step
> > > > -------------
> > > > sudo dnf install -y \
> > > >   gcc gcc-c++ make cmake ninja-build pkgconf-pkg-config bison flex =
\
> > > >   boost-devel libpcap-devel python3-scapy graphviz \
> > > >   elfutils-libelf-devel libbpf-devel bpftool \
> > > >   llvm llvm-devel clang clang-libs clang-devel clang-tools-extra ll=
d \
> > > >   python3-devel \
> > > >   kernel-devel kernel-headers kernel-tools perf
> > > > -------------
> > > >
> > > > However, both end up with segfault.  This is the very same segfault
> > > > that's occurring with the "nix develop" environment.
> > > > -------------
> > > > das@fedora43:~/xdp2/src$ make
> > > >
> > > > tools
> > > > include/xdp2gen/llvm/patterns.h2... ok (mixed Cpp1/Cpp2, Cpp2 code
> > > > passes safety checks)
> > > >
> > > > include/xdp2gen/ast-consumer/patterns.h2... ok (mixed Cpp1/Cpp2, Cp=
p2
> > > > code passes safety checks)
> > > >
> > > >     CXX      src/main.o
> > > >     CXX      src/template.o
> > > >     EMBED    ../../templates/xdp2/c_def.cpp
> > > >     CXX      ../../templates/xdp2/c_def.o
> > > >     EMBED    ../../templates/xdp2/xdp_def.cpp
> > > >     CXX      ../../templates/xdp2/xdp_def.o
> > > >     EMBED    ../../templates/xdp2/common_parser.cpp
> > > >     CXX      ../../templates/xdp2/common_parser.o
> > > >
> > > > include
> > > >     MACROGEN _pmacro_gen.h
> > > >     TBL_INC  _stable.h
> > > >     TBL_INC  _dtable.h
> > > >
> > > > lib
> > > >     CC       cli.o
> > > >     AR       libcli.a
> > > >     CC       siphash.o
> > > >     CC       libsiphash.so
> > > >     AR       libsiphash.a
> > > >     CC       crc16.o
> > > >     CC       crc32c.o
> > > >     CC       crc64.o
> > > >     CC       crcspeed.o
> > > >     CC       libcrc.so
> > > >     AR       libcrc.a
> > > >     CC       flow_dissector.o
> > > >     AR       libflowdis.a
> > > >     CC       lzf_compress.o
> > > >     CC       lzf_decompress.o
> > > >     CC       liblzf_compress.so
> > > >     AR       liblzf_compress.a
> > > >     CC       liblzf_decompress.so
> > > >     AR       liblzf_decompress.a
> > > >     CC       murmur3_hash.o
> > > >     CC       libmurmur3hash.so
> > > >     AR       libmurmur3hash.a
> > > >     CC       vstruct.o
> > > >     CC       timer.o
> > > >     CC       cli.o
> > > >     CC       pcap.o
> > > >     CC       packets_helpers.o
> > > >     CC       dtable.o
> > > >     CC       obj_allocator.o
> > > >     CC       pvbuf.o
> > > >     CC       pvpkt.o
> > > >     CC       config_functions.o
> > > >     CC       parser.o
> > > >     CC       accelerator.o
> > > >     CC       locks.o
> > > > make[2]: *** [Makefile:37: parsers/parser_big.p.c] Segmentation fau=
lt
> > > > (core dumped)            <---- Doh!!
> > > > make[1]: *** [Makefile:11: xdp2] Error 2
> > > > make: *** [Makefile:77: all] Error 2
> > > > das@fedora43:~/xdp2/src$
> > > > -------------
> > > >
> > > > -------------
> > > > ..
> > > >     CC       locks.o
> > > > make[2]: *** [Makefile:37: parsers/parser_big.p.c] Segmentation fau=
lt
> > > > (core dumped)
> > > > make[1]: *** [Makefile:11: xdp2] Error 2
> > > > make: *** [Makefile:77: all] Error 2
> > > > das@fedora42:~/xdp2/src$
> > > > -------------
> > > >
> > > > This actually makes me a little bit happy, because maybe this rules
> > > > out NixOS?  More likely, there's something that is required, which
> > > > configure isn't checking for, and whatever it is gets installed
> > > > somehow on Ubuntu, but not on Fedora or NixOS.  This is a great clu=
e.
> > > >
> > > > ... ok, that's enough fun for the day!  Happy Friday
> > > >
> > > > Thanks,
> > > > Dave
> > > >
> > > >
> > > > On Fri, Nov 7, 2025 at 10:41=E2=80=AFAM dave seddon <dave.seddon.ca=
@gmail.com> wrote:
> > > > >
> > > > > G'day,
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Please let me know if the issue with the samples is between my se=
at
> > > > > and keyboard :)  I could easily be doing something silly
> > > > >
> > > > > Yes, agreed automated testing is needed. - I could use some guida=
nce
> > > > > on roughly what the automated tests should do, beyond just a comp=
lete
> > > > > re-compile, and running samples.
> > > > >
> > > > > Thanks,
> > > > > Dave
> > > > >
> > > > > On Fri, Nov 7, 2025 at 7:53=E2=80=AFAM Tom Herbert <tom@herbertla=
nd.com> wrote:
> > > > > >
> > > > > > On Thu, Nov 6, 2025 at 5:29=E2=80=AFPM dave seddon <dave.seddon=
[email protected]> wrote:
> > > > > > >
> > > > > > > G'day,
> > > > > > >
> > > > > > > I hope you are doing well
> > > > > > >
> > > > > > > Very exciting to see the Ultra Ethernet protocols being added=
!
> > > > > > >
> > > > > > > However, I suspect unintended "challenges" were introduced si=
nce the
> > > > > > > flake.nix was added.
> > > > > > >
> > > > > > > Upon review, I found that actually xdp2 was no longer working=
 on
> > > > > > > ubuntu without nix.
> > > > > > >
> > > > > > > This pull request:
> > > > > > >
> > > > > > > - Adds a getting started guide ( note - sample compiles chall=
enges persist )
> > > > > > > - Adds an experimental ./src/configure.sh designed as an alte=
rnative
> > > > > > > to the existing ./src/configure
> > > > > > > ./src/configure creates a config.mk that works on Ubuntu ( no=
 nix )
> > > > > > > using llvm or llvm20. ( The getting started guide explains th=
at Ubuntu
> > > > > > > package naming makes supporting different llvm versions trick=
y.
> > > > > > > configure.sh hopefully handles this correctly now. )
> > > > > > > - ./src/configure.sh has extensive --debug_level 7 logging
> > > > > > > - ./src/configure.sh modifies the test cpp code to support ll=
vm 18 and 20
> > > > > > > - Updates various Makefiles to allow the make variables to be=
 passed,
> > > > > > > so -j$(nproc) works
> > > > > > > - Enforces dependencies, so the builds work with -j$(nproc)
> > > > > > >
> > > > > > > This has been tested with ubuntu24.0.4.3 ( no nix ) using llv=
m and
> > > > > > > llvm20, but I strongly encourage more testing
> > > > > >
> > > > > > Thanks Dave, I'll look at that.
> > > > > >
> > > > > > Also, it's clear we're going to need a nightly test suite soone=
r than later.
> > > > > >
> > > > > > Tom
> > > > > >
> > > > > > >
> > > > > > > Happy to discuss
> > > > > > >
> > > > > > > I'm going to keep working on the flake.nix, because it's brok=
en, and
> > > > > > > this pull request marks the files as such
> > > > > > >
> > > > > > > https://github.com/xdp2-dev/xdp2/pull/11
> > > > > > >
> > > > > > > --
> > > > > > > Regards,
> > > > > > > Dave Seddon
> > > > > > > +1 415 857 5102
> > > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Regards,
> > > > > Dave Seddon
> > > > > +1 415 857 5102
> > > >
> > > >
> > > >
> > > > --
> > > > Regards,
> > > > Dave Seddon
> > > > +1 415 857 5102
> > >
> > >
> > >
> > > --
> > > Regards,
> > > Dave Seddon
> > > +1 415 857 5102
>
>
>
> --
> Regards,
> Dave Seddon
> +1 415 857 5102