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

dave seddon <[email protected]> Sat, 8 Nov 2025 18:09:37 -0800
Newsgroups dev.linux.lists.xdp2
Message-ID <CANypexT9uH-wADJkM50ExZFvM-6jXs9STxU7gDgKkUjYYaeXbg@mail.gmail.com>
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 <[email protected]=
m> 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_DYNAMIC
> 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 (latest)=
.
>
> 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 lld \
>   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, Cpp2
> 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 fault
> (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 fault
> (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 clue.
>
> ... 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 seat
> > and keyboard :)  I could easily be doing something silly
> >
> > Yes, agreed automated testing is needed. - I could use some guidance
> > on roughly what the automated tests should do, beyond just a complete
> > re-compile, and running samples.
> >
> > Thanks,
> > Dave
> >
> > On Fri, Nov 7, 2025 at 7:53=E2=80=AFAM Tom Herbert <[email protected]=
> wrote:
> > >
> > > On Thu, Nov 6, 2025 at 5:29=E2=80=AFPM dave seddon <dave.seddon.ca@gm=
ail.com> 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 since th=
e
> > > > 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 challenges =
persist )
> > > > - Adds an experimental ./src/configure.sh designed as an alternativ=
e
> > > > 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 that Ubu=
ntu
> > > > package naming makes supporting different llvm versions tricky.
> > > > 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 llvm 18 =
and 20
> > > > - Updates various Makefiles to allow the make variables to be passe=
d,
> > > > 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 llvm 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 sooner than=
 later.
> > >
> > > Tom
> > >
> > > >
> > > > Happy to discuss
> > > >
> > > > I'm going to keep working on the flake.nix, because it's broken, an=
d
> > > > 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



--=20
Regards,
Dave Seddon
+1 415 857 5102