LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackbuilding with meson/ninja for Pithos src to avoid flatpack (https://www.linuxquestions.org/questions/slackware-14/slackbuilding-with-meson-ninja-for-pithos-src-to-avoid-flatpack-4175647623/)

bamunds 02-04-2019 04:43 PM

Slackbuilding with meson/ninja for Pithos src to avoid flatpack
 
HOw does a person incorporate meson and ninja building into a slackbuild script?

I'm a Pandora user. I normally have Lumina as my DE. But once in a while I drop back to WindowMaker. Lumina has Pandora as its default media player. (To get it running you install pianobar.) Lumina then provides a rudimentary pianobar GUI front-end. I see where there is a universal GTK based front-end called Pithos. The problem is the developer is providing either a flatpack or the source. The build instructions steps call on both meson and ninja. I used AlienBob's Slackbuild script builder to create a basic slackbuild. But it failed to build because it looked for a pithos-1.4.1 file and the download is named master.tar.gz. So I created a copy as pithos-1.4.1.tar.gz. Then it complained about no directory pithos-1.4.1. I think I can handle these errors to fix the Slackbuild. But I'm more worried that it is going to fail when it comes to needing to build by meson and ninja.

Is there any special steps or commands which need to be followed when the developer calls for their source to use meson and ninja? Do I simply insert "meson build", "ninja -C build", "ninja -C build run", and "ninja -C build install" in place of other commands? Or will the slackbuild know to use meson and ninja? I have installed both meson and ninja as SBo's since they are obviously dependencies.

Appreciate the help.

PS. I guess I should have asked if anyone has alternate Pandora player for Slackware?
Or if anyone has another slackbuild I could use as an example of meson/ninja building?
Of if there is another tool to use after building to make the results a slackpkg, something like checkinstall maybe?

BradReed 02-04-2019 10:25 PM

I really don't know much about ninja or meson, but Slackware-current has them included.
ninja-1.9.0-x86_64-1
meson-0.49.1-x86_64-1

"man meson" gives examples for both meson and ninja usage.

bamunds 02-05-2019 02:44 PM

I decided to try to locally build the pithos using meson and ninja commands. But ran into an issue with a missing GIo file, unsolved right now, and then I was going to use makepkg on the resulting. But since this failed. I thought I'd download the source file and try the slackbuild again. After fixing the tar to deal with a .xz file the I get a new error which just doesn't make sense.

Why would the slackbuild error with "No such file or directory" on Line 112 which is referring to the SLKCFLAGS variable set earlier in the build script? The variable simply sets the architecture type?

I've read the meson man page and I'm still not sure where to put it in the slackbuild script?

Ian M 02-05-2019 02:59 PM

I don't know if this is any help but here's a slackbuild that uses meson and ninja https://slackbuilds.org/slackbuilds/...put.SlackBuild

bamunds 02-05-2019 04:54 PM

Ian, thanks I'll try some of these steps and see if it works. I appreciate your input. Cheers.

bassmadrigal 02-06-2019 02:05 AM

Quote:

Originally Posted by bamunds (Post 5958159)
Why would the slackbuild error with "No such file or directory" on Line 112 which is referring to the SLKCFLAGS variable set earlier in the build script? The variable simply sets the architecture type?

Maybe I missed it, but what are you trying to build and what commands did you run (or what is in the SlackBuild you're running)?

bamunds 02-07-2019 09:26 AM

Please read first post. The program I'm trying to build and what steps I took are in there. Thanks

bassmadrigal 02-08-2019 03:40 AM

Sorry, for some reason I was thinking "pithos" was some slang word for something that was pissing you off (like POS), and I didn't go back far enough to reread your initial post...

Without seeing your SlackBuild, it's impossible to know what's wrong. First guess if you're missing a backslash at the end of line 111.

As for the program working, I did have to install pygobject3-python3 and its dependencies (it complained about missing Gio, which is maybe what you meant when you put Glo?), then I was able to build pithos and run it with:

Code:

meson build
ninja -C build run

I don't have a pandora account, so I can't check whether it works, and I'm too lazy to make it into a Slackware package (if you don't want to run it after building, remove the "run" at the end of the second command).

I will say that I did this on a very unclean machine, meaning I have over 400 packages from SBo installed. There may be additional dependencies beyond the one I mentioned above.

bamunds 02-08-2019 11:49 AM

Thanks @bassmadrigal, you always help point me in the right direction. I've added the required deps (py3cairo, pygobjects-python3) and that helped. The build commands are still not working, except for ninja -C build install. This actually installs to /usr/share/local/pithos/pithos, is that an OK place to put a locally build app (I'll check standards)? More on this at https://github.com/pithos/pithos/wik...ng-from-Source referenced on the Pithos installation page.

