Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requires libncurses5 instead of 6? #2

Open
glubsy opened this issue Jan 3, 2018 · 3 comments
Open

Requires libncurses5 instead of 6? #2

glubsy opened this issue Jan 3, 2018 · 3 comments

Comments

@glubsy
Copy link

glubsy commented Jan 3, 2018

Installed after doing a small modification to the setup.py by changing "python" to "python2"
and changing httplib to http.client as httplib in build_firebird.py (since httplib is deprecated now). Then:

python setup.py bdist_wheel
sudo pip install dist/fdb_embedded*.whl

and it seems to have installed correctly.

Now calling fdb_embedded in my script yields the following error:

Traceback (most recent call last):
  File "./fdb_query.py", line 10, in <module>
  File "/usr/lib/python3.6/site-packages/fdb_embedded/fbcore.py", line 656, in connect
    load_api(fb_library_name)
  File "/usr/lib/python3.6/site-packages/fdb_embedded/fbcore.py", line 182, in load_api
    setattr(sys.modules[__name__],'api',fbclient_API(fb_library_name))
  File "/usr/lib/python3.6/site-packages/fdb_embedded/ibase.py", line 1214, in __init__
    fb_library = CDLL(fb_library_name)
  File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libncurses.so.5: cannot open shared object file: No such file or directory

Do I need to find libncurses5? Am I missing something obvious? Running Arch Linux, my libncurses shared libs are all version 6.

Edit: running an strace, it's clearly looking for libncurses5... maybe it should be bundled with it?

openat(AT_FDCWD, "/usr/lib/python3.6/site-packages/fdb_embedded/lib/libncurses.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/tls/libncurses.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/libncurses.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
@glubsy
Copy link
Author

glubsy commented Jan 3, 2018

Current workarounds?

OSError: libncurses.so.5: cannot open shared object file: No such file or directory

doing a symbolic link from my current Hopper installation:
sudo ln -s /opt/hopper-v4/lib/libncurses.so.5 /usr/lib/python3.6/site-packages/fdb_embedded/lib

OSError: libicuuc.so.30: cannot open shared object file: No such file or directory

doing a symbolic link:
sudo ln -s /usr/lib/python3.6/site-packages/fdb_embedded/lib/libicuuc.so{,.30}

OSError: libicudata.so.30: cannot open shared object file: No such file or directory

doing a symbolic link:
sudo ln -s /usr/lib/python3.6/site-packages/fdb_embedded/lib/libicudata.so{,.30}

OSError: libicui18n.so.30: cannot open shared object file: No such file or directory

doing a symbolic link:
sudo ln -s /usr/lib/python3.6/site-packages/fdb_embedded/lib/libicui18n.so{,.30}

OSError: libtinfo.so.5: cannot open shared object file: No such file or directory

doing a symbolic link from my hopper installation:
sudo ln -s /opt/hopper-v4/lib/libtinfo.so.5 /usr/lib/python3.6/site-packages/fdb_embedded/lib/

I sound like a robot. bleep bloop. Or like a dumb user. derp derp.

@andrewleech
Copy link
Owner

Hi @glubsy, I haven't looked at this for a few years so I'm not too sure.... I never actually ended up using this in a project.

I suspect you may do well by updating the version of the library that's bundled; see settings and urls in https://github.com/andrewleech/fdb_embedded/blob/embedded/build_firebird.py

@glubsy
Copy link
Author

glubsy commented Jan 3, 2018

Thanks, I guess I should have looked closer indeed. For now, everything seems to work for me.
But if I ever get around to successfully updating the install script, I'll make a pull request.

by the way, thanks for sharing this fork, it's quite useful to me (I think... just messing around)

Cheers~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants