Closed aurabindo closed 5 years ago
What kernel version are you on?
Ugh I think setfl might be a Debian-specific patch?? I can't find any mention of it in the upstream kernel, on my most convenient Debian box I see
#ifndef __GENKSYMS__
/* bwh: For aufs only */
int (*setfl)(struct file *, unsigned long);
#endif
and bwh is the Debian kernel maintainer, and aufs is out-of-tree.
Thanks for the report @aurabindo - we'll figure out a way to conditionally compile this.
You're welcome! I'm on 4.19.32
, archlinux.
Would a lame check like https://paste.ubuntu.com/p/tFC7JsXxjt/ do the job ? I mean, is it okay to assume we need debian specific additions only when building on a debian machine ? Does it work on debian without setfl present at all ?
We need to know about the kernel we're compiling for, not the one we're running on, so no this isn't sufficient.
On Mon, Sep 2, 2019 at 11:19 AM Aurabindo J notifications@github.com wrote:
Would a lame check like https://paste.ubuntu.com/p/tFC7JsXxjt/ do the job ?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fishinabarrel/linux-kernel-module-rust/issues/167?email_source=notifications&email_token=AAAAGBAKDN3JU4VIO67IOXTQHUVINA5CNFSM4IS2JENKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5WCX3Y#issuecomment-527182831, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAGBBYQKPVP6CFUFAWJOLQHUVINANCNFSM4IS2JENA .
-- All that is necessary for evil to succeed is for good people to do nothing.
Is there a define or a config or anything like that for this?
I'm hitting this trying to do development on #139, and I'm very mad at computer :-)
@aurabindo, can you see if the latest commit on master works?
(Note that in the meantime we've switched from cargo xbuild
to cargo build
- take a look at the current README, and note you might need to rustup update nightly
or something.)
@geofft My nightly update is failing, and I do not have -Z flag build-std
. Could you tell me your specific nightly version ?
That flag was added a couple days ago, sorry :) Try rustup update nightly
rustup update nightly
is failing for me. I explicitly asked cargo compile with latest nightly. Even then its failing.
diff --git a/hello-world/Kbuild b/hello-world/Kbuild
index d2114c4..78013af 100644
--- a/hello-world/Kbuild
+++ b/hello-world/Kbuild
@@ -4,7 +4,7 @@ helloworld-objs := hello_world.rust.o
CARGO ?= cargo
$(src)/target/x86_64-linux-kernel/debug/libhello_world.a: $(src)/Cargo.toml $(wildcard $(src)/src/*.rs)
- cd $(src); env -u MAKE -u MAKEFLAGS $(CARGO) build -Z build-std=core,alloc --target=x86_64-linux-kernel
+ cd $(src); env -u MAKE -u MAKEFLAGS $(CARGO) +nightly-2019-09-16 build -Z build-std=core,alloc --target=x86_64-linux-kernel
%.rust.o: target/x86_64-linux-kernel/debug/lib%.a
$(LD) -r -o $@ --whole-archive $<
2019-09-11 nightly should work
On Mon, Sep 16, 2019, 9:37 AM Aurabindo J notifications@github.com wrote:
rustup update nightly is failing for me. I explicitly asked cargo compile with latest nightly. Even then its failing.
diff --git a/hello-world/Kbuild b/hello-world/Kbuild index d2114c4..78013af 100644 --- a/hello-world/Kbuild +++ b/hello-world/Kbuild @@ -4,7 +4,7 @@ helloworld-objs := hello_world.rust.o CARGO ?= cargo
$(src)/target/x86_64-linux-kernel/debug/libhello_world.a: $(src)/Cargo.toml $(wildcard $(src)/src/*.rs)
- cd $(src); env -u MAKE -u MAKEFLAGS $(CARGO) build -Z build-std=core,alloc --target=x86_64-linux-kernel
cd $(src); env -u MAKE -u MAKEFLAGS $(CARGO) +nightly-2019-09-16 build -Z build-std=core,alloc --target=x86_64-linux-kernel
%.rust.o: target/x86_64-linux-kernel/debug/lib%.a $(LD) -r -o $@ --whole-archive $<
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fishinabarrel/linux-kernel-module-rust/issues/167?email_source=notifications&email_token=AAAAGBGA3T5274YJOHV2N3TQJ6D2ZA5CNFSM4IS2JENKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6ZFD6A#issuecomment-531780088, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAGBH4PUQ6JBA5K546Y23QJ6D2ZANCNFSM4IS2JENA .