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

Cannot find GTK on Debian 12 i386 #50

Closed
rmartin16 opened this issue Jul 14, 2023 · 2 comments · Fixed by #51
Closed

Cannot find GTK on Debian 12 i386 #50

rmartin16 opened this issue Jul 14, 2023 · 2 comments · Fixed by #51

Comments

@rmartin16
Copy link
Contributor

rmartin16 commented Jul 14, 2023

Doing some experimenting on i386 Debian and the plugin errored when trying to install GTK in to the AppImage.

The issue stems from how the library prefix is derived in search_library_path:

    PATH_ARRAY=(
        "/usr/lib/$(uname -m)-linux-gnu"
        "/usr/lib64"
        "/usr/lib"
    )

The arch returned from uname -m is i686 but the relevant directory is /usr/lib/i386-linux-gnu/. And since /usr/lib64/ exists, it uses that instead.

LD_GTK_LIBRARY_PATH=/usr/lib/i386-linux-gnu/ is a pretty simple workaround though.

Partial AppImage Build Log
[gtk/stdout] Installing GTK 3.0 modules
[gtk/stderr] ++ local library=gtk+-3.0
[gtk/stdout] /usr/lib64 ~/tmp/beeware/helloworld/build/helloworld/linux/appimage
[gtk/stderr] ++ local default_value=/usr
[gtk/stderr] +++ pkgconf --variable=exec_prefix gtk+-3.0
[gtk/stderr] ++ pkgconfig_ret=
[gtk/stderr] ++ '[' -n '' ']'
[gtk/stderr] ++ '[' -n /usr ']'
[gtk/stderr] ++ echo /usr
[gtk/stderr] + gtk3_exec_prefix=/usr
[gtk/stderr] ++ get_pkgconf_variable libdir gtk+-3.0 /usr/lib64
[gtk/stderr] ++ local variable=libdir
[gtk/stderr] ++ local library=gtk+-3.0
[gtk/stderr] ++ local default_value=/usr/lib64
[gtk/stderr] +++ pkgconf --variable=libdir gtk+-3.0
[gtk/stderr] ++ pkgconfig_ret=
[gtk/stderr] ++ '[' -n '' ']'
[gtk/stderr] ++ '[' -n /usr/lib64 ']'
[gtk/stderr] ++ echo /usr/lib64
[gtk/stderr] + gtk3_libdir=/usr/lib64/gtk-3.0
[gtk/stderr] + gtk3_path=/usr/lib64/gtk-3.0
[gtk/stderr] ++ get_pkgconf_variable gtk_binary_version gtk+-3.0 3.0.0
[gtk/stderr] ++ local variable=gtk_binary_version
[gtk/stderr] ++ local library=gtk+-3.0
[gtk/stderr] ++ local default_value=3.0.0
[gtk/stderr] +++ pkgconf --variable=gtk_binary_version gtk+-3.0
[gtk/stderr] ++ pkgconfig_ret=
[gtk/stderr] ++ '[' -n '' ']'
[gtk/stderr] ++ '[' -n 3.0.0 ']'
[gtk/stderr] ++ echo 3.0.0
[gtk/stderr] + gtk3_immodulesdir=/usr/lib64/gtk-3.0/3.0.0/immodules
[gtk/stderr] ++ get_pkgconf_variable gtk_binary_version gtk+-3.0 3.0.0
[gtk/stderr] ++ local variable=gtk_binary_version
[gtk/stderr] ++ local library=gtk+-3.0
[gtk/stderr] ++ local default_value=3.0.0
[gtk/stderr] +++ pkgconf --variable=gtk_binary_version gtk+-3.0
[gtk/stderr] ++ pkgconfig_ret=
[gtk/stderr] ++ '[' -n '' ']'
[gtk/stderr] ++ '[' -n 3.0.0 ']'
[gtk/stderr] ++ echo 3.0.0
[gtk/stderr] + gtk3_printbackendsdir=/usr/lib64/gtk-3.0/3.0.0/printbackends
[gtk/stderr] ++ dirname /usr/lib64/gtk-3.0/3.0.0/immodules
[gtk/stderr] + gtk3_immodules_cache_file=/usr/lib64/gtk-3.0/3.0.0/immodules.cache
[gtk/stderr] ++ search_tool gtk-query-immodules-3.0 libgtk-3-0
[gtk/stderr] ++ local tool=gtk-query-immodules-3.0
[gtk/stderr] ++ local directory=libgtk-3-0
[gtk/stderr] ++ command -v gtk-query-immodules-3.0
[gtk/stderr] ++ PATH_ARRAY=("/usr/lib/$(uname -m)-linux-gnu/$directory/$tool" "/usr/lib64/$directory/$tool" "/usr/lib/$directory/$tool" "/usr/bin/$tool" "/usr/bin/$tool-64" "/usr/bin/$tool-32")
[gtk/stderr] +++ uname -m
[gtk/stderr] ++ for path in "${PATH_ARRAY[@]}"
[gtk/stderr] ++ '[' -x /usr/lib/i686-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 ']'
[gtk/stderr] ++ for path in "${PATH_ARRAY[@]}"
[gtk/stderr] ++ '[' -x /usr/lib64/libgtk-3-0/gtk-query-immodules-3.0 ']'
[gtk/stderr] ++ for path in "${PATH_ARRAY[@]}"
[gtk/stderr] ++ '[' -x /usr/lib/libgtk-3-0/gtk-query-immodules-3.0 ']'
[gtk/stderr] ++ for path in "${PATH_ARRAY[@]}"
[gtk/stderr] ++ '[' -x /usr/bin/gtk-query-immodules-3.0 ']'
[gtk/stderr] ++ for path in "${PATH_ARRAY[@]}"
[gtk/stderr] ++ '[' -x /usr/bin/gtk-query-immodules-3.0-64 ']'
[gtk/stderr] ++ for path in "${PATH_ARRAY[@]}"
[gtk/stderr] ++ '[' -x /usr/bin/gtk-query-immodules-3.0-32 ']'
[gtk/stderr] + gtk3_immodules_query=
[gtk/stderr] + copy_lib_tree /usr/lib64/gtk-3.0 '/home/user/tmp/beeware/helloworld/build/helloworld/linux/appimage/Hello World.AppDir/'
[gtk/stderr] + src=('/usr/lib64/gtk-3.0')
[gtk/stderr] + local src
[gtk/stderr] + local 'dst=/home/user/tmp/beeware/helloworld/build/helloworld/linux/appimage/Hello World.AppDir/'
[gtk/stderr] + for elem in "${src[@]}"
[gtk/stderr] + mkdir -p '/home/user/tmp/beeware/helloworld/build/helloworld/linux/appimage/Hello World.AppDir/usr/lib/gtk-3.0'
[gtk/stderr] + pushd /usr/lib64
[gtk/stderr] ++ realpath --relative-to=/usr/lib64 /usr/lib64/gtk-3.0
[gtk/stderr] + cp gtk-3.0 --archive --parents '--target-directory=/home/user/tmp/beeware/helloworld/build/helloworld/linux/appimage/Hello World.AppDir//usr/lib' --verbose
[gtk/stderr] cp: cannot stat 'gtk-3.0': No such file or directory
ERROR: Failed to run plugin: gtk (exit code: 1) 
@TheTumultuousUnicornOfDarkness
Copy link
Collaborator

@rmartin16 what is the output of the dpkg --print-architecture command on your system, please?

@rmartin16
Copy link
Contributor Author

@rmartin16 what is the output of the dpkg --print-architecture command on your system, please?

$ dpkg --print-architecture
i386

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

Successfully merging a pull request may close this issue.

2 participants