xdp-project / xdp-tools

Utilities and example programs for use with XDP
Other
661 stars 144 forks source link

error: llc: xdp-dispatcher.ll:410:54: error: unterminated attribute group #405

Closed NobinPegasus closed 8 months ago

NobinPegasus commented 8 months ago

When I try to install xdp-tools I get the following error:

pegasus@pegasus:~/Documents/xdp-tools$ make

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:410:54: error: unterminated attribute group
attributes #0 = { nofree noinline norecurse nounwind memory(inaccessiblemem: readwrite) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
                                                     ^
make[2]: *** [Makefile:139: xdp-dispatcher.o] Error 1
make[1]: *** [Makefile:20: libxdp] Error 2
make: *** [Makefile:31: lib] Error 2
tohojo commented 8 months ago

NobinPegasus @.***> writes:

When I try to install xdp-tools I get the following error:


***@***.***:~/Documents/xdp-tools$ make

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:410:54: error: unterminated attribute group
attributes #0 = { nofree noinline norecurse nounwind memory(inaccessiblemem: readwrite) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }

Errors from LLC usually appear when there's a version mismatch between llc and clang. Probably the configure script picked up wrong versions of one of them? You can look in config.mk to see which binaries are being used, and to change them you can pass explicit versions to configure like:

LLC=llc-16 CLANG=clang-16 ./configure

NobinPegasus commented 8 months ago

Thanks matching the llc and clang version solved the issue.