I can then start Pithos, add my userid and pass, but I then get constant errors about missing gstreamer plugins without an identification of the missing plugins. Which is weird, because if I run pianobar cli it doesn't complain about any gstreammer plugins. These are the errors I'm seeing from Pithos.
Code:

ERROR - pithos:on_gst_error:1101 - Gstreamer error: gst-core-error-quark: Your GStreamer installation is missing a plug-in. (12), gsturidecodebin.c(1006): no_more_pads_full (): /GstPlayBin:player/GstURIDecodeBin:uridecodebin0:
no suitable plugins found:
gstdecodebin2.c(4558): gst_decode_bin_expose (): /GstPlayBin:player/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0:
no suitable plugins found:
Missing decoder: MPEG-1 Layer 3 (MP3) (audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true)
, 12

I suspect this is a reference issue within the builds expecting gstreamer to be installed in a different directory on Slackware than it is under Fedora and it's clones. What do you think?

I believe with ian's refernce to the libinput slackbuild (also uses meson/ninja) and your identification of which packages had to be added, that I'm on the way.

BTW, how did you identify from the error about Gio that it was in pygobjects-python3? That process of identifying where a dependency can be found is a mystery to me right now and I'd like to know without bother the great helpers here on such a simple issue. Thanks.

bassmadrigal 02-08-2019 12:08 PM

Quote:

Originally Posted by bamunds (Post 5959483)
Thanks @bassmadrigal, you always help point me in the right direction. I think with ian's example slackbuild and your identification of which packages had to be added, that I'm on the way. BTW, how did you identify from the error about Gio that it was in pygobjects-python3? That process of identifying where a dependency can be found is a mystery to me right now and I'd like to know without bother the great helpers here on such a simple issue. Thanks.

Just googling the error and reading through a few sites seemed to indicate it was tied to pygobject, so I searched on SBo and found the python3 version and installed it and the error went away. If it hadn't (or a new error came up), I would've resumed searching online and trying packages until I find the requirements.

dugan 02-08-2019 04:10 PM

My mpd SlackBuild for -current uses meson and ninja.

bamunds 02-14-2019 02:43 PM

I've also contacted Robby Workman (maintainer for pithos-SBo) to see if he has considered working on an upgrade from the early 0.3.17 to the latest 1.4.1. I tried his older slackbuild, it looks for a setup.py file, which was dropped when the devs moved to meson and ninja. I'll see what he replies with. In the meantime I've finding the older version works without issues.

bamunds 02-18-2019 02:36 PM

Robby did answer that he is waiting for 15.0 release to upgrade, because there are a number of dependencies which are already available in 15.0 that are not included in 14.2. I understand his desire to not fix something that is working which has no real functional change between the SBo he released for 14.2 and the latest which will be in 15.0.

In the meantime... I've actually down loaded the CLI commands for pianobar to have a cheat sheet.
I'm going to mark this solved. Since Robby does provide a Slackware SBo of Pithos for 14.2 and it worked properly, even though it isn't the latest.
Cheers


All times are GMT -5. The time now is 10:17 PM.