Skip to content

New Port : Music Player Daemon #1519

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Damian2809
Copy link
Contributor

New Port for Music Player Daemon

Game Information

Submission Requirements

CFW Tests

Ensure your game has been tested on all major CFWs:

  • AmberELEC
  • ArkOS
  • ROCKNIX
  • muOS

Resolution Tests

Test all major resolutions:

  • 480x320
  • 640x480
  • 720x720 (RGB30)
  • Higher resolutions (e.g., 1280x720)

File Structure

  • Your port should have the following structure:
    • portname/
      • port.json
      • README.md
      • screenshot.jpg
      • cover.jpg
      • gameinfo.xml
      • Port Name.sh
      • portname/

Additional Resources

For an in-depth guide on creating a pull request, refer to: PortMaster Game Packaging Guide

Copy link
Collaborator

@Cebion Cebion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mate did you add whole ubuntu 20.04 as librarries into this port?

It helps if you compile some libraries yourself to skip 50 other libs loading just because you took them from a dist.

If a port wants x11 for example and doesn't even use it you could for example use patchelf to patch out that library and test it.

patchelf --remove-needed library.so.1 binary```

but like this its just lazy.

@Damian2809
Copy link
Contributor Author

Mate did you add whole ubuntu 20.04 as librarries into this port?

It helps if you compile some libraries yourself to skip 50 other libs loading just because you took them from a dist.

If a port wants x11 for example and doesn't even use it you could for example use patchelf to patch out that library and test it.

patchelf --remove-needed library.so.1 binary```

but like this its just lazy.

i think the main problem is ffmpeg here, so i will firstly try to compile it without it and then if that doesnt work, compile that

@Damian2809
Copy link
Contributor Author

Mate did you add whole ubuntu 20.04 as librarries into this port?

It helps if you compile some libraries yourself to skip 50 other libs loading just because you took them from a dist.

If a port wants x11 for example and doesn't even use it you could for example use patchelf to patch out that library and test it.

