MonetDBLite-Python icon indicating copy to clipboard operation
MonetDBLite-Python copied to clipboard

Segmentation fault after import monetdblite

Open jazzido opened this issue 7 years ago • 2 comments

Hi,

I'm building with stock Python 3.6.3 (from Pyenv) on macOS 10.13.3:

In [1]: import monetdblite
[1]    2611 segmentation fault  ipython

(Same behavior as #9)

jazzido avatar Feb 23 '18 19:02 jazzido

@Mytherin ?

hannes avatar Feb 24 '18 08:02 hannes

I believe I am hitting the same issue. The problem in my case is the following:

$ pip install monetdblite
[...installation output...]
$ python
Python 2.7.15 (default, May 15 2018, 15:37:31)
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import monetdblite
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kutsurak/.local/share/virtualenvs/foo-r-OLon9H/lib/python2.7/site-packages/monetdblite/__init__.py", line 13, in <module>
    from monetdblite import connections
  File "/home/kutsurak/.local/share/virtualenvs/foo-r-OLon9H/lib/python2.7/site-packages/monetdblite/connections.py", line 7, in <module>
    from monetdblite import cursors
  File "/home/kutsurak/.local/share/virtualenvs/foo-r-OLon9H/lib/python2.7/site-packages/monetdblite/cursors.py", line 9, in <module>
    from monetdblite import embeddedmonetdb
  File "/home/kutsurak/.local/share/virtualenvs/foo-r-OLon9H/lib/python2.7/site-packages/monetdblite/embeddedmonetdb.py", line 32, in <module>
    libs[0]), mode=ctypes.RTLD_GLOBAL)
  File "/usr/lib64/python2.7/ctypes/__init__.py", line 361, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/kutsurak/.local/share/virtualenvs/foo-r-OLon9H/lib/python2.7/site-packages/monetdblite/libmonetdb5.so: invalid ELF header
>>>

The workaround is to not use the published pypi version, but to clone the repository and compile from source as outlined in the README file:

$ git clone https://github.com/hannesmuehleisen/MonetDBLite-Python.git --depth 1 --recursive
$ python setup.py install

kutsurak avatar Jun 07 '18 12:06 kutsurak