User Tools

Site Tools


platform:segmentation_fault_when_using_python_api_with_3rd_party_libraries

Segmentation fault when using Python API with 3rd party libraries

Using the GAMS Python OO API in combination with third party libraries (e.g. pandas) might fail with a segmentation fault on Linux and Mac OS X. This problem occurs if the third party library loads a version of the shared library libstdc++ which is not compatible with the GAMS Python OO API. The solution is to force the loading of the libstdc++ version that is distributed with the GAMS system. This can be done by importing the gams module at the very beginning before all other modules. Another possible workaround is to convince the third party library to load the GAMS version of libstdc++ by setting the LD_LIBRARY_PATH or the DYLD_LIBRARY_PATH to the GAMS system directory. All the mentioned solutions are just meant as workarounds. A better fix to the problem is to update the operating system to a newer version that comes with up-to-date system libraries.

IMPRESSUM / LEGAL NOTICEPRIVACY POLICY platform/segmentation_fault_when_using_python_api_with_3rd_party_libraries.txt · Last modified: 2018/08/06 11:09 by admin