Skip to content

AppDir is not properly deployed by go-appimage #4061

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

Closed
miticollo opened this issue Apr 27, 2025 · 10 comments
Closed

AppDir is not properly deployed by go-appimage #4061

miticollo opened this issue Apr 27, 2025 · 10 comments
Labels

Comments

@miticollo
Copy link

Environment

  • TeXstudio: git 4.8.7-7-gbb1eef3e0 (AppImage)
  • Qt: Version 5.15.3, compiled with Qt 5.15.3 R
  • OS: Manjaro on Linux kernel 6.1.134-1
  • TeX distribution: TeXLive 2025

Expected behavior

A successful compilation.

See also foo.log compile with TeXstudio git 4.8.6-49-gb5a13eb40.

Actual behavior

In Message tab appears:

Process started: pdflatex -synctex=1 -interaction=nonstopmode --file-line-error "foo".tex

Fatal Python error: Failed to import encodings module Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x00007f59e244ebc0 (most recent call first): <no Python frame>
system returned with code 256
Process exited with error(s)


Process started: pdflatex -synctex=1 -interaction=nonstopmode --file-line-error "foo".tex

Fatal Python error:
Failed to import encodings module

Python runtime state:
core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x00007fcddbb9abc0 (most recent call first): <no Python frame>
system returned with code 256
Process exited with error(s)

See also foo.log.

I get a compiled PDF without syntax highlighting because pygmentize is not properly invoked.

How to reproduce

Consider the following MWE:

\documentclass{article}
\usepackage{minted}
\begin{document}
	\begin{minted}{c}
		int main() {
			printf("hello, world");
			return 0;
		}
	\end{minted}
\end{document}

At the moment to workaround this issue, I use the build version based on this commit. You can download it from here.

@sunderme
Copy link
Member

sunderme commented Apr 27, 2025

works fine on Ubuntu 24.04

2 Points:

  1. Manjaro is not our build. I would recommend building locally against Qt6.
  2. check that it actually works on commandline directly.

@miticollo
Copy link
Author

1. Manjaro is not our build. I would recommend building locally against Qt6.

I followed your cd.yml and I successfully compiled TeXstudio. It works! Anyway I used Qt5.

2. check that it actually works on commandline directly.

It always works. I use the following command:

latexmk --halt-on-error --file-line-error -pdflualatex=/usr/local/texlive/2025/bin/x86_64-linux/lualatex -lualatex foo.tex

Anyway I noticed that if I use AppImage (based on latest commit) every GUI label is in English and I can't change the UI language. This doesn't happen with my version locally compiled. Compare below.

Compiled locally AppImage
Image

@miticollo
Copy link
Author

miticollo commented Apr 27, 2025

Mystery SOLVED!

I thought that the issue could be linked to AppImage. I'm not an expert but it seems that an AppImage created with go-appimage doesn't correctly detects Python outside its squashfs. To test this hypothesis, I revert some commits to use linuxdeployqt again. I know it is deprecated. Furthermore, I solved also the issue related to language selection for GUI labels.

To test download my Linux AppImage here, look logs here.

@sunderme
Copy link
Member

appimage 4.8.7 also works without problem on ubuntu 24.04

@miticollo
Copy link
Author

Another step forward.

This issue appears specifically here: it seems go-appimage doesn't work like linuxdeployqt. I tried to invoke linuxdeployqt with -verbose=3 and I discovered that also translations are deployed. Probably go-appimage doesn't do it and for this reason I can't change GUI language. Unfortunately, when you run linuxdeployqt with -appimage it invokes appimagetool from shell and this tool is installed by default on Ubuntu GitHub Runner, but it's obsolete (2020). In particular here you can find the release installed on Ubuntu. Now there are two solutions: replace with appimagetool with the newer one suggested in the release of the old version or use go-appimage only to create AppImage from AppDir, even if a better solution should be to use mkappimage because you can pass some args.

So I tried to deploy using linuxdeployqt and then create AppImage with go-appimage: IT WORKS! Look this commit.

To test download my Linux AppImage here, look logs here.

@miticollo
Copy link
Author

I download the official AppImage from here. It wasn't properly bundled. I tested it on Ubuntu 24.04.2 LTS. You can't change the GUI lang and I suppose that it is not possible to compile a document that uses minted.

Video.del.2025-04-29.12-04-17.webm

@miticollo miticollo changed the title It's not possible to compile a document that uses minted package AppDir is not properly deployed by go-appimage Apr 29, 2025
@sunderme
Copy link
Member

sunderme commented May 9, 2025

updated internal paths

@sunderme sunderme closed this as completed May 9, 2025
@miticollo
Copy link
Author

It is not solved. Now languages are showed but TeXstudio can't load them.

recording.webm

miticollo added a commit to miticollo/texstudio that referenced this issue May 9, 2025
@miticollo
Copy link
Author

After this commit languages are correctly bundled into AppImage. Anyway there is still an issue with minted and probably other packages that require external binaries but inside TeXLive distribution.

Consider the video below. Steps:

  1. Compilation successfully works on TeXstudio 4.8.6.
  2. After workspace cleaning up, repeat the previous compilation on TeXstudio based on latest commit: it fails.
  3. Log checking. It seems that latexminted is not on $PATH, but it's.
  4. Last cleaning up, repeat compilation using CLI: it works.

video.tar.gz

@sunderme
Copy link
Member

fixed

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

No branches or pull requests

2 participants