Post B5V8KWilsiZKDGR2zg by matt@toot.cafe
(DIR) More posts by matt@toot.cafe
(DIR) Post #B5V0IpsmrwtJQenq52 by ariadne@social.treehouse.systems
1 likes, 0 repeats
in the proposed u-config PKG_CONFIG_SYSROOT_DIR support PR, the u-config maintainer goes out of his way to mansplain pkgconf's behavior here, which is *not* strictly about -I and -L flags as he envisions. since it is not strictly about -I and -L he calls it "broken".and, if that were the case, sysroot would be a lot easier.the whole problem is that ${pc_sysrootdir} was added quietly much later, and so most .pc files have no awareness of ${pc_sysrootdir}.the original idea was that you would have `prefix=${pc_sysrootdir}%PREFIX%` in your foo.pc.in file, but basically nobody does this. because they copy other .pc files usually.meanwhile we need to support sysroot.so pkgconf classic (< 2.0) just automatically mutated -I and -L paths (and some others) as expected when ${pc_sysrootdir} is not used.but clever workarounds result in new ways to break the system.remember how i said the intended way to use ${pc_sysrootdir} was to augment ${prefix} with it and make all other paths relative to ${prefix}? (this also makes --define-prefix work meaningfully on windows) well... some pc files do not do that, and instead do things like```prefix=/usrincludedir=${pc_sysrootdir}/${prefix}/include```we used to have a complicated set of heuristics to detect this specific type of mistake. in pkgconf 3 we have moved to bytecode-based string substitution, and have given ${pc_sysrootdir} its own special opcode. this allows us to just look and see if the ${pc_sysrootdir} opcode has ever been encountered. we can then selectively apply mitigations.anyway. back to the -I and -L thing. it sure would be nice if that was the case, but it isn't. sometimes (gstreamer comes to mind) you need to install new things into the sysroot because there are headers that need to be installed in a special place relative to the sysroot.what does this mean? it means that --variable also has to be supported. and at that point, you may as well just support it everywhere.i would again like to stop hearing about this completely broken pkg-config implementation.projects like meson should mark it as broken instead of wasting their time negotiating with a techbro.
(DIR) Post #B5V1cGeVfEUvuTxEIq by ariadne@social.treehouse.systems
0 likes, 0 repeats
some idiot wanting to turn pc files into an ISO standard because of fucking u-config, i wish this project would just utterly fuck off
(DIR) Post #B5V1q0Mv0GfbSeHDAe by ariadne@social.treehouse.systems
0 likes, 0 repeats
to be blunt: any opportunity for friendly collaboration with or concerning u-config ended when i was forced to respond to casually dropping security vulnerabilities in the u-config maintainer's blog where he goes on and on about how much of an elite coder he is
(DIR) Post #B5V1tG9mlABpIPgZkG by whitequark@social.treehouse.systems
0 likes, 0 repeats
@ariadne i don't have useful technical input here because my knowledge is way out of date, but as someone who was cross-compiling dozens and dozens of packages as far back as 2012 and getting absolutely bodied by pkgconfig sysroot issues, i just want to thank you for trying to deal with it at the very least
(DIR) Post #B5V25iCIKcuDjknTpw by ariadne@social.treehouse.systems
1 likes, 0 repeats
@whitequark this was the motive. everything pkgconf does that is weird in whatever way probably has a trail of blood leading to the underlying decision. i built it to simplify alpine's bootstrap.
(DIR) Post #B5V3WVtYHNTxM4NG2y by ariadne@social.treehouse.systems
1 likes, 0 repeats
that blog, incidentally, continues to piss me off.shitting on others to elevate yourself is a classical trait of narcissistic behavior and all it does is hurt the people you are shitting on.i'm so sorry that when i originally wrote pkgconf i was not even a professional software engineer or had ever even heard of hacker news for that matter. instead, it was a hobby thing: i wanted to make the operating system i use better.so when i saw strlcpy and strlcat used in a bunch of other FOSS projects, I said "well everyone else is using this, it's probably good enough!"and, no, it's not good enough. but the version of me that knows that has had 15 years of experience working in tech, and the version of me that decided to use strlcpy was being shot at every day because i had to take methheads' kids away for a living.
(DIR) Post #B5V42IYnOR0rGSp0q0 by jannem@fosstodon.org
0 likes, 0 repeats
@ariadne This is something that frustrates me: programming - in any language or system- is full of bad old footguns, still documented, still with usage examples and example code, that you're just supposed to know about. Beginners don't stand a chance to do the right thing. An already complicated and frustrating experience just got even worse, with community judgement as a stinky cherry on top. It's amazing anyone at all willingly stick with this.
(DIR) Post #B5V45ztyhr1aYTUf9E by ariadne@social.treehouse.systems
0 likes, 0 repeats
and like, that's the thing that kinda frustrates me about the state of FOSS today. but i am also hopeful at the same time.there were two basic responses to his blog (which is still up as of this posting several years later). most people ignored it, but some people have attached themselves to this project because it has demoscene-level hobby coding in it (which is impressive, but also inappropriate for a tool like pkg-config).i'm sorry that it is shiny, but we need to show some solidarity here. we should not tolerate people who promote their work by shitting on others.
(DIR) Post #B5V4enx77rmLd7Yddo by ariadne@social.treehouse.systems
0 likes, 0 repeats
but back to the ISO thing for a moment.why on earth would *I* want to pursue ISO standardization of pc(5) files?what is the benefit to the pkgconf agenda?there is none. it only serves to freeze a bad file format rather than fix it.
(DIR) Post #B5V59sCdNCaZmzdEEC by ariadne@social.treehouse.systems
0 likes, 0 repeats
the pkgconf agenda, for the record, is to:- improve the pc(5) format so that it is more aligned with the needs of modern build systems- introduce new ways of leveraging pc(5) data, e.g. SBOM generation
(DIR) Post #B5V5umcjvvM064D8eO by ariadne@social.treehouse.systems
0 likes, 0 repeats
what i will absolutely say is if you care about the health of the pkg-config ecosystem, you should reject u-config on the simple grounds that the maintainer only built u-config with the goal of deprecating the entire pkg-config ecosystem
(DIR) Post #B5V6Qbl7rbNrfQJC8u by lanodan@queer.hacktivis.me
0 likes, 0 repeats
@ariadne and I guess given the windows background, it has the potential of being as awful as the stuff cmake came up with
(DIR) Post #B5V6TFJ7nKQou4T9Ga by neal@social.gompa.me
0 likes, 0 repeats
@ariadne TIL about u-config, and... it looks terrible. Why would anyone consider it to be reasonable?
(DIR) Post #B5V6WMmuRHvwyKt9zE by ariadne@social.treehouse.systems
0 likes, 0 repeats
@lanodan it's okay, pkgconf now has higher quality windows support than u-config :)
(DIR) Post #B5V6XyNs8vKBrdwZqS by lanodan@queer.hacktivis.me
0 likes, 0 repeats
@ariadne Yeah, hopefully windows dev will get the memo…
(DIR) Post #B5V6bThu8nHnsbz8hE by ariadne@social.treehouse.systems
0 likes, 0 repeats
@neal i do not know. yet people keep sending me emails about it from time to time.i would have thought the fact that i banned both skeeto and NRK from the pkgconf github org should speak for itself about my views on collaborating with them, but apparently not!
(DIR) Post #B5V781wCPLmTJKC396 by ariadne@social.treehouse.systems
0 likes, 0 repeats
anyway, basically everything in pkgconf is the way it is because doing it some other way caused distribution-scale breakage
(DIR) Post #B5V8KWilsiZKDGR2zg by matt@toot.cafe
0 likes, 0 repeats
@ariadne I'm curious about which coding techniques you find impressive but inappropriate for this kind of tool.To be clear, I don't mean to defend u-config, and I agree that we shouldn't tolerate people who promote their work by shitting on others.
(DIR) Post #B5V8OefQHS0810pzJg by ariadne@social.treehouse.systems
0 likes, 0 repeats
@matt i think tools like this should be as boring as possible. they should properly use libc rather than inventing their own.
(DIR) Post #B5V8wSWhvQR6CwscjI by matt@toot.cafe
0 likes, 0 repeats
@ariadne Yeah. I understand the urge to fight the bloat of modern software by going far in the other direction, to the point of having a version that makes Linux syscalls directly and requires no libc; that's an impressive stunt. But it probably isn't good for the maintainability of the tool.
(DIR) Post #B5V9MjkWVuPX9Ws9vU by ariadne@social.treehouse.systems
0 likes, 0 repeats
@matt i mean, normally i would be like "oh, someone else has *voluntarily* pinned the pkg-config kick me sign to his back, i'm free!"but his entire blog where he introduces u-config is just unpleasant to read, and i am horrified of the vision he has for the ecosystem (namely to deprecate it, in favor of nothing).
(DIR) Post #B5V9mWcJxgwnx8Kgdc by matt@toot.cafe
0 likes, 0 repeats
@ariadne Yeah, I was wondering earlier what he wanted to replace pkg-config with. I assume he wants to replace it with every program vendoring its library dependencies, as seems to be common in indie C++ game dev, ideally using small libraries.
(DIR) Post #B5V9p7WXiKzMzprqU4 by ariadne@social.treehouse.systems
0 likes, 0 repeats
@matt i don't know, most likely
(DIR) Post #B5VDPkm3Yltp14HdVA by dngrs@chaos.social
0 likes, 0 repeats
@ariadne tangential, do you have a recommended resource for a pkgconf deep dive, warts and everything?
(DIR) Post #B5VGz841GEQHFJFHVY by ariadne@social.treehouse.systems
0 likes, 0 repeats
@dngrs I gave a talk about it last year at seagl
(DIR) Post #B5VIsAQwFg90Tbm2cK by equinox@chaos.social
0 likes, 0 repeats
@ariadne is there a guide how to do all of this correctly? Asking for a friend… who may have done some cargo cult .pc files...
(DIR) Post #B5VKjUK58N43SrYWbA by ariadne@social.treehouse.systems
0 likes, 0 repeats
@equinox pc(5) has good examples
(DIR) Post #B5VKsMuy2FMz6X2kS0 by equinox@chaos.social
0 likes, 0 repeats
@ariadne no pc_sysrootdir though?
(DIR) Post #B5VNSvfaVP9dDdPX4y by ariadne@social.treehouse.systems
0 likes, 0 repeats
@equinox at this point I would say don't worry about it. pkgconf will inject it as appropriate.
(DIR) Post #B5VPLVXhRnb04HJIHY by equinox@chaos.social
0 likes, 0 repeats
@ariadne mhm. There is a bit of a lack of good manual type docs on .pc... I had trouble explaining the point of -uninstalled.pc to project colleagues as well 😕… the language and everything is perfectly clear, but not the expected conventions.As an extreme example: is using ${prefix} a MUST, SHOULD, MAY, SHOULD NOT, or MUST NOT? Do things break if you fold it into other vars? (ok clearly not either of the MUSTs, but you get the point)
(DIR) Post #B5VTI0GpewJe1l0N5U by ariadne@social.treehouse.systems
0 likes, 0 repeats
@pinskia silent truncation
(DIR) Post #B5VlU8XYXLC6KElLoe by fazalmajid@vivaldi.net
0 likes, 0 repeats
@ariadne I started my career at France Telecom R&D, and the guy who was designated to attend standards meetings was the dumbest dullard in the entire division.
(DIR) Post #B5ZSV38uy6wvNWnelc by eschwartz@fosstodon.org
0 likes, 0 repeats
@ariadne I don't think meson currently acknowledges u-config to exist at all, either to negotiate with it or to error out when it is encountered.I could be convinced to error out when it is encountered, I think, although I'm not sure whether or not I care enough to bother. Using u-config might be its own punishment.I'm definitely diametrically opposed to negotiating with it and would offer infinite NACKs to any patch submitted to us for that purpose.