Conversation
fix wrong path of libstdcxx python script
|
Sounds good. One thing I noticed is that have multiple dirs left because of python cache files (we should try fix this with the next gcc update). $ echo /usr/share/gcc*
/usr/share/gcc-11.3.0 /usr/share/gcc-13.2.0 /usr/share/gcc-13.3.0A hacky workaround is to sort the dirs, which is a good idea anyway since listdir order isn't stable. What about: import sys
import glob
python_dirs = sorted(glob.glob("/usr/share/gcc*/python"), reverse=True)
sys.path.insert(0, (python_dirs or [sys.path[0])[0]) |
|
Or we add a big warning to the gcc build file that gdb needs to be rebuilt on version changes. |
|
I've created #4748 as an alternative |
This may be a good idea. Some newbies like me are always confused about the prompt, and don't know how to deal with this, we added this method to provide a way for newbies to easily use it. > import sys
> import glob
> python_dirs = sorted(glob.glob("/usr/share/gcc*/python"), reverse=True)
> sys.path.insert(0, (python_dirs or sys.path)[0]) |
fix wrong path of
libstdcxxpython scriptIf the version number of
gccwas updated, but this script was not update the variable of%GCC_NAME%which will lead an error of missinglibstdcxxmoduleThis update use python script to search the real path of the
gccfolder and insert it into thesys.pathvariable