xdp-tools icon indicating copy to clipboard operation
xdp-tools copied to clipboard

llc: error: llc: xdp-dispatcher.ll:10:40: error: expected type

Open LinArcX opened this issue 2 years ago • 3 comments

Hello, i want to build libxdp on my wsl machine(Debian bullseye), but i get this error during make:

↳ make libxdp

lib

  libbpf
    CC       libbpf/src/libbpf.a
    INSTALL  libbpf/src/libbpf.a

  libxdp
    CC       staticobjs/libxdp.o
    CC       staticobjs/xsk.o
    M4       xdp-dispatcher.c
    CLANG    xdp-dispatcher.o
    LLC      xdp-dispatcher.o
llc: error: llc: xdp-dispatcher.ll:10:40: error: expected type
@dispatcher_version = dso_local global ptr null, section "xdp_metadata", align 8, !dbg !21
                                       ^
make[2]: *** [Makefile:139: xdp-dispatcher.o] Error 1
make[1]: *** [Makefile:20: libxdp] Error 2
make: *** [Makefile:34: libxdp] Error 2

LinArcX avatar Jan 03 '24 08:01 LinArcX

LinArcX @.***> writes:

Hello, i want to build libxdp on my wsl machine(Debian bullseye), but i get this error during make:

↳ make libxdp

lib

  libbpf
    CC       libbpf/src/libbpf.a
    INSTALL  libbpf/src/libbpf.a

  libxdp
    CC       staticobjs/libxdp.o
    CC       staticobjs/xsk.o
    M4       xdp-dispatcher.c
    CLANG    xdp-dispatcher.o
    LLC      xdp-dispatcher.o
llc: error: llc: xdp-dispatcher.ll:10:40: error: expected type
@dispatcher_version = dso_local global ptr null, section "xdp_metadata", align 8, !dbg !21
                                       ^
make[2]: *** [Makefile:139: xdp-dispatcher.o] Error 1
make[1]: *** [Makefile:20: libxdp] Error 2
make: *** [Makefile:34: libxdp] Error 2

This usually happens when there's a mismatch between clang and llc versions. Please check if they are the same (you can see the exact binaries used in 'config.mk', and you can pass custom versions as environment variables to the configure script.

tohojo avatar Jan 03 '24 11:01 tohojo

I think my wsl is messed up. i tried it on a real debian and it's working now. a question. how to build library in debug version?

LinArcX avatar Jan 15 '24 08:01 LinArcX

LinArcX @.***> writes:

I think my wsl is messed up. i tried it on a real debian and it's working now. a question. how to build library in debug version?

It's built in debug mode by default, unless you pass PRODUCTION=1 to configure as an envvar

tohojo avatar Jan 15 '24 11:01 tohojo