You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot reproduce this so far on linux and the CI currently tests numpy 2.5.3. Note that test_stltypes.py already imports numpy in the corresponding tests (in favour of globally importing it):
One possibility is that two libstdc++ copies are reachable in your environment: importing cppjit first pins the older one for the whole process, and the global import numpy loads the newer libstdc++ that numpy was built against before cppjit can pin the old one. You can test this by now adding an import cppjit before import numpy (after import sys) which should retrigger the previous error messages.
Can you share a snippet of the error messages and your environment config: OS and architecture, Python version, numpy version, and cppjit installation mode (source/pip)? With that info this should be quick to pin down.
One possibility is that two libstdc++ copies are reachable in your environment: importing cppjit first pins the older one for the whole process, and the global import numpy loads the newer libstdc++ that numpy was built against before cppjit can pin the old one. You can test this by now adding an import cppjit before import numpy (after import sys) which should retrigger the previous error messages.
You were right. I do have two copies of libstdc++.so.6 - one from the OS (AlmaLinux 10) at /usr/lib64/libstdc++.so.6, and another from Conda $CONDA_PREFIX/lib/libstdc++.so.6. After adding import cppjit before import numpy, I was able to see the same error messages again.
Can you share a snippet of the error messages and your environment config: OS and architecture, Python version, numpy version, and cppjit installation mode (source/pip)? With that info this should be quick to pin down.
Sure. I installed cppjit following the "Development build (pip editable)" instructions from this GitHub page. Below are the details of my environment.
Activity
aaronj0 commentedon Sep 15, 2026
Hi, thanks for the report.
I cannot reproduce this so far on linux and the CI currently tests numpy 2.5.3. Note that
test_stltypes.pyalready imports numpy in the corresponding tests (in favour of globally importing it):cppjit/test/test_stltypes.py
Lines 690 to 698 in a14171f
One possibility is that two libstdc++ copies are reachable in your environment: importing cppjit first pins the older one for the whole process, and the global import numpy loads the newer libstdc++ that numpy was built against before cppjit can pin the old one. You can test this by now adding an
import cppjitbeforeimport numpy(afterimport sys) which should retrigger the previous error messages.Can you share a snippet of the error messages and your environment config: OS and architecture, Python version, numpy version, and cppjit installation mode (source/pip)? With that info this should be quick to pin down.
chofchof commentedon Sep 15, 2026
@aaronj0, thanks for a detailed answer.
You were right. I do have two copies of
libstdc++.so.6- one from the OS (AlmaLinux 10) at/usr/lib64/libstdc++.so.6, and another from Conda$CONDA_PREFIX/lib/libstdc++.so.6. After addingimport cppjitbeforeimport numpy, I was able to see the same error messages again.Sure. I installed
cppjitfollowing the "Development build (pip editable)" instructions from this GitHub page. Below are the details of my environment.error_message.log