CoatiSoftware / SourcetrailPythonIndexer

Python Indexer for Sourcetrail based on jedi, parso and SourcetrailDB
GNU General Public License v3.0
90 stars 28 forks source link

Dependency on GLIBC_2.18 #44

Open dawid-s opened 5 years ago

dawid-s commented 5 years ago

Hi there,

When I tried to give Sourcetrail a spin for a Python project on CentOS 7 I get the following:

15:27:43 | ERROR: Process error: [450405] Failed to execute script run
15:27:43 | ERROR: Process error: Traceback (most recent call last):
15:27:43 | ERROR: Process error:   File "run.py", line 2, in <module>
15:27:43 | ERROR: Process error:   File "/usr/local/lib/python3.4/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 627, in exec_module
15:27:43 | ERROR: Process error:   File "indexer.py", line 6, in <module>
15:27:43 | ERROR: Process error:   File "/usr/local/lib/python3.4/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 627, in exec_module
15:27:43 | ERROR: Process error:   File "sourcetraildb.py", line 28, in <module>
15:27:43 | ERROR: Process error:   File "sourcetraildb.py", line 24, in swig_import_helper
15:27:43 | ERROR: Process error:   File "imp.py", line 243, in load_module
15:27:43 | ERROR: Process error: ImportError: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /opt/sourcetrail/data/python/libstdc++.so.6)

Is the dependency on glibc 2.18 required? If so this is a bummer as I got quite excited about evaluating Sourcetrail for work but I am using CentOS 7 which is using version 2.17.

Regards, Dawid

egraether commented 5 years ago

Thanks of reporting! It seems that updating your glibc library is not possible on CentOS 7. The issue is happening when loading the SourcetrailDB binary. We need to see if we can change the Travis pipeline to use an older glibc version.

Alternatively you can also build the SourcetrailDB python binding yourself (depends on SWIG 3.0.12):

git clone https://github.com/CoatiSoftware/SourcetrailDB.git
cd SourcetrailDB
mkdir build
cd build
cmake -DBUILD_BINDINGS_PYTHON=$PYTHON_BINDING -DPYTHON_VERSION=$PYTHON ..
make

Afterwards you need to replace the file _sourcetraildb.so in your Sourcetrail install:

cp SourcetrailDB/build/bindings_python/_sourcetraildb.so /opt/sourcetrail/data/python/_sourcetraildb.so
dawid-s commented 5 years ago

Hi @egraether ,

Thank you for the quick response. I was able to follow all the steps successfully but unfortunately, it didn't help.

What it did seem to have done the trick is renaming/removing /opt/sourcetrail/data/python/libstdc++.so.6 so SourcetrailPythonIndexer picks up the system one.

I am currently indexing my Python project to confirm but I was able to successfully run ./SourcetrailPythonIndexer -h without the exception.

dawid-s commented 5 years ago

Seems like it is working fine. I will see the result of the indexing tomorrow as I had to redo it at some point.

In any case, it seems like it would be best to remove the glib 2.18 dependency if not essential.