Re: xdp2 on ubuntu-24.04.3-live-server-amd64?
Tom Herbert <[email protected]> Sat, 27 Sep 2025 11:26:09 -0700
| Newsgroups | dev.linux.lists.xdp2 |
|---|---|
| Message-ID | <CALx6S366J9DoGe_6peEUeLH_o9riJdx0cOZ5OQuqhX_zRwQ88A@mail.gmail.com> |
On Sat, Sep 27, 2025 at 8:50=E2=80=AFAM dave seddon <[email protected]= om> wrote: > > Yes! This way I can work out how it works on ubuntu and will get it > working with nix > > prerequisites > https://github.com/xdp2-dev/xdp2/pull/3 > > check_scapy() > https://github.com/xdp2-dev/xdp2/pull/4 Thanks! I merged the pull requests. Tom > > On Sat, Sep 27, 2025 at 7:50=E2=80=AFAM Tom Herbert <[email protected]>= wrote: > > > > So did you get it working then? > > > > On Sat, Sep 27, 2025, 7:34=E2=80=AFAM dave seddon <dave.seddon.ca@gmail= .com> wrote: > >> > >> Oh. And then "make" needs scapy, so you need to do "sudo apt install > >> python3-scapy". Maybe configure should check for scapy? > >> > >> On Sat, Sep 27, 2025 at 7:25=E2=80=AFAM dave seddon <dave.seddon.ca@gm= ail.com> wrote: > >> > > >> > I added the extra packages "clang-tools libclang-dev llvm-dev " > >> > > >> > The full set of packages is now "build-essential gcc-multilib > >> > pkg-config bison flex libboost-all-dev libpcap-dev graphviz libelf-d= ev > >> > clang clang-tools libclang-dev llvm llvm-dev libbpf-dev > >> > linux-tools-$(uname -r)" > >> > > >> > das@ubuntu2404:~/xdp2/src$ ./configure > >> > > >> > > >> > Platform is default > >> > Architecture is x86_64 > >> > Architecture includes for x86_64 not found, using generic > >> > Target Architecture is > >> > COMPILER is gcc > >> > XDP2_CLANG_VERSION=3D18.1.3 > >> > XDP2_C_INCLUDE_PATH=3D/usr/lib/llvm-18/lib/clang/18/include > >> > XDP2_CLANG_RESOURCE_PATH=3D/usr/lib/llvm-18/lib/clang/18 > >> > > >> > das@ubuntu2404:~/xdp2/src$ > >> > > >> > On Fri, Sep 26, 2025 at 5:53=E2=80=AFPM Tom Herbert <tom@herbertland= .com> wrote: > >> > > > >> > > On Fri, Sep 26, 2025 at 5:47=E2=80=AFPM dave seddon <dave.seddon.c= [email protected]> wrote: > >> > > > > >> > > > Ha! Indeed. I have a version of configure that has significantly= more output. ( I removed all the pipes to null, which allowed me to get mi= les past this in my nix version. ) > >> > > > > >> > > > > >> > > > > >> > > > das@ubuntu2404:~/xdp2/src$ cp configure old.configure > >> > > > > >> > > > das@ubuntu2404:~/xdp2/src$ diff -u ./configure ./old.configure > >> > > > --- ./configure 2025-09-27 00:40:29.837033843 +0000 > >> > > > +++ ./old.configure 2025-09-27 00:38:51.186921865 +0000 > >> > > > @@ -163,7 +163,7 @@ > >> > > > } > >> > > > EOF > >> > > > $HOST_CXX -o $TMPDIR/clang_lib $TMPDIR/clang_lib.cpp = \ > >> > > > - `$HOST_LLVM_CONFIG --ldflags --cxxflags= ` -lclang -lLLVM -lclang-cpp > >> > > > + `$HOST_LLVM_CONFIG --ldflags --cxxflags= ` -lclang -lLLVM -lclang-cpp > /dev/null 2>&1 > >> > > > case $? in > >> > > > 0) ;; > >> > > > *) echo Clang library missing or broken\! 1= >&2 > >> > > > das@ubuntu2404:~/xdp2/src$ > >> > > > > >> > > > das@ubuntu2404:~/xdp2/src$ ./configure > >> > > > > >> > > > > >> > > > Platform is default > >> > > > Architecture is x86_64 > >> > > > Architecture includes for x86_64 not found, using generic > >> > > > Target Architecture is > >> > > > COMPILER is gcc > >> > > > config.SNTIAl/clang_lib.cpp:1:10: fatal error: clang/Frontend/Co= mpilerInstance.h: No such file or directory > >> > > > 1 | #include <clang/Frontend/CompilerInstance.h> > >> > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > >> > > > compilation terminated. > >> > > > Clang library missing or broken! > >> > > > das@ubuntu2404:~/xdp2/src$ > >> > > > > >> > > > > >> > > > I'm just using a little kvm VM with the base ubuntu LTS installe= d. You guys must be developing on another distro? I'm really just looking= to understand the versions of things that work, so I can nix-ify this. > >> > > > >> > > Did you Google it? Here's what I got: > >> > > https://stackoverflow.com/questions/20363082/working-with-clang-in= -c > >> > > > >> > > Tom > >> > > > >> > > > > >> > > > On Fri, Sep 26, 2025, 17:26 Tom Herbert <[email protected]> wr= ote: > >> > > >> > >> > > >> On Fri, Sep 26, 2025 at 5:08=E2=80=AFPM dave seddon <dave.seddo= [email protected]> wrote: > >> > > >> > > >> > > >> > I hope I'm not doing something silly > >> > > >> > > >> > > >> > das@ubuntu2404:/usr/lib/llvm-18/lib$ ls -la | grep libclang > >> > > >> > lrwxrwxrwx 1 root root 40 May 27 2024 libclang-18.so.= 1 -> > >> > > >> > ../../x86_64-linux-gnu/libclang-18.so.18 > >> > > >> > lrwxrwxrwx 1 root root 40 May 27 2024 libclang-18.so.= 18 -> > >> > > >> > ../../x86_64-linux-gnu/libclang-18.so.18 > >> > > >> > -rw-r--r-- 1 root root 64796088 May 27 2024 libclang-cpp.so= .18.1 > >> > > >> > lrwxrwxrwx 1 root root 17 May 27 2024 libclang.so.1 -= > libclang-18.so.18 > >> > > >> > > >> > > >> > das@ubuntu2404:/usr/lib/llvm-18/lib$ sudo ln -s libclang-cpp.= so.18.1 > >> > > >> > libclang-cpp.so > >> > > >> > > >> > > >> > das@ubuntu2404:/usr/lib/llvm-18/lib$ ls -la | grep libclang > >> > > >> > lrwxrwxrwx 1 root root 40 May 27 2024 libclang-18.so.= 1 -> > >> > > >> > ../../x86_64-linux-gnu/libclang-18.so.18 > >> > > >> > lrwxrwxrwx 1 root root 40 May 27 2024 libclang-18.so.= 18 -> > >> > > >> > ../../x86_64-linux-gnu/libclang-18.so.18 > >> > > >> > lrwxrwxrwx 1 root root 20 Sep 27 00:01 libclang-cpp.so= -> > >> > > >> > libclang-cpp.so.18.1 > >> > > >> > -rw-r--r-- 1 root root 64796088 May 27 2024 libclang-cpp.so= .18.1 > >> > > >> > lrwxrwxrwx 1 root root 17 May 27 2024 libclang.so.1 -= > libclang-18.so.18 > >> > > >> > das@ubuntu2404:/usr/lib/llvm-18/lib$ > >> > > >> > > >> > > >> > das@ubuntu2404:~$ cd xdp2/src/ > >> > > >> > das@ubuntu2404:~/xdp2/src$ ./configure > >> > > >> > > >> > > >> > > >> > > >> > Platform is default > >> > > >> > Architecture is x86_64 > >> > > >> > Architecture includes for x86_64 not found, using generic > >> > > >> > Target Architecture is > >> > > >> > COMPILER is gcc > >> > > >> > Clang library missing or broken! > >> > > >> > >> > > >> Unfortunately, we've done too good of a job hiding output from = the > >> > > >> user :-(. Can you edit configure script and the build line unde= r > >> > > >> check_clang_lib: > >> > > >> > >> > > >> $HOST_CXX -o $TMPDIR/clang_lib $TMPDIR/clang_lib.cpp \ > >> > > >> `$HOST_LLVM_CONFIG --ldflags --cxxflags` -lclang -lLLVM -lclang= -cpp > > >> > > >> /dev/null 2>&1 > >> > > >> > >> > > >> to > >> > > >> > >> > > >> $HOST_CXX -o $TMPDIR/clang_lib $TMPDIR/clang_lib.cpp \ > >> > > >> `$HOST_LLVM_CONFIG --ldflags --cxxflags` -lclang -lLLVM -lclang= -cpp > >> > > >> > >> > > >> That should give the error causing the failure > >> > > >> > >> > > >> Tom > >> > > >> > >> > > >> > >> > > >> > das@ubuntu2404:~/xdp2/src$ > >> > > >> > > >> > > >> > > >> > > >> > Also tried this, although I'm not sure the full path makes mu= ch difference > >> > > >> > > >> > > >> > das@ubuntu2404:/usr/lib/llvm-18/lib$ sudo ln -s > >> > > >> > /usr/lib/llvm-18/lib/libclang-cpp.so.18.1 > >> > > >> > /usr/lib/llvm-18/lib/libclang-cpp.so > >> > > >> > > >> > > >> > das@ubuntu2404:~/xdp2/src$ ls -la /usr/lib/llvm-18/lib/ | gre= p clang > >> > > >> > drwxr-xr-x 3 root root 4096 Sep 26 23:59 clang > >> > > >> > lrwxrwxrwx 1 root root 40 May 27 2024 libclang-18.so.= 1 -> > >> > > >> > ../../x86_64-linux-gnu/libclang-18.so.18 > >> > > >> > lrwxrwxrwx 1 root root 40 May 27 2024 libclang-18.so.= 18 -> > >> > > >> > ../../x86_64-linux-gnu/libclang-18.so.18 > >> > > >> > lrwxrwxrwx 1 root root 41 Sep 27 00:06 libclang-cpp.so= -> > >> > > >> > /usr/lib/llvm-18/lib/libclang-cpp.so.18.1 > >> > > >> > -rw-r--r-- 1 root root 64796088 May 27 2024 libclang-cpp.so= .18.1 > >> > > >> > lrwxrwxrwx 1 root root 17 May 27 2024 libclang.so.1 -= > libclang-18.so.18 > >> > > >> > > >> > > >> > -- > >> > Regards, > >> > Dave Seddon > >> > +1 415 857 5102 > >> > >> > >> > >> -- > >> Regards, > >> Dave Seddon > >> +1 415 857 5102 > > > > -- > Regards, > Dave Seddon > +1 415 857 5102