You are not logged in.

#1 2020-09-05 04:30:19

terepy
Member
Registered: 2020-09-05
Posts: 7

[Solved] Why is cargo needed when building kernel?

Hi

I'm trying to rebuild the linux kernel, I've been following the instructions here: https://wiki.archlinux.org/index.php/Ke … ild_System

the output of `makepkg > output.log 2>&1` is as follows:

==> Making package: linux 5.8.6.arch1-1 (Sat 05 Sep 2020 02:23:19 PM AEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating archlinux-linux git repo...
Fetching origin
  -> Found config
  -> Found sphinx-workaround.patch
==> Validating source files with sha256sums...
    archlinux-linux ... Skipped
    config ... Passed
    sphinx-workaround.patch ... Passed
==> Verifying source file signatures with gpg...
    archlinux-linux git repo ... Passed
==> Extracting sources...
  -> Creating working copy of archlinux-linux git repo...
Reset branch 'makepkg'
==> Starting prepare()...
Setting version...
Applying patch sphinx-workaround.patch...
patching file Documentation/conf.py
Hunk #1 succeeded at 36 with fuzz 2.
Setting config...
scripts/kconfig/conf  --olddefconfig Kconfig
#
# configuration written to .config
#
Prepared linux version 5.8.6-arch1-1
==> Removing existing $pkgdir/ directory...
==> Starting build()...
scripts/kconfig/conf  --syncconfig Kconfig
error: Not a Cargo project, aborting.
make[1]: *** [Kbuild:24: include/generated/timeconst.h] Error 1
make: *** [Makefile:1175: prepare0] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

which thing in the linux kernel requires a cargo project?

Last edited by terepy (2020-09-05 06:55:30)

Offline

#2 2020-09-05 05:32:44

loqs
Member
Registered: 2014-03-06
Posts: 19,046

Re: [Solved] Why is cargo needed when building kernel?

cargo is not required to build then kernel.
What is the output of

type -a bc
which bc

Offline

#3 2020-09-05 05:59:57

terepy
Member
Registered: 2020-09-05
Posts: 7

Re: [Solved] Why is cargo needed when building kernel?

type -a bc:

bc is /usr/local/bin/bc
bc is /usr/bin/bc

which bc:

/usr/local/bin/bc

Offline

#4 2020-09-05 06:06:43

loqs
Member
Registered: 2014-03-06
Posts: 19,046

Re: [Solved] Why is cargo needed when building kernel?

/usr/local/bin/bc --help
/usr/local/bin/bc --version

Offline

#5 2020-09-05 06:33:37

terepy
Member
Registered: 2020-09-05
Posts: 7

Re: [Solved] Why is cargo needed when building kernel?

both return

error: Not a Cargo project, aborting.

and now I realise what's wrong... some time ago I created my own script and named it bc, and that was being prioritised over the other bc that I installed today. renaming it fixed it.

Offline

#6 2020-09-05 06:36:30

terepy
Member
Registered: 2020-09-05
Posts: 7

Re: [Solved] Why is cargo needed when building kernel?

thanks so much, how do I close this or mark it as solved? oh and how did you know to check bc first rather than anything else?

Offline

#7 2020-09-05 06:49:35

loqs
Member
Registered: 2014-03-06
Posts: 19,046

Re: [Solved] Why is cargo needed when building kernel?

make[1]: *** [Kbuild:24: include/generated/timeconst.h] Error 1

Kbuild?h=v5.8.6#n24 and from there looking back to line 21 lead me to bc.

You can mark the thread as solved by editing your first post and prepending [SOLVED] to the title.

Offline

Board footer

Powered by FluxBB