Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing submodule in QEMU repository while installing RISC-V 64-bit (Ariane) toolchain #164

Closed
JuanEsco063 opened this issue Jun 17, 2022 · 11 comments · Fixed by #176
Closed

Comments

@JuanEsco063
Copy link
Contributor

It seems one of the submodules, qemu-palcode specifically, of the qemu repository has been moved or is somehow broken.

I am following the steps from the setup tutorial and the error appears when I run the command to install the risc-v 64-bit Ariane toolchain:

./utils/toolchain/build_riscv_toolchain.sh

Here is a screenshot of the error I get:
Screen Shot 2022-06-17 at 1 26 05 PM

I am running this on Ubuntu 20.04 LTS. I installed the toolchains without issue before so I doubt this is affecting it.

@jzuckerman
Copy link
Member

jzuckerman commented Jun 17, 2022

Hi Juan,

I've run into this issue as well. I'm not sure why this repo doesn't want to download through our script anymore. Here is a manual fix while I look into a more permanent one:

  1. go to ${ESP_ROOT}/_risv_build/riscv-gnu-toolchain/riscv-qemu/roms/
  2. clone the repo that is failing directly from here https://github.com/rth7680/qemu-palcode
  3. comment out lines 102 and 103 of ${ESP_ROOT}/utils/toolchain/build_riscv_toolchain.sh to avoid removing the temporary directory
  4. rerun the toolchain

Let me know if you have further issues.

@JuanEsco063
Copy link
Contributor Author

Let me try that.

What I noticed is the URL for the QEMU submodule in the .gitmodule file in the riscv-gnu-toolchain repo points to https://git.qemu.org/git/qemu.git however, if you go to that site using a browser, you are automatically redirected to https://gitlab.com/qemu-project/qemu . Maybe the script or git are not redirecting automatically.

@JuanEsco063
Copy link
Contributor Author

@jzuckerman Following your steps resolved the issue. Would it be best for me to close the issue or leave it open until the script is fixed?

@JuanEsco063
Copy link
Contributor Author

@jzuckerman I am installing ESP on another computer (rather, a docker container ) and while installing the RISCV toolchain I am getting the following error:

Screen Shot 2022-06-29 at 1 37 06 PM

This is after applying the workaround you mentioned for the QEMU repo.

@jzuckerman
Copy link
Member

Let's leave the issue open until there's a permanent fix.

Not sure about the new error. What's the OS of this machine? Are there any helpful details in config.log?

@JuanEsco063
Copy link
Contributor Author

Hi @jzuckerman ,

This is the OS information

NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

I have also attached the conf log file. The most noteworthy thing I can find is a few errors in the Core tests section:

--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~18.04)
configure:3278: $? = 0
configure:3267: /home/vitis-ai-user/repos/esp/_riscv_build/buildroot/output/host/bin/ccache /usr/bin/gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3278: $? = 1
configure:3267: /home/vitis-ai-user/repos/esp/_riscv_build/buildroot/output/host/bin/ccache /usr/bin/gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.

config.pdf

@mayank-kabra2001
Copy link

Is this issue resolved now ?

@JuanEsco063
Copy link
Contributor Author

JuanEsco063 commented Jul 23, 2022 via email

@mayank-kabra2001
Copy link

No, i tried the workaround but it didnt work for me ..

@JuanEsco063
Copy link
Contributor Author

JuanEsco063 commented Jul 23, 2022 via email

@jzuckerman
Copy link
Member

Sorry for the delay here. The following two commands should resolve this issue. I'll include them as a part of the toolchain.

git config --global url.https://github.com/qemu/.insteadOf git://git.qemu-project.org/
git config --global url.https://anongit.freedesktop.org/git/.insteadOf git://anongit.freedesktop.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants