YosysHQ / oss-cad-suite-build

Multi-platform nightly builds of open source digital design and verification tools
ISC License
742 stars 67 forks source link

'version `GLIBC_ABI_DT_RELR' not found' when running cocotb #96

Closed sornas closed 5 months ago

sornas commented 5 months ago

Hi! Recently (presuambly after the bump to Python 3.11, it worked in december) I'm having trouble using cocotb in oss-cad-suite. I haven't looked too much yet, but I have a reproduction. I'm running Arch Linux, so that's what I've used.

Reproduction:

First, start an Arch Linux docker container, e.g. docker run --rm -it archlinux:latest. Next, paste the following:

pacman -Sy
yes | pacman -S git wget
cd /root
wget https://github.com/YosysHQ/oss-cad-suite-build/releases/download/2024-01-21/oss-cad-suite-linux-x64-20240121.tgz
tar xzf oss-cad-suite-linux-x64-20240121.tgz
export PATH=$PWD/oss-cad-suite/bin:$PATH
git clone https://github.com/cocotb/cocotb
cd cocotb/examples/adder
tabbypy3 tests/test_adder.py

In the end, the reported error is

OSError: /root/oss-cad-suite/lib/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /lib/libdl.so.2)

So far, I've figured that GLIBC_ABI_DT_RELR can be found in the host /lib/libc.so.6 but not in oss-cad-suite/lib/libc.so.6.

$ readelf -sW /lib/libc.so.6 | grep GLIBC_ABI_DT_RELR
  2873: 0000000000000000     0 OBJECT  GLOBAL DEFAULT  ABS GLIBC_ABI_DT_RELR
$ readelf -sW oss-cad-suite/lib/libc.so.6 | grep GLIBC_ABI_DT_RELR
$ # no output

There is no libdl.so.2 in oss-cad-suite/lib/ whatsoever, so my initial guess is that it loads the host libdl which is compiled with the host libc, but oss-cad-suite's libc overrides the host libc.

mmicko commented 5 months ago

Thanks for reporting this. Managed to reproduce and made a local fix. Will check couple more things and note that tomorrow build will include fix