Re: xdp2 on ubuntu-24.04.3-live-server-amd64?

Tom Herbert <[email protected]> Fri, 26 Sep 2025 17:53:35 -0700
Newsgroups dev.linux.lists.xdp2
Message-ID <CALx6S365fQmYh5QiaXDdRKhoJ4Jfu02p6uYQhTCs6ShHrFQuMQ@mail.gmail.com>
On Fri, Sep 26, 2025 at 5:47=E2=80=AFPM dave seddon <[email protected]=
om> wrote:
>
> Ha! Indeed. I have a version of configure that has significantly more out=
put. ( I removed all the pipes to null, which allowed me to get miles 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/CompilerIns=
tance.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 installed.  You g=
uys must be developing on another distro?  I'm really just looking to under=
stand 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]> wrote:
>>
>> On Fri, Sep 26, 2025 at 5:08=E2=80=AFPM dave seddon <dave.seddon.ca@gmai=
l.com> 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 -> libclan=
g-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 -> libclan=
g-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 under
>> 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 much differ=
ence
>> >
>> > 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/ | grep 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 -> libclan=
g-18.so.18