sld-columbia / esp

Embedded Scalable Platforms: Heterogeneous SoC architecture and IP integration made easy
Other
332 stars 106 forks source link

Error building the RISCV and Leon3 toolchains #131

Closed JuanEsco063 closed 2 years ago

JuanEsco063 commented 2 years ago

Describe the bug The build process fails and exits with errors when reaching the buildroot install step for both the Leon3 and RISCV installation.

Before it fails, I get a warning regarding how to handle pulling without specifying how to reconcile divergent branches.

For example, for the Leon3 toolchain I get:

... Linux uClibC tool chain w/ buildroot ... *** Skip Linux toolchain [y|n]? n: Updated 0 paths from the index hint: Pulling without specifying how to reconcile divergent branches is hint: discouraged. You can squelch this message by running one of the following hint: commands sometime before your next pull: hint: hint: git config pull.rebase false # merge (the default strategy) hint: git config pull.rebase true # rebase hint: git config pull.ff only # fast-forward only hint: hint: You can replace "git config" with "git config --global" to set a default hint: preference for all repositories. You can also pass --rebase, --no-rebase, hint: or --ff-only on the command line to override the configured default per hint: invocation.

To Reproduce Steps to reproduce the behavior:

  1. Run ./utils/toolchain/build_leon3_toolchain.sh or ./utils/toolchain/build_riscv_toolchain.sh
  2. Proceed with the installation as intended
  3. When reaching the buildroot step it should give a warning regarding pulling without specifying how to reconcile divergent branches.
  4. Continuing with the install yields the error (for example for the Leon3 toolchain): make: *** No rule to make target '/tmp/_leon3_build/buildroot/output/.br-external.mk'. Stop.

Expected behavior Both commands finish without error and install the RISCV and Leon3 toolchains.

Screenshots

Screen Shot 2021-10-28 at 8 49 21 PM Screen Shot 2021-10-28 at 8 50 29 PM

Desktop (please complete the following information):

davide-giri commented 2 years ago

Hi @JuanEsco063, thanks for flagging this! We'll try to reproduce this right away. What branch of ESP are you working on? Is it master?

Thanks Davide

JuanEsco063 commented 2 years ago

Hello Davide!

Yes, I am using the master branch. I am actually going to resume working on the Zynq branch soon so I will reach out directly.

Curiously, once I rebooted the computer, the install process is now failing on a different spot. I am adding more details in a second.

Per usual, it is probably just a misconfiguration on my end but I appreciate the help.

JuanEsco063 commented 2 years ago

After rebooting the computer, running the RISCV installation script fails installing the first component with the error: Installing baremetal newlib tool chain... Skip riscv-gnu-toolchain [y|n]? n: ... Screen Shot 2021-10-28 at 9 21 51 PM

Also, probably an issue on my end, now trying to run the Leon3 toolchain installation without sudo gives the error:

Screen Shot 2021-10-28 at 9 24 41 PM

Running with sudo yields the previously mentioned error.

I am going to try a clean install of ESP overnight and will update tomorrow morning

davide-giri commented 2 years ago

Try to delete the _riscv_build and _leon3_build folders in /tmp. And then I suggest using the version of the toolchain installation scripts that you can find in the dev branch. We made some improvements in terms of where the temporary folders used by the script get created and of making sure they get deleted afterwards.

Thanks, let us know

klchiu commented 2 years ago

Hi @JuanEsco063 ,

Thanks for bringing up the issue. I just checked both scripts works fine on my machine. I have Ubuntu 18.04 and CentOS 7. I notice that you are using Ubuntu 21.04, not sure if that's the problem. They might have upgrade for some tools.

You can do like @davide-giri suggested, delete the two temporary build folders in /tmp. In addition, can you try to install the toolchain at a different location instead of /opt ?

JuanEsco063 commented 2 years ago

I was unable to build the toolchains even after trying all your suggestions. I decided it would be easier to install Ubuntu 18.04. Let me know if at some point you want to try making things work with a more recent version of Ubuntu and I will be more than happy to help test that.

klchiu commented 2 years ago

We will try to support the later version of Ubuntu. Thanks Juan