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

include libpulse and friends in AppImage, alternative solution for issue #756 #758

Closed
wants to merge 1 commit into from

Conversation

j4reporting
Copy link
Contributor

I think going back to mad is the simpler solution, though. And it has less potential to break things again.
List of libs included in the AppImages created.

libmad:

$ ./vkquake.AppImage --appimage-mount 
/tmp/.mount_vkquakAKNcAI
$  ll /tmp/.mount_vkquakAKNcAI/usr/lib/
total 3572
-rw-r--r--. 1 root root  265720 Jan  4 11:36 libFLAC.so.8
-rw-r--r--. 1 root root  141168 Jan  4 11:36 libmad.so.0
-rw-r--r--. 1 root root   51784 Jan  4 11:36 libogg.so.0
-rw-r--r--. 1 root root   51936 Jan  4 11:36 libopusfile.so.0
-rw-r--r--. 1 root root  388352 Jan  4 11:36 libopus.so.0
-rwxr-xr-x. 1 root root 2036480 Jan  4 11:36 libSDL2-2.0.so.0
-rw-r--r--. 1 root root   43408 Jan  4 11:36 libvorbisfile.so.3
-rw-r--r--. 1 root root  188680 Jan  4 11:36 libvorbis.so.0
-rw-r--r--. 1 root root  492896 Jan  4 11:36 libvulkan.so.1

libmpg123:

$ ./vkquake.AppImage --appimage-mount
/tmp/.mount_vkquakZwD0L5
$ ll //tmp/.mount_vkquakZwD0L5/usr/lib/
total 8736
-rw-r--r--. 1 root root   85480 Jan  2 21:54 libapparmor.so.1
-rw-r--r--. 1 root root   26208 Jan  2 21:54 libasyncns.so.0
-rw-r--r--. 1 root root  102280 Jan  2 21:54 libbsd.so.0
-rw-r--r--. 1 root root  348624 Jan  2 21:54 libdbus-1.so.3
-rw-r--r--. 1 root root  265720 Jan  2 21:54 libFLAC.so.8
-rw-r--r--. 1 root root 1178576 Jan  2 21:54 libgcrypt.so.20
-rw-r--r--. 1 root root  134808 Jan  2 21:54 liblz4.so.1
-rw-r--r--. 1 root root  168128 Jan  2 21:54 liblzma.so.5
-rw-r--r--. 1 root root  327640 Jan  2 21:54 libmpg123.so.0
-rw-r--r--. 1 root root  112024 Jan  2 21:54 libnsl.so.1
-rw-r--r--. 1 root root   51784 Jan  2 21:54 libogg.so.0
-rw-r--r--. 1 root root   51936 Jan  2 21:54 libopusfile.so.0
-rw-r--r--. 1 root root  388352 Jan  2 21:54 libopus.so.0
-rw-r--r--. 1 root root  557120 Jan  2 21:54 libpulsecommon-13.99.so
-rw-r--r--. 1 root root  343240 Jan  2 21:54 libpulse.so.0
-rwxr-xr-x. 1 root root 2036480 Jan  2 21:54 libSDL2-2.0.so.0
-rw-r--r--. 1 root root  516200 Jan  2 21:54 libsndfile.so.1
-rw-r--r--. 1 root root  734920 Jan  2 21:54 libsystemd.so.0
-rw-r--r--. 1 root root  697688 Jan  2 21:54 libvorbisenc.so.2
-rw-r--r--. 1 root root   43408 Jan  2 21:54 libvorbisfile.so.3
-rw-r--r--. 1 root root  188680 Jan  2 21:54 libvorbis.so.0
-rw-r--r--. 1 root root  492896 Jan  2 21:54 libvulkan.so.1
-rw-r--r--. 1 root root   47456 Jan  2 21:54 libwrap.so.0
-rw-r--r--. 1 root root   22472 Jan  2 21:54 libXau.so.6
-rw-r--r--. 1 root root   30616 Jan  2 21:54 libXdmcp.so.6

@j4reporting j4reporting changed the title include libpulse and friends in AppImage, alternative solution for issue novum#756 include libpulse and friends in AppImage, alternative solution for issue #756 Jan 6, 2025
@j4reporting
Copy link
Contributor Author

j4reporting commented Jan 6, 2025

