You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some build systems (like nix) do not allow network access while building, but then provide a download phase, where network access is allowed.
For this to work with cargo, we would have to create a cargo vendor dir, and call cargo with the flags, to not update the index and use the vendor dir.
I saw in the docs something about charge fetch. But for nix it would be best I can do it out of tree and link the folder in tree later.
To download I woul like to just copy one Cargo.lock
I will try to build it via nix next week. If that succeeds, I'm happy to close this issue.
Currently I also fail with this error. Did someone get this kernel to build?
elf.c: In function ‘read_symbols’:
elf.c:378:8: error: implicit declaration of function ‘gelf_getsymshndx’; did you mean ‘gelf_getsym’? [-Werror=implicit-function-declaration]
378 | if (!gelf_getsymshndx(symtab->data, shndx_data, i, &sym->sym,
| ^~~~~~~~~~~~~~~~
| gelf_getsym
elf.c:378:8: error: nested extern declaration of ‘gelf_getsymshndx’ [-Werror=nested-externs]
I will try to build it via nix next week. If that succeeds, I'm happy to close this issue.
Currently I also fail with this error. Did someone get this kernel to build?
elf.c: In function ‘read_symbols’:
elf.c:378:8: error: implicit declaration of function ‘gelf_getsymshndx’; did you mean ‘gelf_getsym’? [-Werror=implicit-function-declaration]
378 | if (!gelf_getsymshndx(symtab->data, shndx_data, i, &sym->sym,
| ^~~~~~~~~~~~~~~~
| gelf_getsym
elf.c:378:8: error: nested extern declaration of ‘gelf_getsymshndx’ [-Werror=nested-externs]
Seems like i had an to old version of some dependencies
I will try to build it via nix next week. If that succeeds, I'm happy to close this issue.
If you have the time to try, it would be great! The issue may remain opened since building in general (and offline building in particular) is not yet set in stone.
Currently I also fail with this error. Did someone get this kernel to build?
The branch is intended to always be building and working (CI was just added to keep it that way, too). Of course, mistakes could happen.
No, it is something that appears the first time when you haven't configured or built the kernel previously (so after a make mrproper too). If you are using a config file from somewhere else, potentially from older versions of the kernel, you can run make oldconfig && make prepare (it will ask for new options if the old config didn't know about them).
What about changing from --cfg to std::env!()? This would maybe produce more binary code, but it also would enable us to get values inside of rust.
Furthermore, auto.conf seems to be configurable where it will be placed. And it may get so big, that it exceeds the max argument length of a Linux shell.
@ojeda What do you think about this? should I open an Issue/PR for this?
rustc_cfg_flags = $(shell sed -nE 's/^(CONFIG_[^=]+)=(y|m)$$/--cfg \1/p' $(srctree)/include/config/auto.conf | xargs)
Good catch, we need to avoid reading the file when not needed.
What about changing from --cfg to std::env!()? This would maybe produce more binary code, but it also would enable us to get values inside of rust.
Do you mean avoiding conditional compilation altogether?
Furthermore, auto.conf seems to be configurable where it will be placed. And it may get so big, that it exceeds the max argument length of a Linux shell.
Does rustc support other ways of passing cfg variables? If not, the best would be to have that support added (even if we didn't hit issues with length etc., it is not nice to see pages of arguments when building verbosely).
@ojeda What do you think about this? should I open an Issue/PR for this?
What about changing from --cfg to std::env!()? This would maybe produce more binary code, but it also would enable us to get values inside of rust.
Do you mean avoiding conditional compilation altogether?
Yes, that was my idea. We maybe could create special cases, like some debug values or so, but I think the should be opt-in
Furthermore, auto.conf seems to be configurable where it will be placed. And it may get so big, that it exceeds the max argument length of a Linux shell.
Does rustc support other ways of passing cfg variables? If not, the best would be to have that support added (even if we didn't hit issues with length etc., it is not nice to see pages of arguments when building verbosely).
I'm currently trying to figure this out and ask in the rust zulipchat.
@ojeda What do you think about this? should I open an Issue/PR for this?
Yes, that was my idea. We maybe could create special cases, like some debug values or so, but I think the should be opt-in
No, conditional compilation must work -- nobody will settle on something so fundamental (myself included!). It is not just about bloat or performance (which are both a big no-no), but also about complexity (we'd need to define what subset goes in), divergence (developers expect all CONFIG_* options to be available), etc.
I'm currently trying to figure this out and ask in the rust zulipchat.
Activity
ojeda commentedon Oct 4, 2020
Agreed! Offline building will be supported (it is one of the requirements).
At the moment, you may try pre
fetching the dependencies in the download phase.kloenk commentedon Oct 4, 2020
I saw in the docs something about charge fetch. But for nix it would be best I can do it out of tree and link the folder in tree later.
To download I woul like to just copy one Cargo.lock
kloenk commentedon Oct 5, 2020
I will try to build it via nix next week. If that succeeds, I'm happy to close this issue.
Currently I also fail with this error. Did someone get this kernel to build?
kloenk commentedon Oct 5, 2020
Seems like i had an to old version of some dependencies
ojeda commentedon Oct 5, 2020
If you have the time to try, it would be great! The issue may remain opened since building in general (and offline building in particular) is not yet set in stone.
The branch is intended to always be building and working (CI was just added to keep it that way, too). Of course, mistakes could happen.
kloenk commentedon Oct 8, 2020
I'm currently seeing this warning, is
../include/config/auto.confsomething introduced by this fork?(sorry, it's my first time working on the kernel)
ojeda commentedon Oct 8, 2020
No, it is something that appears the first time when you haven't configured or built the kernel previously (so after a
make mrpropertoo). If you are using a config file from somewhere else, potentially from older versions of the kernel, you can runmake oldconfig && make prepare(it will ask for new options if the old config didn't know about them).(Don't worry about asking!)
kloenk commentedon Oct 9, 2020
This line seems to be the problem if you build with O=$something
linux/scripts/Makefile.lib
Line 232 in f60edb2
kloenk commentedon Oct 9, 2020
Not sure what I did, but I got it to die with this error:
kloenk commentedon Oct 9, 2020
What about changing from
--cfgtostd::env!()? This would maybe produce more binary code, but it also would enable us to get values inside of rust.Furthermore, auto.conf seems to be configurable where it will be placed. And it may get so big, that it exceeds the max argument length of a Linux shell.
@ojeda What do you think about this? should I open an Issue/PR for this?
ojeda commentedon Oct 10, 2020
Good catch, we need to avoid reading the file when not needed.
Do you mean avoiding conditional compilation altogether?
Does
rustcsupport other ways of passingcfgvariables? If not, the best would be to have that support added (even if we didn't hit issues with length etc., it is not nice to see pages of arguments when building verbosely).Definitely! Please open the issue.
kloenk commentedon Oct 10, 2020
Yes, that was my idea. We maybe could create special cases, like some debug values or so, but I think the should be opt-in
I'm currently trying to figure this out and ask in the rust zulipchat.
Opened as #22
ojeda commentedon Oct 10, 2020
No, conditional compilation must work -- nobody will settle on something so fundamental (myself included!). It is not just about bloat or performance (which are both a big no-no), but also about complexity (we'd need to define what subset goes in), divergence (developers expect all
CONFIG_*options to be available), etc.Thanks a lot x2!
kloenk commentedon Oct 15, 2020
Thus std aware cargo is the biggest blocker for me at the moment. Is it reasonable to disable it, until it is stable in cargo?
67 remaining items
perf test: Don't leak workload gopipe in PERF_RECORD_*
hfsplus: fix KMSAN uninit-value issue in hfsplus_delete_cat()
Merge patch series "can: netlink: add CAN XL support"
ecryptfs: Release lower parent dentry after creating dir
perf cs-etm: Fix decoding for sparse CPU maps
perf cs-etm: Fix decoding for sparse CPU maps
mptcp: pm: in-kernel: always set ID as avail when rm endp
mptcp: pm: in-kernel: always set ID as avail when rm endp
mptcp: pm: in-kernel: always set ID as avail when rm endp
net/sched: cls_fw: fix NULL dereference of "old" filters before change()
perf annotate: Use jump__delete when freeing LoongArch jumps
mm/swap: add cond_resched() in swap_reclaim_full_clusters to prevent …
smb: client: reject userspace cifs.idmap descriptions
tcp: Don't call skb_clone_and_charge_r() for close()d listener in tcp…
fs: don't create the private nullfs mount under namespace_sem