Closed ebrahimraeyat closed 3 months ago
According to this, removeprefix
was added to string class in Python 3.9. The current Python version in Ubuntu 22.04 is 3.10.12. What version of Python are you running?
yes, I use python 3.8.10
root@DESKTOP-7AJHP3M:/home/ebrahim/xc_soleh# python
Python 3.8.10 (default, Nov 14 2022, 12:59:47)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
I will update my ubuntu or python. Thanks.
I updated my ubuntu system and python. But can't compile correctly:
[ 99%] Building CXX object CMakeFiles/XcBib.dir/FEProblem.cc.o
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/librt.so', needed by '/home/ebrahim/xc/lib/libXcBib.so'. Stop.
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:178: CMakeFiles/XcBib.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
I also run this command to update required packages:
sudo bash packages_install_ubuntu_focal_fossa.sh
errors:
root@DESKTOP-7AJHP3M:/home/ebrahim/build_xc# make -j 4
Scanning dependencies of target xc_basic_utils
Consolidate compiler generated dependencies of target xc_basic_utils
[ 7%] Built target xc_basic_utils
Consolidate compiler generated dependencies of target xc_utils
[ 18%] Built target xc_utils
Consolidate compiler generated dependencies of target xc_base
Consolidate compiler generated dependencies of target xcGnuGts
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libpthread.so', needed by '/home/ebrahim/xc/lib/libxc_base.so'. Stop.
make[1]: *** [CMakeFiles/Makefile2:205: CMakeFiles/xc_base.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Consolidate compiler generated dependencies of target geom
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libpthread.so', needed by '/home/ebrahim/xc/lib/libxcGnuGts.so'. Stop.
make[1]: *** [CMakeFiles/Makefile2:259: CMakeFiles/xcGnuGts.dir/all] Error 2
Scanning dependencies of target XcBib
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libpthread.so', needed by '/home/ebrahim/xc/lib/libgeom.so'. Stop.
make[1]: *** [CMakeFiles/Makefile2:232: CMakeFiles/geom.dir/all] Error 2
Consolidate compiler generated dependencies of target XcBib
make[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/librt.so', needed by '/home/ebrahim/xc/lib/libXcBib.so'. Stop.
make[1]: *** [CMakeFiles/Makefile2:178: CMakeFiles/XcBib.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
root@DESKTOP-7AJHP3M:/home/ebrahim/build_xc#
Thanks
Hi, @ebrahimraeyat.
This is weird. The libraries in the /usr/lib/86_64-linux-gnu
directory make part of the OS and, for example, librt.so
belongs to the libc6 package which is needed to compile and link programs which use the standard C library (and XC libraries uses it, of course). I think something went wrong during the installation of the required packages.
Anyway, this has nothing to do with the original issue, so I will close it. Open another one if you need to.
Thanks, you are right.
Hi @lcpt . I compiled xc and run verification tests. It gives me a lot of error due to 'str' object has no attribute 'removeprefix' or 'removesuffix'. It seems it's introduce in python version 3.9+
To Reproduce Run this test: Traceback (most recent call last):
windows 11 with wsl2.