/srv/irclogs.ubuntu.com/2021/07/06/#ubuntu-devel.txt

RAOFDo we not get build logs for riscv?02:56
RAOFcf: https://launchpad.net/ubuntu/+source/mir/2.4.1-0ubuntu1/+build/2175147602:57
=== lucas_ is now known as lucas
cjwatsonRAOF: You do if the buildd-manager doesn't get "No route to host" at some point during the build.  (I'm not entirely sure why, as the build seems to have completed successfully as far as the builder was concerned.  Maybe it overloaded the VM host such that it couldn't do networking for a bit or something?)07:53
cjwatsonRAOF: https://people.canonical.com/~cjwatson/tmp/mir-21751476.log if that's helpful.  I've retried that build again, so let's see08:00
=== cpaelzer_ is now known as cpaelzer
=== alan_g_ is now known as alan_g
=== cmagina_ is now known as cmagina
=== genii-core is now known as genii
bittinHello, Any SRU/MRU meeting today ?14:24
=== not_phunyguy is now known as phunyguy
=== mwhudson_ is now known as mwhudson
mwhudsondoko, mclemenceau: ha my glibc snapshot packages are completely broken21:27
mwhudsondpkg (subprocess): unable to execute old libc6:amd64 package post-removal script (/var/lib/dpkg/info/libc6:amd64.postrm): Permission denied21:29
soreaulaunchpad ppa, I uploaded package A which installs A.pc but when I try to install dependent package B, it says it can't find A even though pkg-config is installed21:55
soreauhow can I solve this?21:55
soreauA is included in B's build depends21:55
sarnoldwhat's the exact error you're working with? I can't tell if you're working an apt erorr, dpkg error, or gcc error..21:56
soreausarnold: it's meson error21:57
soreaumeson even says it tried pkg-config21:57
soreauso I'm not understanding how it can't find a .pc file installed in /usr/lib/$libdir/pkgconfig21:58
sarnoldaha; if you run the same pkg-config command by hand does it work okay?21:59
soreausarnold: how can I do that? this is a failure in the ppa launchpad builder, it works fine locally21:59
sarnoldsoreau: ahhhhh22:00
sarnoldhow are you doing the local builds? I think sbuild is the 'closest' match to the builders on launchpad22:00
soreaudpkg-buildpackage22:01
sarnoldah, that'll use whatever's installed on your computer rather than building a reproducable build environment22:02
sarnoldtry setting up sbuild locally and see if you can recreate the problem22:02
soreauI'm just using it to generate source package to upload22:02
soreausarnold: even if I recreate it locally, how does this help me solve it?22:02
soreauI'm more interested in the ways that this can possibly happen..22:04
soreauA.pc is installed, B's meson build system can't find it with pkg-config22:04
soreauin launchpad ppa builder22:05
soreauand pkg-config is installed22:05
sarnoldsoreau: you could compare the packages that are installed during the build against the packages that are installed on your system; or you could compare the opensnoop-bpfcc output during the good build against the bad build and see which files might be missing, etc22:05
mwhudson-rw-r--r-- root/root    220376 2021-06-28 02:52 ./lib64/ld-linux-x86-64.so.222:06
mwhudsonumm22:06
sarnoldthat's cute..22:08
mwhudsonso my glibc 2.34 snapshot packages _build_ fine but they sure don't _work_22:09
cjwatsonsoreau: Reproducing it locally helps you solve it because you can get a shell in an environment corresponding to the build failure, find what command meson is actually running, and poke around starting from there.22:42
cjwatsonsoreau: Maybe meson is running pkg-config in a weird way, maybe there's some non-default path that needs to be set up, maybe something else, I don't know.  Speculating on it is likely to be less productive than trying to set up a reproducer, in my experience.22:43
soreaucjwatson: so you can get a shell to the environment that mimics the launchpad build environment22:44
cjwatsonsoreau: sbuild is usually close enough for this sort of thing, yes22:44
soreauthat would be helpful as eyes to have indeed22:44
soreauso I have no idea how to use this sbuild thing22:45
cjwatsonhttps://wiki.ubuntu.com/SimpleSbuild22:45
soreauthanks22:46
cjwatsonThere's a moderate amount of setup the first time you use it, then it's pretty low-effort after that22:46
soreauwell I expected work when making a ppa, I didn't expect it to work against me22:46
cjwatsonI doubt it's specific to Launchpad22:49
soreaucjwatson: this tells you to add a line to fstab to a nonexistent directory /scratch22:51
cjwatsonIndeed, your build failure reproduces locally22:51
soreauand doesn't tell you to create it afaict22:51
soreaucjwatson: well can you just tell me what the problem is?22:52
cjwatsonSo I'm too tired to work out what might be wrong with the wiki page22:52
cjwatsonBut are you intending to use libgbm in this package?22:52
soreauI mean doesn't /usr/lib/$libdir/pkgconfig/wlroots.pc exist?22:52
soreauand doesn't `pkg-config --modversion wlroots` find it?22:52
cjwatson"pkg-config --modversion wlroots" works - the build log says as much.  But "pkg-config --cflags wlroots" fails, saying that gbm isn't present22:53
soreauwell darn22:54
cjwatsonPerhaps this is a wlroots bug - if it needs gbm then surely it should depend on libgbm-dev22:54
cjwatsonOr this package could Build-Depends: libgbm-dev22:54
soreauyea22:54
* soreau tries22:54
cjwatsonI don't know which is better in this case22:54
cjwatsonI would normally assume that if a pkg-config file requires some other library then it's the job of the package shipping that pkg-config file to handle the Depends22:54
cjwatsonBut maybe there's some odd special case here22:54
cjwatsonAlso it's odd for the pkg-config file to be in wlroots rather than in libwlroots-dev, but I don't know this particular library22:55
cjwatsonYou would normally want to split out the development files so that you don't have to drag in all the development dependencies at runtime22:55
cjwatsonSo usually you'd have /usr/lib/*/libwlroots.so.10 in a libwlroots10 package, and /usr/include, /usr/lib/*/pkgconfig, and /usr/lib/*/libwlroots.so in libwlroots-dev22:56
cjwatsonThen it'd be easy to give libwlroots-dev proper dependencies on the other -dev packages it needs22:57
soreaucjwatson: but dragging in the dev deps doesn't make it run any slower, it just consumes more disk space, right?22:57
cjwatsonAny system that builds the source package in a clean chroot with only its build-dependencies installed would have detected this22:57
cjwatsonI mean sure22:57
soreauthis is for desktop, where if you don't have enough disk space, you have no business running this software22:58
cjwatsonBut what I'm describing is completely conventional Debian library packaging and there's no reason not to do it22:58
cjwatsonAnd sometimes -dev packages do end up with slightly weird dependencies for one reason or another so they shouldn't be pulled in frivolously on desktop systems22:58
soreaueither the computer is working or it isn't, who cares how it works :P22:59
cjwatsonEither you take my advice or you don't :)22:59
soreaucjwatson: I understand what you're saying, I'm mostly being facetious23:00
soreaubut I am not trying to get this software into upstream, that is a pro packager's job23:00
cjwatsonI'm mostly just giving this advice now because it's way easier to fix this sort of thing before names get entrenched23:00
cjwatsonBut sure, you could also hack around it23:01
soreaunames?23:01
cjwatsonPackage names23:01
soreauwell that's not my fault if it happens23:01
cjwatsonSince you have them in Build-Depends of other packages in your PPA23:01
cjwatsonSo it's easier to just get them right to start with23:01
soreau'right'?23:01
soreauthat's subjective23:02
cjwatsonNo it's not, not here23:02
soreaufair enough23:02
cjwatsonThere are packaging standards that define right23:02
sarnoldand had they been followed, you probably would have had things just work23:02
cjwatsonYou can absolutely ignore them and do your own thing, but you'll be working against some tools if you do so, so in my experience it's just making a rod for your own back23:02
soreauwell I can't do my first ppa 'right' the very first time, I'm not perfect23:03
cjwatsonOh absolutely23:03
soreauI'm not ignoring you either, just not really understanding why packages are split23:03
cjwatsonI'm just making recommendations for the easiest path to a fix23:03
sarnoldwe joke about "the debian handshake" :)23:03
soreauwhy not just do like it makes sense and make source package == deb package and have none of these -dev packages23:04
cjwatsoneh, I dislike that joke TBH, it's too close to gatekeeping for my liking23:04
soreauI mean what is the purpose of splitting things up in the first place23:04
cjwatsonBecause disk space is not a trivial concern23:04
cjwatsonAnd -dev packages sometimes need to depend on complex things, more than just "some more files in /usr/include and /usr/lib"23:04
soreaubut why not just make it binary - either package X is installed, or it's not23:05
soreaubut I digress23:05
cjwatsonLike I say, disk space is not actually a trivial concern - including all the development library counterparts to every runtime library on your system would bloat it very considerably23:06
soreauI suppose that is true23:06
soreauso you're saying you can make a smaller binary distro with the use of splitting things23:07
cjwatsonFor any single library it might happen to be trivial, but we have packaging standards so that things interoperate and to try to keep the amount of package-specific stuff to a minimum23:07
cjwatsonMassively so23:07
soreauthat makes sense at least23:07
cjwatsonhttps://www.debian.org/doc/debian-policy/ch-sharedlibs.html is the relevant chapter-and-verse of standards for this although somewhat dense23:09
soreaucjwatson: now look at happened with wayfire_0.8.0-7 https://launchpadlibrarian.net/547221766/buildlog_ubuntu-focal-amd64.wayfire_0.8.0-7_BUILDING.txt.gz23:09
soreauERROR: Dependencies must be external dependencies23:09
soreauoh please23:09
soreauI had this problem locally once before IIRC but can't recall what fixed it23:10
cjwatsonPackage xcb-present was not found in the pkg-config search path.23:10
soreauah23:10
soreausome of a23:10
cjwatsonThe actual error is somewhat further up the log23:10
cjwatsonSo same thing in principle, libwlroots-dev needs to depend on all the -dev packages corresponding to stuff in its Requires.private23:10
cjwatson(in its .pc)23:10
cjwatsoncmake is just being super-noisy here.  You want to look just below the "pkg-config --cflags wlroots" line23:11
soreaucjwatson: no this is not the problem23:11
soreaucjwatson: the real problem is this:23:11
soreauRun-time dependency wlroots found: NO (tried pkgconfig and cmake)23:11
soreauLooking for a fallback subproject for the dependency wlroots23:11
soreauExecuting subproject wlroots23:11
cjwatsonOr indeed the first match for "pkg-config error", that's probably a more sensible search term23:12
soreauit tries to build wlroots even though ---- it's already installed with the .pc file23:12
cjwatsonsoreau: No, that is a consequence.23:12
soreauok fine let me try something23:12
cjwatsonIt says "pkg-config error with 'wlroots'", tells you why, and *then* goes on to try random fallback crap23:12
cjwatsonIgnore the random fallback crap until you aren't getting the earlier pkg-config errors23:12
cjwatson(This is a general principle of reading build logs in most systems, I find - you want to look for the *first* unexpected error and investigate that.  Otherwise you can end up mired in debugging irrelevant things that don't actually really pertain to the problem, they're just the build system getting confused)23:15
mwhudsonhmm does anyone know how the glibc packaging works? :)23:15
soreaucjwatson: yes I should know better to look for the first error, I will try the term you suggest23:18
cjwatsonSo I think I have the right dependencies, but uh my laptop slowed to a crawl once this source package got into the main body of its build so I can't copy and paste them right now ...23:23
soreaucjwatson: So I just made wayfire depend on all the wlroots and wf-config deps and it found both of them and built as I expected23:26
soreaubut this has happened with multiple packages now, it wants to do some compiling test so I need to have the dependent package depend on packages that the build dep does...23:27
cjwatsonRight, that happens when the build-dep is packaged with incomplete dependencies of its own23:28
soreauultimately specifying the deps in multiple packages, even though they depend on each other..23:28
soreauwell shit23:28
soreauhow do I fix that?23:28
soreauI put all of these packages in the build-dep of the.. build-dep23:29
cjwatsonAdd depends to the build-dep.  In this case wlroots is under your control23:29
soreauI did23:29
mwhudsonah https://sourceware.org/pipermail/libc-alpha/2021-June/127569.html and the rest of that thread23:29
cjwatsonYou can extend its Depends line23:29
soreauoh depends, not build depends23:29
soreauI figured the build depends would pull stuff in and those packages make their way into the depends23:29
cjwatsonMaybe first read up on what Depends and Build-Depends do exactly23:29
soreauor I could just guess and wonder ;)23:30
cjwatsonNot in general.  Some dependencies can be autodetected - for example packages that provide libraries that show up in DT_NEEDED object references.  -dev dependencies aren't normally autodetected like that though23:31
cjwatsonI think it might in principle be possible to autodetect them from .pc files, but I've thought about it for all of 30 seconds so there may be some reason not to23:32
soreaucjwatson: where is the recommended docs for deps/build deps etc?23:32
cjwatsonhttps://www.debian.org/doc/debian-policy/ is the canonical reference23:33
cjwatsonIt's for Debian of course, but at this sort of level the Ubuntu packaging system.is the same23:34
soreauso if I make package A depend on package X and then B is dependent on A however it complains that it wants X's .pc file.. how do you fix this?23:38
cjwatsonB isn't correctly dependent on A here though, that's the problem23:38
soreauit isn't?23:38
cjwatsonOr A isn't correctly dependent on X, one of the two23:38
cjwatsonMaybe be less abstract23:38
soreauI think the latter23:38
soreauand I'm asking if that were the case, how would you fix it properly23:39
cjwatsonCan we please be less abstract?23:39
cjwatsonIn this case, wayfire Build-Depends wlroots; wlroots ships a .pc file that has Requires.private: gbm (etc.); and wlroots does not depend on libgbm-dev23:39
cjwatson(or various other similar -dev packages)23:39
soreaubut it does in build-deps23:40
cjwatsonIrrelevant23:40
soreaujust clarifying23:40
cjwatsonThe Build-Depends of wlroots are only *directly* considered when building wlroots itself23:40
cjwatsonWhen building something that build-depends on wlroots, only wlroots's Depends are relevant23:41
soreauoh ok.. hm23:41
soreauso how do you know what needs to go in the deps?23:41
cjwatsonSo I would (a) split wlroots into libwlroots10 and libwlroots-dev as described above (you could get away without this but IMO this would be a correct thing to do) and (b) add libgbm-dev and all the rest to the Depends of libwlroots-dev23:41
soreaubut how do you know to add libgbm-dev to the deps without a build log screaming at you?23:42
cjwatsonDiscovering the necessary dependencies by going through the Requires.private of wlroots's .pc file and finding the packages that ship each of those .pc files23:42
cjwatsonwlroots probably already build-depends on most of them, so just make sure that any of the -dev packages that it build-depends on that ship .pc files referenced by wlroots.pc (which isn't *that* long a list, easy enough to go through by hand) are also in libwlroots-dev's Depends23:45
cjwatsonIf you wanted to test it, bootstrap a clean chroot, install pkg-config and libwlroots-dev, and see whether "pkg-config --cflags wlroots" works23:46
cjwatson(if you don't want to do the libwlroots10/libwlroots-dev split right now, substitute "wlroots" for "libwlroots-dev" in my last few lines)23:47
cjwatsonsoreau: So I would be inclined to start with something along the lines of https://paste.ubuntu.com/p/MjzgzsWKvr/ - there are certainly things that could be improved there, but it should be a start23:58
cjwatson(test-built, seems to produce something reasonable-looking, I haven't tried building wayfire against it but I would expect this to make things easier at least once you update wayfire's Build-Depends to say libwlroots-dev rather than wlroots)23:59

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!