chipyard icon indicating copy to clipboard operation
chipyard copied to clipboard

firtool and GLIBC version

Open nishanthsmurthy24 opened this issue 3 years ago • 6 comments

Background Work

Chipyard Version and Hash

Release: 1.9.1 Hash: 968b207

OS Setup

Linux ece-buttonbox 3.10.0-1160.31.1.el7.x86_64 #1 SMP Wed May 26 20:18:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

(Date/Time is set properly)

LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: n/a Description: NAME="Red Hat Enterprise Linux Workstation" Release: n/a Codename: n/a

OS: RHEL 7.9

Other Setup

Followed Documentation for all the Initial Setup.

Downloaded firtool binary from https://github.com/llvm/circt/releases/tag/firtool-1.56.0

Current Behavior

common.mk has firtool command, I run the make command inside sims/verilator

firtool spits out this error firtool: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by firtool)

I currently have GLIBC_2.16 on RHEL 7.9. I have tried fixing the GLIBC_2.18 issue, by compiling a higher version of GLIBC. But it was not fruitful.

Is there something I am missing about firtool usage?

Expected Behavior

Can I build the firtool binary from the source using a lower GLIBC version?

Shouldn't firtool run out of the box somehow?

Other Information

No response

nishanthsmurthy24 avatar Oct 26 '23 06:10 nishanthsmurthy24

When using the conda install flow, which sets up a conda-managed environment and sysroot, the firtool that is installed should match the GLIBC installed by Conda. External firtools may not work in this environment.

jerryz123 avatar Oct 26 '23 06:10 jerryz123

Thanks for that. It is working now.

nishanthsmurthy24 avatar Oct 26 '23 15:10 nishanthsmurthy24

My issue is "firtool: command not found". I tried to download the binary file of firtool and glibc-2.18, but it didn't work because of many new issues. I have tried many approaches until found that firtool can be installed straightly with command conda install firtool .

exhaust-create avatar Mar 10 '24 13:03 exhaust-create

Thanks for that. It is working now.

Hello, could you tell me how you resolved this problem? Which version of firtool did you choose, or did you update GLIBC?

exhaust-create avatar Jul 11 '24 10:07 exhaust-create

See the solution here: https://groups.google.com/g/chipyard/c/MIuCl8HhCIk

suhwanhong999 avatar Dec 08 '24 08:12 suhwanhong999

During the process of doing build-setup.sh skip the circt setup ( ./build-setup.sh --skip-circt) so the firtool wont be inside riscv-tools binary dirctory, so if its in that directory it will access the library of the current system you are using (which is why you are getting the error "firtool: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by firtool)") so when you need to generate a RTL files for example Rocket-chip, make sure you are in conda environment and do "$ conda install firtool" then the firtool will be in the .conda-env's binary directory, hence it will access the sysroot's library files, you can check it by ldd (to debug dynamic linking issues) and check where your firtool is pointing to. You can check by giving "which firtool" it should show .conda-env/bin/firtool not the .conda-env/riscv-tools/bin/firtool. This is how i cleared this issue, probably you might find even better approach for this error.

karthik5102001 avatar Dec 10 '24 11:12 karthik5102001