Rust for Linux List
 help / color / mirror / Atom feed
From: Kaviraj Kanagaraj <kavirajkanagaraj@gmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: Sumera Priyadarsini <sylphrenadin@gmail.com>,
	rust-for-linux@vger.kernel.org
Subject: Re: Build system can't detect rustc
Date: Tue, 16 Mar 2021 18:00:28 +0100	[thread overview]
Message-ID: <39D26FFA-1635-483F-A43F-3BCF942D0AF8@gmail.com> (raw)
In-Reply-To: <CANiq72=2FJQ7Ct_77MsaYe-3qThuRJ-gkLFvY-acq_GmhR9A4A@mail.gmail.com>

HI

I had similar issue even with LLVM=1 or CC=clang enabled.

[kaviraj@kavi-desktop-manjaro linux-rs]$ export LLVM=1
[kaviraj@kavi-desktop-manjaro linux-rs]$ make
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  AR      init/built-in.a
  LD      vmlinux.o
  MODPOST vmlinux.symvers
  MODINFO modules.builtin.modinfo
  GEN     modules.builtin
  LD      .tmp_vmlinux.kallsyms1
ld.lld: error: Unexpected GOT entries detected!
ld.lld: error: Unexpected GOT entries detected!
ld.lld: error: Unexpected GOT entries detected!
make: *** [Makefile:1274: vmlinux] Error 1


The thing that worked for me is to  cp .github/workflows/kernel-x86_64-release.config .config and build again.

Although it would be nice to find out what is causing this when we generate config from make menuconfig (even after following the Quickstart guide)

Thanks
Kaviraj

> On 16 Mar 2021, at 16:09, Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
> 
> On Tue, Mar 16, 2021 at 3:10 PM Sumera Priyadarsini
> <sylphrenadin@gmail.com> wrote:
>> 
>> Hi Miguel,
>> 
>> This definitely helped- I was using the master branch earlier. Can I
>> make a PR to add this to the documentation on rust/quick-start page?
> 
> I didn't put it there since, if we manage to get this mainlined, then
> we would be in the master branch already. :-)
> 
> However, you can send the PR to add a line to the `README.md` file,
> which is only intended for GitHub!
> 
>> gcc versions 8 /9 / 10 but the error persists. I am not sure how to
>> proceed here :/
> 
> This happens when bindgen (which uses Clang internally) gets GCC
> parameters, but that should not happen and is a bug when it does.
> Which kernel config are you using? defconfig for x86_64?
> 
> To progress, please try a Clang build (pass CC=clang or LLVM=1 to
> make), which is much more likely to work (GCC builds rely on a hack to
> make bindgen work), or use one of the kernel configs inside
> .github/workflows/ which are known to build since we check them in the
> CI.
> 
> HTH,
> 
> Cheers,
> Miguel


  reply	other threads:[~2021-03-16 17:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15  6:30 Build system can't detect rustc Sumera Priyadarsini
2021-03-15  7:27 ` Geert Stappers
2021-03-15 12:45 ` Miguel Ojeda
2021-03-16 14:10   ` Sumera Priyadarsini
2021-03-16 15:09     ` Miguel Ojeda
2021-03-16 17:00       ` Kaviraj Kanagaraj [this message]
2021-03-16 17:31         ` Miguel Ojeda
2021-03-17 10:32       ` Sumera Priyadarsini
2021-03-17 13:40         ` Miguel Ojeda
2021-03-17 18:04           ` Sumera Priyadarsini
2021-03-17 15:55     ` Miguel Ojeda
2021-03-17 22:49       ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39D26FFA-1635-483F-A43F-3BCF942D0AF8@gmail.com \
    --to=kavirajkanagaraj@gmail.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sylphrenadin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox