Closed DavidAntliff closed 2 months ago
This seems to work, but I have no idea if it's a good idea or not:
$ sudo ln -s /usr/include/x86_64-linux-gnu/asm /usr/include/asm
Refer https://github.com/openwrt/openwrt/issues/12239#issuecomment-2285252245
However, I've since learned that installing gcc-multilib
creates this symlink:
$ sudo apt-get install gcc-multilib
$ ls -l /usr/include/asm
lrwxrwxrwx 1 root root 20 Aug 5 2021 /usr/include/asm -> x86_64-linux-gnu/asm
This means the full set of packages I needed to install, for Ubuntu 22.04, is:
$ sudo apt-get install \
linux-headers-$(uname -r) \
clang \
llvm \
libelf-dev \
libpcap-dev \
build-essential \
libc6-dev-i386 \
gcc-multilib
Hope this helps someone down the line.
sorry just saw this. closing as it appears resolved, thanks
My only suggestion would be to have this project’s getting started docs point to the xdp-tutorial’s dependency install docs, as it wasn’t clear to me initially how to build this project. Unlike most Rust projects, this one has quite a few non-cargo-managed dependencies. The symlink issue is just an Ubuntu quirk, perhaps.
good idea. will do that some time this week when I fix the clippy errors. thanks for the help!
I am attempting to build 85b1f5ebf1661c680306fad4904889f25050be55 on an Ubuntu 22.04 with kernel 6.5.0-45-generic.
I figured that
xdp-tutorial
setup dependencies was the closest thing to the dependencies I might need for this project, so I installed everything I needed to successfully./configure && make
that project.Then, returning to this project:
I see this is referring to
/usr/include/linux/
rather than a path related to the current kernel, like/usr/src/linux-headers-6.5.0-45-generic/
. There is noasm/types.h
anywhere in this tree.asm/types.h
does occur under/usr/src/linux-headers-6.5.0-45-generic/
(owned by packagelinux-headers-6.5.0-45-generic
) as/usr/src/linux-headers-6.5.0-45-generic/arch/x86/include/generated/uapi/asm/types.h
. This matches my kernel version.I'm at a bit of a loss as to how to satisfy this project's need for
asm/types.h
, as the named file simply doesn't exist in my/usr/include/linux
directory (owned by packagelinux-libc-dev:amd64
). Apparently, this directory has special significance for system libraries, and should not be used for general "compile against current kernel headers" tasks, but I don't know if this applies to this project.What's the right way to fix this, please?