Open invent360 opened 1 year ago
It looks like you're trying to cross compile, see https://aya-rs.dev/book/aya/crosscompile/
thanks @alessandrod for your prompt reply, sorry i forgot to mention my system architecture. I am using an Apple M1 Pro (Chip). arch cmd outputs arm64
I had the following errors after scaffolding an example application following the instructions in the documentation https://aya-rs.dev/book/start/development/#prerequisites.
When i ran the command:
cargo xtask run -- -h
error[E0432]: unresolved imports
libc::nlattr,
libc::nlmsgerr,
libc::nlmsghdr,
libc::sockaddr_nl,
libc::AF_NETLINK,
libc::ETH_P_ALL,
libc::IFLA_XDP,
libc::NETLINK_EXT_ACK,
libc::NETLINK_ROUTE,
libc::NLA_ALIGNTO,
libc::NLA_F_NESTED,
libc::NLA_TYPE_MASK,
libc::NLMSG_DONE,
libc::NLMSG_ERROR,
libc::NLM_F_ACK,
libc::NLM_F_CREATE,
libc::NLM_F_DUMP,
libc::NLM_F_ECHO,
libc::NLM_F_EXCL,
libc::NLM_F_MULTI,
libc::NLM_F_REQUEST,
libc::RTM_DELTFILTER,
libc::RTM_GETTFILTER,
libc::RTM_NEWQDISC,
libc::RTM_NEWTFILTER,
libc::RTM_SETLINK,
libc::SOL_NETLINK` --> /Users/sockaddr_nl
in the rootnlmsghdr
in the rootnlmsgerr
in the rootnlattr
in the rootNETLINK_ROUTE
in the rootNETLINK_EXT_ACK
in the rootIFLA_XDP
in the rootETH_P_ALL
in the rootAF_NETLINK
in the rootNLA_ALIGNTO
in the root~~ help: a similar name exists in the module~~~help: a similar name exists in the module | 6 | AF_IMPLINK, AF_UNSPEC, ETH_P_ALL, IFF_UP, IFLA_XDP, NETLINK_EXT_ACK, NETLINK_ROUTE, |
~~libc::SYS_bpf
,libc::SYS_perf_event_open
--> /Users/SYS_perf_event_open
in the rootSYS_bpf
in the rootmatch
arms have incompatible types --> /Users/i32
97i32
105i32
, foundi64
107match
arms have incompatible typeshelp: you can convert an
i64
to ani32
and panic if the converted value doesn't fit | 106 | (libc::ioctl(fd.as_raw_fd(), request.try_into().unwrap(), arg) as libc::c_long).try_into().unwrap() | + +++++++++++++++++++++Some errors have detailed explanations: E0308, E0432. For more information about an error, try
rustc --explain E0308
. error: could not compileaya
(lib) due to 3 previous errors thread 'main' panicked at 'assertion failed: status.success()', xtask/src/run.rs:34:5 note: run withRUST_BACKTRACE=1
environment variable to display a backtrace `