LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Building .deb package with Meson/Ninja (https://www.linuxquestions.org/questions/debian-26/building-deb-package-with-meson-ninja-4175670818/)

shruggy 04-20-2020 03:28 AM

There should be ninja build log somewhere (probably in debian/build). Try to find it:
Code:

find /home/trent/Developer/budgie/budgie-desktop-10.5/ -name .ninja_log
It may contain additional information related to the build failure.

You seem trying to build a buster package on sid. My instructions above (debuild) were for building packages for the same release you are on though. Building for other releases (and often even for the same one) is usually done via pbuilder.

GeekBoy 04-21-2020 08:36 PM

I happen to have another system up with Debian 9 which does not have any funny stuff going on.

I was able to grab source version 10.2.9 on there.


Running
Quote:

dh $@ --buildsystem=meson
again produced
Code:

dh: Unknown sequence --buildsystem=meson (options should not come before the sequence)

So, what is up with that?

Quote:

debuild -us -uc
did make successful packages. I am guessing all those extra ones are other requirements/dependencies?


Looks like I am going to have to put together a special system just for building packages.

Next up is for me to figure out to give them custom names.

Thanks a lot for this help.

shruggy 04-22-2020 02:54 AM

Quote:

Originally Posted by GeekBoy (Post 6114303)
Code:

dh $@ --buildsystem=meson
again produced
Code:

dh: Unknown sequence --buildsystem=meson (options should not come before the sequence)

This line is supposed to be written into debian/rules, not to be run from the command prompt. Sorry if I was not clear on this. $@ here is make's authomatic variable meaning name of the rule target. This can only work from inside a Makefile (which debian/rules happens to be). The command line equivalent for the build step only would be
Code:

dh build --buildsystem=meson
Quote:

Looks like I am going to have to put together a special system just for building packages.
Absolutely not. Check pbuilder links at the end of this post. As mentioned in #8 above, I successfully built budgie-desktop-10.5-3 from Debian sid on Ubuntu 18.04 (bionic) inside pbuilder chroot. Actually, this is the recommended way to build packages for a Debian-based system. debuild is mainly only used as a shortcut for quick test builds.

pbuilder links:

GeekBoy 05-11-2020 08:33 PM

So I finally was able to get around to this.


I added in "--buildsystem=meson" to the bottom of the ../debian/rules file.

Then ran the "dh build --buildsystem=meson" and it is getting errors.

Code:

dh_auto_configure -O--buildsystem=meson
dh_auto_configure: unable to load build system class 'meson': Can't locate Debian/Debhelper/Buildsystem/meson.pm in @INC (you may need to install the Debian::Debhelper::Buildsystem::meson module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at (eval 2) line 2.
BEGIN failed--compilation aborted at (eval 2) line 2.

This seems to me a perl module, but I am unable to locate it.


Thanks again!

shruggy 05-12-2020 12:40 AM

File meson.pm is in the package debhelper:
Code:

$ apt-file search meson.pm
debhelper: /usr/share/perl5/Debian/Debhelper/Buildsystem/meson.pm


GeekBoy 05-23-2020 11:34 AM

Quote:

Originally Posted by shruggy (Post 6122013)
File meson.pm is in the package debhelper:
Code:

$ apt-file search meson.pm
debhelper: /usr/share/perl5/Debian/Debhelper/Buildsystem/meson.pm


Quote:

apt install debhelper
Reading package lists... Done
Building dependency tree
Reading state information... Done
debhelper is already the newest version (10.2.5).



Executing
Code:

apt-file search meson.pm
returns nothing.

shruggy 05-23-2020 11:56 AM

Wait, now I'm confused. In #5 you were using Debian unstable (sid). It was debhelper 12.9 back then. Now, you're showing me you're using debhelper 10.2.5, which is the version in oldstable (Stretch). As I said in #4:
Quote:

Originally Posted by shruggy (Post 6106537)
if you're on Debian 9 (Stretch) you should use debhelper from stretch-backports


GeekBoy 05-24-2020 01:00 AM

Thanks for clearing that up. I guess I should of review the whole thread each time I come back.

I got debhelper from stretch-backport on now.

Now I am getting different errors.

When running dh build --buildsystem=meson

It returns:


Quote:

ERROR: Neither directory contains a build file meson.build.
dh_auto_configure: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 meson .. --wrap-mode=nodownload --buildtype=plain --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=lib/x86_64-linux-gnu --libexecdir=lib/x86_64-linux-gnu returned exit code 1
When doing debuild -us -uc

It gives me

Code:

dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/budgie-desktop_10.2.9-2.diff.sAFm4E
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
dpkg-buildpackage: error: dpkg-source -b budgie-desktop-10.2.9 gave error exit status 2
debuild: fatal error at line 1116:
dpkg-buildpackage -rfakeroot -us -uc failed


Thanks for all the help.

I guess I will go research those

bnopod 01-03-2021 10:20 AM

Quote:

Originally Posted by shruggy (Post 6114360)
This line is supposed to be written into debian/rules, not to be run from the command prompt. Sorry if I was not clear on this. $@ here is make's automatic variable meaning name of the rule target. This can only work from inside a Makefile (which debian/rules happens to be). The command line equivalent for the build step only would be
Code:

dh build --buildsystem=meson

Definitely from make script:
Code:

#! /usr/bin/make -f
#export DH_VERBOSE=1

%:
        dh $@ --with=python3 --buildsystem=meson

Here's mine , debhelper will attempt to pass through all build stages (clean, configure, build, test, install) launched:
Code:

  dpkg-buildpackage --no-sign

GeekBoy 01-18-2021 10:24 PM

I will certainly give that a look. I have not done anything on this since this post. I guess I need to start working on that again.

Thanks for the input


All times are GMT -5. The time now is 11:21 AM.