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

libgcc_s.so.1 must be installed for pthread_cancel to work #85

Closed
Red-Eyed opened this issue Apr 1, 2020 · 19 comments
Closed

libgcc_s.so.1 must be installed for pthread_cancel to work #85

Red-Eyed opened this issue Apr 1, 2020 · 19 comments

Comments

@Red-Eyed
Copy link

Red-Eyed commented Apr 1, 2020

How one can actually use this package?
I like flatpack but I still have to sit on snap --classic version of this app.

This package (Pycharm) is completely unusable in flatpak.

I'm a datascience and use a lot of packages: pytorch, tensorflow, numpy, pandas, scikit-learn, opencv, CUDA, etc .

When I want to run my project, I get errors with missing shared libraries that above packages depend on.

Maybe this application can be used for hello words, but I can't make it work for no "pure python" projects.

Is there any workaround for such type of applications (IDE like)
Or I should just give up and use snap --classic ?

PS: Yes, I've found similar issues and it seams that I should give up, but I just want to make it finally clear: can I use IDE in flatpak or not.
Just wonder, how does gnome.Builder works. I guess it uses something like "host-spawn" but didn't find it in the sources.

@TingPing what can you say about this?

Thanks!

@FakeShemp
Copy link
Collaborator

Though not the best solution, you can at least ignore venv's and use the system python and libraries.

If there are just some straggler libraries missing, I don't see a problem to adding them in the manifests. And above that, there is always the possibility of extensions.

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

Usage of system python is impossible, project dependencies could take up to 10 GB
different projects has it's own set of deps with different versions and cannot intersect.

And yes, if IDE dictates me how to program and organize project: get rid of that IDE.

I mean: fighting with your IDE is a bad idea.

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

Regarding extension:
IDE is just like text editor and debug visualizer.
So, python projects works fine w/o any IDE and IDE is optional.

Extensions are just more dependencies, that's awful.

@FakeShemp
Copy link
Collaborator

Libraries are dependencies. They need to be available somewhere.

@FakeShemp
Copy link
Collaborator

Do you know which package need libgcc_s.so.1 so that I can test it?

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

shapely
pip install shapely[vectorized]
version 1.7.0

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

I can actually send you traceback:

    from shapely import geometry
  File "/home/redeyed/miniconda3/envs/gen3/lib/python3.7/site-packages/shapely/geometry/__init__.py", line 4, in <module>
    from .base import CAP_STYLE, JOIN_STYLE
  File "/home/redeyed/miniconda3/envs/gen3/lib/python3.7/site-packages/shapely/geometry/base.py", line 18, in <module>
    from shapely.coords import CoordinateSequence
  File "/home/redeyed/miniconda3/envs/gen3/lib/python3.7/site-packages/shapely/coords.py", line 8, in <module>
    from shapely.geos import lgeos
  File "/home/redeyed/miniconda3/envs/gen3/lib/python3.7/site-packages/shapely/geos.py", line 92, in <module>
    free = load_dll('c', fallbacks=c_alt_paths).free
  File "/home/redeyed/miniconda3/envs/gen3/lib/python3.7/site-packages/shapely/geos.py", line 62, in load_dll
    libname, fallbacks or []))
OSError: Could not find lib c or load any of its variants ['libc.musl-x86_64.so.1'].

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

@FakeShemp
Copy link
Collaborator

Thanks :)

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

Frankly speaking, the question was not in this particular error. Because this error is just a consequence of sandboxed environment.

But more like: "how one could use flatpak version of PyCharm with access to all system env?"

@FakeShemp
Copy link
Collaborator

Yes, I understand that, but I'm curious about it. And I need some issue to start looking at the problem from.

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

Got it.

@FakeShemp
Copy link
Collaborator

Conda seem to be missing from this manifest. With a new virtualenv I didn't have the same issues as you.

I have no experience with Conda. Does it load libraries differently than venv?

I know there are issues with sandboxing the IDE, I've made issues about it myself, but I'm thinking that they might be extra bad with a Conda environment.

I'll look into adding Conda too the manifest as soon as I can. It should be included anyway.

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

Strange error
I've reproduced it and have minimal complete example:
I use python 3.7.4

pip install -U pyqt5
pip install -U "shapely[vectorized]"

# file test.py
from PyQt5 import Qt
from shapely import geometry

python test.py

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

I'll look into adding Conda too the manifest as soon as I can. It should be included anyway.

What do u mean by manifest?
U mean to include conda as extension?
If so, it's not required and will be redundant.

I used only pypi and didn't use conda package manager
used it only to install python and create venv

@FakeShemp
Copy link
Collaborator

The flatpak manifest. The thing that tells flatpak how to install this app.

Conda would be bundled with this flatpak app by default since it's available for use directly in PyCharm. Right now it just complain that the Conda executable isn't found.

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

Whoa, it seems that everything works fine, when I changed order of imports (first shapely than qt)
Even heavy project with 8GB deps works like a charm in flatpak PyCharm.

Taking in mind sandbox, I though that such an error is just one of many possible errors related to sandbox.

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

Right now it just complain that the Conda executable isn't found.

So, install conda locally (use this script) and don't have any problems with conda.

And yes, it needs to set python interpreter in PyCharm, then u set conda env and it will see conda executable

sh-5.0$ which conda
/home/redeyed/miniconda3/condabin/conda

like so:
image

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

So now I can finally get rid of snap, as problem is weakly related to flatpak and sandbox
It seems that from PyQt5 import Qt makes shapely "blind" and it cannot find libc

@Red-Eyed
Copy link
Author

Red-Eyed commented Apr 1, 2020

I'm closing this issue, as problem is not related to flatpak version of PyCharm.

Thanks to @FakeShemp for the help!

@Red-Eyed Red-Eyed closed this as completed Apr 1, 2020
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