xdp-project / xdp-tools

Utilities and example programs for use with XDP
Other
599 stars 129 forks source link

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

Open LinArcX opened 6 months ago

LinArcX commented 6 months ago

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
tohojo commented 6 months ago

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.

LinArcX commented 5 months ago

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?

tohojo commented 5 months ago

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