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

RuntimeError: libgs found, but is not in /usr/lib/libgs.so.10 #31

Closed
wroyca opened this issue Aug 9, 2023 · 12 comments
Closed

RuntimeError: libgs found, but is not in /usr/lib/libgs.so.10 #31

wroyca opened this issue Aug 9, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@wroyca
Copy link
Contributor

wroyca commented Aug 9, 2023

Environment

version and/or commit hash:

0.13.5

In Fedora 38, there is an issue with poxy being unable to locate libgs and additionally libgs doesn't get automatically installed, meaning we we need to resort to using our system's package manager as fallback:

Writing /tmp/poxy/home_wroy_hello_doc/conf.py
Generating HTML files with m.css
m.css failed!
m.css stderr:
    Traceback (most recent call last):
      File "/home/wroy/.local/lib/python3.11/site-packages/poxy/mcss/documentation/doxygen.py", line 58, in <module>
        import latex2svg
      File "/home/wroy/.local/lib/python3.11/site-packages/poxy/mcss/documentation/../plugins/latex2svg.py", line 73, in <module>
        raise RuntimeError('libgs found, but is not in ' +  libgs_absolute)
    RuntimeError: libgs found, but is not in /usr/lib/libgs.so.10

Deleting /tmp/poxy/home_wroy_hello_doc

*************

Traceback (most recent call last):
  File "/home/wroy/.local/lib/python3.11/site-packages/poxy/main.py", line 303, in main
    run(
  File "/home/wroy/.local/lib/python3.11/site-packages/poxy/run.py", line 1683, in run
    run_mcss(context)
  File "/home/wroy/.local/lib/python3.11/site-packages/poxy/run.py", line 1588, in run_mcss
    run_python_script(
  File "/home/wroy/.local/lib/python3.11/site-packages/misk/functions.py", line 355, in run_python_script
    return subprocess.run([_state().python, str(path)] + [arg for arg in args],
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['python3', '/home/wroy/.local/lib/python3.11/site-packages/poxy/mcss/documentation/doxygen.py', '/tmp/poxy/home_wroy_hello_doc/conf.py', '--no-doxygen', '--sort-globbed-files', '--debug']' returned non-zero exit status 1.

*************

--bug-report

poxy_bug_report.zip

@wroyca wroyca added the bug Something isn't working label Aug 9, 2023
@marzer
Copy link
Owner

marzer commented Aug 9, 2023

What even is libgs? This probably isn't a poxy bug, but some issue with fedora or etc, tbh. I'll double-check the dependencies but this is a new one to me.

Oh, right, so it's something in m.css: https://github.com/search?q=repo%3Amosra%2Fm.css%20libgs&type=code

@mosra
Copy link

mosra commented Aug 9, 2023

Libgs is what converts latex math into SVGs. I was fixing something similar recently, in mosra/m.css@ea904db, the comment above this very error message explains why this might fire (locating libraries is apparently not easy).

Do you have libgs.so, libgs.so.10 etc on your system? Where is it? I'll add it to the list of hardcoded paths.

@wroyca
Copy link
Contributor Author

wroyca commented Aug 9, 2023

Libgs is what converts latex math into SVGs. I was fixing something similar recently, in mosra/m.css@ea904db, the comment above this very error message explains why this might fire (locating libraries is apparently not easy).

Do you have libgs.so, libgs.so.10 etc on your system? Where is it? I'll add it to the list of hardcoded paths.

I do - I resolved it manually on my system, but on Fedora, libraries are typically installed in /usr/lib64

@mosra
Copy link

mosra commented Aug 9, 2023

Ah so if you'd change that line to have lib64 instead of lib, it would no longer complain?

On Arch /usr/lib64 is a symlink to /usr/lib, isn't /usr/lib a symlink to /usr/lib64 on Fedora? I'd expect both to be there.

@wroyca
Copy link
Contributor Author

wroyca commented Aug 9, 2023

Ah so if you'd change that line to have lib64 instead of lib, it would no longer complain?

Correct

On Arch /usr/lib64 is a symlink to /usr/lib, isn't /usr/lib a symlink to /usr/lib64 on Fedora? I'd expect both to be there.

I wish... it's not the first time it has caused issues. But alas no, both are distinct directory with their respective libs individually

@mosra
Copy link

mosra commented Aug 9, 2023

As of mosra/m.css@c34e860 it looks into /usr/lib64 as well (unless I messed up the for-else expression).

@wroyca wroyca closed this as completed Aug 9, 2023
@wroyca
Copy link
Contributor Author

wroyca commented Aug 9, 2023

As of mosra/m.css@c34e860 it looks into /usr/lib64 as well (unless I messed up the for-else expression).

Sweet, thank!

@mosra
Copy link

mosra commented Aug 9, 2023

Poxy still needs to get its copy of m.css updated tho ;)

@marzer
Copy link
Owner

marzer commented Aug 9, 2023

TIL for/else

@DavidAntliff
Copy link

FWIW, on Ubuntu systems (at least 22.04, 23.10, probably 24.04):

/usr/lib/x86_64-linux-gnu/libgs.so.10

Worked around with a symlink, but if you're going to hard-code paths to search for find_library() results, /usr/lib/x86_64-linux-gnu/ might be a good addition to the list.

@mosra
Copy link

mosra commented Jun 16, 2024

@marzer can you apply mosra/m.css@5235066 to poxy? That should fix this case as well, and hopefully all future ones too.

@marzer
Copy link
Owner

marzer commented Jun 16, 2024

Sure, thanks @mosra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants