Skip to content

Commit 8a42054

Browse files
authored
fix CircleCI shared lib issue with pypy 3.9 & 3.10 (#726)
Hi, can you please review patch to fix circleci tests failing for pypy 3.9 and 3.10. It fails with the following error during poetry installation: ``` Installing Poetry (1.7.1): An error occurred. Removing partial environment. Poetry installation failed. See /root/project/poetry-installer-error-s__g4uo2.log for error logs. Exited with code exit status 127 ``` I guess there was a poetry change that somehow affected the virtual environment created by poetry during its installation. It is missing the pypy shared libraries and fails the installation with the following message (as taken from the log) ``` See /root/project/poetry-installer-error-24g4cn6z.log for error logs. /root/.local/share/pypoetry/venv/bin/python3: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory Traceback: File "<stdin>", line 923, in main File "<stdin>", line 562, in run ``` I couldn't find a mention of this issue on the Internet. I've opted to sym link the pypy shared libraries to the venv and add it to the LD_LIBRARY_PATH so they are available at runtime. Thanks Co-authored-by: ikappaki <[email protected]>
1 parent 63ba73f commit 8a42054

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.circleci/config.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ commands:
1717
apt-get update && apt-get install -y python3 python3-distutils curl
1818
pip install -U pip virtualenv
1919
pip install tox
20+
21+
# All of a sudden, the venv generated by Poetry
22+
# installations for pypy 3.9 and 3.10 (but not 3.8),
23+
# located at /root/.local, lacks all the lib*.so
24+
# dependencies from the original pypy environment. To
25+
# address this issue, we ensure these libraries are
26+
# explicitly accessible in the LD_LIBRARY_PATH until a
27+
# resolution is implemented.
28+
mkdir -p /root/.local/lib
29+
ln -s /opt/pypy/lib/lib*.so.* /root/.local/lib
30+
export LD_LIBRARY_PATH="/root/.local/lib:$LD_LIBRARY_PATH"
31+
echo 'export LD_LIBRARY_PATH="/root/.local/lib:$LD_LIBRARY_PATH"' >> $BASH_ENV
32+
2033
curl -sSL https://install.python-poetry.org | python3 -
2134
echo 'export PATH="/root/.local/bin:$PATH"' >> $BASH_ENV
2235
- run:
@@ -68,4 +81,4 @@ workflows:
6881
jobs:
6982
- test-pypy-38
7083
- test-pypy-39
71-
- test-pypy-310
84+
- test-pypy-310

0 commit comments

Comments
 (0)