I just realized: in case of a Mint/Ubuntu 22 system trying to open ALSA device instead of pulse, we would need even more libraries distributed in the AppImage
this is the error message:
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pulse.so (/lib/x86_64-linux-gnu/libsndfile.so.1: undefined symbol: mpg123_info2)

libasound_module_pcm_pulse.so would probably need these libraries included as well:

$ ldd /usr/lib/x86_64-linux-gnu/libasound.so
	linux-vdso.so.1 (0x00007ffd56534000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x000075b5416c0000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x000075b541400000)
	/lib64/ld-linux-x86-64.so.2 (0x000075b5418bc000)
$ ldd /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_pulse.so 
	linux-vdso.so.1 (0x00007ffc2a3d9000)
	libpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x0000700de3ee3000)
	libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x0000700de3de0000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000700de3a00000)
	libpulsecommon-15.99.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-15.99.so (0x0000700de3d5b000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000700de3c74000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x0000700de39b2000)
	/lib64/ld-linux-x86-64.so.2 (0x0000700de3f53000)
	libsndfile.so.1 => /lib/x86_64-linux-gnu/libsndfile.so.1 (0x0000700de3933000)
	libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x0000700de3c6d000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x0000700de37f3000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x0000700de3c43000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x0000700de372c000)
	libasyncns.so.0 => /lib/x86_64-linux-gnu/libasyncns.so.0 (0x0000700de3c39000)
	libapparmor.so.1 => /lib/x86_64-linux-gnu/libapparmor.so.1 (0x0000700de3717000)
	libFLAC.so.8 => /lib/x86_64-linux-gnu/libFLAC.so.8 (0x0000700de36db000)
	libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x0000700de36ae000)
	libvorbisenc.so.2 => /lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x0000700de3603000)
	libopus.so.0 => /lib/x86_64-linux-gnu/libopus.so.0 (0x0000700de35a5000)
	libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x0000700de3c2c000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x0000700de359f000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x0000700de3597000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x0000700de356c000)
	libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x0000700de349d000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x0000700de347d000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x0000700de3472000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x0000700de3334000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x0000700de331c000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x0000700de32f6000)
	libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x0000700de32e9000)

@Novum
Copy link
Owner

Novum commented Jan 6, 2025

Okay that is getting out of hand a little bit. Is there any way to make 123 not include all those dependencies?
It should only decode an MP3 bitstream for us, not include the sound system

@sezero
Copy link
Collaborator

sezero commented Jan 6, 2025

libmpg123 part of mpg123 package, the one we rely on, doesn't depend on anything other than libc: that's what I don't understand. Maybe its build system is making a mess. (If this was answered already, then I missed it and sorry.)

@sezero
Copy link
Collaborator

sezero commented Jan 6, 2025

libmpg123 part of mpg123 package, the one we rely on, doesn't depend on anything other than libc: that's what I don't understand. Maybe its build system is making a mess. (If this was answered already, then I missed it and sorry.)

Here is what ldd says about freshly built libmpg123 from their latest 1.32.10 release:

$ ldd libmpg123.so
	linux-gate.so.1 =>  (0x0076e000)
	libm.so.6 => /lib/libm.so.6 (0x00ad0000)
	libc.so.6 => /lib/libc.so.6 (0x002a6000)
	/lib/ld-linux.so.2 (0x00472000)

@j4reporting
Copy link
Contributor Author

j4reporting commented Jan 6, 2025

libmpg123 is linked to other libraries used by the system like libsndfile and the AppImage forces the use of our old libmpg123 library. It does not have the mpg123_info2 symbol found in newer versions
I guess the mpg123 project should have increased the library suffix for libmpg123 at some point?

see comment #756 (comment)

when sdl2 opens a pulse audio devide it loads libpulse.so -> libsndfile.so -> libmpg123 ( with the mpg123_info2 symbol)

@sezero
Copy link
Collaborator

sezero commented Jan 6, 2025

That's a mess.

Well, then my suggestion would be using libmad for linux app image.

@sezero
Copy link
Collaborator

sezero commented Jan 6, 2025

OK, killing this one in favor of #757

@sezero sezero closed this Jan 6, 2025
@j4reporting j4reporting deleted the issue_756 branch January 6, 2025 22:41
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 this pull request may close these issues.

3 participants