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

error in openSUSE Tumbleweed #218

Open
jpbsilva opened this issue Aug 29, 2019 · 9 comments
Open

error in openSUSE Tumbleweed #218

jpbsilva opened this issue Aug 29, 2019 · 9 comments

Comments

@jpbsilva
Copy link

jpbsilva commented Aug 29, 2019

Module not working in openSUSE Tumbleweed.

Just after install the plugin got the error below:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/cx_Freeze/initscripts/__startup__.py", line 14, in run
  File "/usr/local/lib/python3.6/dist-packages/cx_Freeze/initscripts/Console.py", line 26, in run
  File "pgsqltoolsservice/pgtoolsservice_main.py", line 11, in <module>
  File "/usr/local/lib/python3.6/dist-packages/ptvsd/__init__.py", line 17, in <module>
  File "/usr/local/lib/python3.6/dist-packages/ptvsd/attach_server.py", line 35, in <module>
  File "/usr/local/lib/python3.6/dist-packages/ptvsd/visualstudio_py_debugger.py", line 24, in <module>
  File "/usr/lib/python3.6/ctypes/__init__.py", line 7, in <module>
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
[Error - 15:36:08] Connection to server got closed. Server will not be restarted.

Installed version of libffi:

$ rpm -qa | grep libffi
libffi7-32bit-3.2.1.git259-6.8.x86_64
libffi7-3.2.1.git259-6.8.x86_64
libffi-devel-3.2.1.git259-6.8.x86_64
@stevedorries
Copy link

I'm getting the same error in openSUSE Leap 15.0 as of 11 November, 2019

$ rpm -qa | grep libffi
libffi7-32bit-3.2.1.git259-lp150.3.3.x86_64
libffi-devel-3.2.1.git259-lp150.3.3.x86_64
libffi7-3.2.1.git259-lp150.3.3.x86_64

Janky, Not at All Recommended Workaround

I created a symlink to /usr/lib64/libffi.so called /usr/lib64/libffi.so.6 then uninstalled the extension and installed it fresh, the error wasn't reproduced. Now, I'm not entirely certain if there are any breaking changes that would make this crash at runtime, and I AM 100% certain that this is not the right way to fix it, but it seems to have worked for me, for now.

@jpbsilva
Copy link
Author

Yes, this is a workaround, not a good solution.

I did the same:

[root@nb2 ~]# l /usr/lib64/libffi*
lrwxrwxrwx 1 root root  15 Oct 17 07:24 /usr/lib64/libffi.so -> libffi.so.7.1.0
lrwxrwxrwx 1 root root  11 Oct 16 13:13 /usr/lib64/libffi.so.6 -> libffi.so.7
lrwxrwxrwx 1 root root  15 Oct 17 07:24 /usr/lib64/libffi.so.7 -> libffi.so.7.1.0
-rwxr-xr-x 1 root root 43K Oct 17 07:24 /usr/lib64/libffi.so.7.1.0
[root@nb2 ~]# 

@sgryphon
Copy link

sgryphon commented Aug 25, 2021

There are multiple copies of this same bug, but this issue (#218) is the earliest I can find open.

This bug should be fixed. There is a comment about fixing it on one of the duplicates (#251)

They have the same error, a dialog that pops up on start and says "OSS DB Tools Service component exited unexpectedly. Please restart Azure Data Studio.", then an error reported in the output section:

"It seems the debugger cannot resolve /opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/posixpath.py
This may make the debugger miss breakpoints in the standard library.
Related bug: https://bugs.python.org/issue1180193
... a stack trace ...
ImportError: libffi.so.6: cannot open shared object file: No such file or directory
[Error - 12:57:17 PM] Connection to server got closed. Server will not be restarted."

The important bit is the missing "libffi.so.6"

There are many other duplicates (that should probably be closed and directed to here)

#239
#251
#275
#279
#280
#282
#283

Work around:

So far, the workaround for some systems linking libffi.so.6 to version 7 seems to work:

sudo ln -s libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6

The workaround does not work if you only have version 8, e.g. Ubuntu 20.10 -- it gets past the first error but then just fails. You can check which version you have via:

ls -la /usr/lib/x86_64-linux-gnu/libffi*

The other workaround is to directly install the version 6 libraries directly:

curl -o libffi6_3.2.1-8_amd64.deb http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
sudo apt install ./libffi6_3.2.1-8_amd64.deb

@cbcoutinho
Copy link

For those who are coming here for openSUSE Tumbleweed (or others that only offer version 8 of libffi) see the note above:

The workaround does not work if you only have version 8, e.g. Ubuntu 20.10 -- it gets past the first error but then just fails.

I found that the server:monitoringrepo on OBS still offerslibffi6`, which you can access by adding the following repo:

$ sudo zypper ar https://download.opensuse.org/repositories/server:monitoring/openSUSE_Tumbleweed/server:monitoring.repo
$ sudo zypper ref
$ sudo zypper install libffi6

@reporter123
Copy link

reporter123 commented Jan 17, 2022

This most defiantly is not fixed yet or the VSCode postgres Extension is pulling an outdated version.

@santhosh-reddy03
Copy link

the ptvsd(python tool for vs debugger) module which is being used in ossdbtoolsservice_main.py is no longer active, looks the same old module is being shipped and its creating issues, the ubuntu 20.04 uses newer version which is libffi.so.7.1.0.

@martimors
Copy link

martimors commented Oct 6, 2022

It's been years, and this has not been fixed. Trying to run ADS on Ubuntu 22.04 (Jammy Jellyfish) to no avail. Anyone successfuly installed and used the extension on 22.04?

Edit: Ok, looking at the issue tracker, lots of people are having this issue for a long time already. Is this product abandoned or what? Nearing one year since the last commit as well.

@reporter123
Copy link

ptvsd appears to be dead that is root cause of this issue.

@vicspina
Copy link

vicspina commented Dec 1, 2023

Thanks

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

8 participants