patchelf --remove-needed library.so.1 binary```

but like this its just lazy.

Ive just looked again and no its not possible to get fewer libs, i mean the only thing i could try is recompiling curl but i dont know what mpd needs from curl, nearly all other libs are libs needed directly by mpd beside some smaller things like libcairo and pulse needing x11

@Cebion
Copy link
Collaborator

Cebion commented Apr 16, 2025

This is not happening with +150 libraries.

@Damian2809
Copy link
Contributor Author

This is not happening with +150 libraries.

You can try to use lddtree and see that allot of libs are directly needed by mpd but I'm now compiling a version with a less libs, It should now be only a few 100

@Damian2809 Damian2809 closed this Apr 16, 2025
@Damian2809
Copy link
Contributor Author

going to close that for now, will reopen that once i have recompiled everything. So no one aciddentally think its good to PR

@Damian2809 Damian2809 reopened this Apr 17, 2025
@Damian2809
Copy link
Contributor Author

okay after compiling curl and libcairo it now uses a lot less libs

@ben-willmore
Copy link
Collaborator

There are libs in here which are included in every CFW and should not be in the port -- libc libdl libgcc_s libpthread. Also what about libsamplerate, libsndfile, libz ...? To get rid of these you can use something like this winnow.sh:

#!/bin/bash
# Usage: winnow.sh lib_dir
 
mkdir $1/disabled

for file in $1/*; do
  b=$(basename $file)
  if [[ -f /usr/lib/$b ]] || \
     [[ -f /usr/lib/aarch64-linux-gnu/$b ]] || \
     [[ -f /tmp/weston/lib_aarch64/$b ]]; then
    mv $1/$b $1/disabled/$b
  fi
done

Also there are still others that don't seem needed -- libnfs, libsqlite, libspeex, ...

@Damian2809
Copy link
Contributor Author

There are libs in here which are included in every CFW and should not be in the port -- libc libdl libgcc_s libpthread. Also what about libsamplerate, libsndfile, libz ...? To get rid of these you can use something like this winnow.sh:

#!/bin/bash
# Usage: winnow.sh lib_dir
 
mkdir $1/disabled

for file in $1/*; do
  b=$(basename $file)
  if [[ -f /usr/lib/$b ]] || \
     [[ -f /usr/lib/aarch64-linux-gnu/$b ]] || \
     [[ -f /tmp/weston/lib_aarch64/$b ]]; then
    mv $1/$b $1/disabled/$b
  fi
done

Also there are still others that don't seem needed -- libnfs, libsqlite, libspeex, ...

I assume the purpose of that .sh is that i tell it where the libs folder it and it removes that unneded file

the other libs are also needed like libnfs as mpd supports nfs mounting, libsqlite is for the db files but idk what libspeex is

@ben-willmore
Copy link
Collaborator

I assume the purpose of that .sh is that i tell it where the libs folder it and it removes that unneded file

You run it on (say) ArkOS, giving it the directory containing all your port's libs, and it will move the ones which are duplicates of those in default library locations to disabled/

the other libs are also needed like libnfs as mpd supports nfs mounting, libsqlite is for the db files but idk what libspeex is

I don't at all see why nfs mounting is required on a handheld. You can google libspeex, it is not required for music playing.

@Damian2809
Copy link
Contributor Author

I assume the purpose of that .sh is that i tell it where the libs folder it and it removes that unneded file

You run it on (say) ArkOS, giving it the directory containing all your port's libs, and it will move the ones which are duplicates of those in default library locations to disabled/

the other libs are also needed like libnfs as mpd supports nfs mounting, libsqlite is for the db files but idk what libspeex is

I don't at all see why nfs mounting is required on a handheld. You can google libspeex, it is not required for music playing.

I actually use NFS mounting so I don't need to copy over all my songs to 3 different devices, libspeex is needed for the Ice cast server, I could try to compile it without later,thanks Ill remove the unnecessary libs later too but I have the fear of removing some that are actually needed by some cfw

@ben-willmore
Copy link
Collaborator

It looks to me like there are still libraries in here that can't safely be included in a port -- libdl, libdrm. And others which don't seem needed -- libcdio*, libx*.

@ben-willmore
Copy link
Collaborator

I don't see any libraries that are sure to cause problems any more.

@JeodC JeodC requested a review from Cebion May 13, 2025 21:16
@ben-willmore
Copy link
Collaborator

ben-willmore commented May 13, 2025

Are you sure you have removed all the libraries that are already present in all the CFWs? libgomp is present in muos and rocknix, for example, and I suspect it may be on all of them (it's part of the GCC project). There may still be other libs like this that can and should be removed. Edit: here are some others that are not included in any other port, and are candidates for removal: libao, libsqlite3, libupnp, libdbus-1, libsamplerate. The script I gave you above would help identify these.

@ben-willmore
Copy link
Collaborator

I checked which libs are in the PR that are also in muOS and ArkOS using winnow.sh. I put a * next to libs that are in both. As you can hopefully see, a lot of these can likely be removed, because they are likely to be present on all CFWs.

muOS:

libFLAC.so.8 *
libao.so.4
libbsd.so.0 *
libcurl.so.4 *
libdbus-1.so.3 *
libexpat.so.1 *
libfaad.so.2 *
libgomp.so.1 *
libid3tag.so.0
liblz4.so.1 *
liblzma.so.5 *
libmp3lame.so.0 *
libogg.so.0 *
libopenal.so.1 *
libopus.so.0 *
libpcre2-8.so.0 *
libpulse.so.0 *
libpulsecommon-13.99.so
libsamplerate.so.0 *
libsndfile.so.1 *
libsqlite3.so.0 *
libtheora.so.0 *
libvorbis.so.0 *
libvorbisenc.so.2 *
libwrap.so.0 *
libz.so.1 *

Here is the result on ArkOS:

libbsd.so.0
libcdio_cdda.so.2
libcdio_paranoia.so.2
libcdio.so.18
libcrypto.so.1.1
libcurl.so.4
libdbus-1.so.3
libexpat.so.1
libfaad.so.2
libFLAC.so.8
libgomp.so.1
libixml.so.10
libjack.so.0
liblz4.so.1
liblzma.so.5
libmp3lame.so.0
libogg.so.0
libopenal.so.1
libopus.so.0
libpcre2-8.so.0
libpulse.so.0
libsamplerate.so.0
libsndfile.so.1
libsndio.so.7.0
libsoxr.so.0
libsqlite3.so.0
libssl.so.1.1
libtheora.so.0
libupnp.so.13
libvorbisenc.so.2
libvorbis.so.0
libwavpack.so.1
libwrap.so.0
libz.so.1

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