From boris at codesynthesis.com Mon Aug 1 06:02:16 2022 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon, 1 Aug 2022 08:02:16 +0200 Subject: [build2] build2 0.15.0 released In-Reply-To: References: Message-ID: Matthew Krupcale writes: > Updated builds for v0.15.0 on Fedora 35-36 have been submitted [1,2]. Great, thanks for the quick turnaround! > It's unfortunate that upstream pkgconf had to be forked, though. I > (and I believe Fedora project) would certainly prefer to use the > upstream libraries as much as possible, so I did utilize > config.build2.libpkgconf=true as you suggested, which seemed to > work. Hopefully libpkgconf will continue to work at least on Linux. I think it should work for the time being but since I wrote that note we've discovered (and fixed) a few more issues. In particular, there is a cluster of issues (buffer overflow, incorrect semantics, value truncation) that can be caused by long lines, for example a large variable value. While currently unlikely to happen (the line will needs to be longer than 64KB), we now use pkg-config variables to convey C++20 modules information[1] and user metadata[2] both of which can potentially trigger this (in fact, we've seen Boost libraries with the cxx.importable_headers variable values greater than 64KB). So long-term it would probably be wise to switch to libpkg-config. I think it should be a pretty straightforward job to package it for Fedora (it's a portable C library) except for one hitch: currently it only builds with build2 (which creates the chicken and egg problem). But we can add an alternative build system if that helps. I was thinking either Autotools-based or just plain GNU make (we could probably auto-maintain the latter with an .in template from build2). [1] https://build2.org/blog/build2-cxx20-modules-gcc.xhtml#libraries [2] https://github.com/build2/HOWTO/blob/master/entries/convey-additional-information-with-exe-lib.md From sexymimi64 at gmail.com Sun Aug 14 13:25:30 2022 From: sexymimi64 at gmail.com (=?UTF-8?Q?Michael_Mart=C3=ADn_Moro?=) Date: Sun, 14 Aug 2022 15:25:30 +0200 Subject: [build2] How to import local dependencies with bpkg ? Message-ID: Hi ! First of all: I've been using build2 for a couple of days now, and it's been a blast. It's got a steep learning curve, but the results are worth it. Right now, I'm having trouble getting a bpkg configured directory to act as a repository, and I was looking for some help. ## Scenario I've got a library called libmy. I created a build directory for it using bpkg create. From there, I can run `bpkg build libmy`, and when I run `bpkg status libmy`, it tells me that it is "configured". I want this directory to be used as a repository for another package. From what I've read in the manuals, I'm guessing that to achieve that, `bpkg status libmy` should tell me that libmy is "available", rather than "configured". How do I get to that state ? ## Attempting to link libmy with `bpkg add --type dir` I tried running `bpkg add [directory] --type dir` on the dependent package. The `bpkg add` command succeeds, but: - When I do `bpkg build [package]`, it tells me it cannot satisfy libmy dependency. - When I do `bpkg fetch`, it tells me there are no "manifest file for package in repository dir+[directory]" I assume this happens precisely because libmy is just configured, and making it available will generate the manifest and fix all my issues, right ? ## Attempting to link libmy from the system: I've also tried installing libmy on my system. I ran a `bpkg install`, before checking that `pkg-config libmy` was exiting with success status. Then I tried running `bpkg build [package] ?sys:libmy`. It failed, telling me that the `sys:libmy` package is unknown. ## `bpkg add --type pkg` ? I've also noticed there was a `--type pkg` option for `bpkg add`, but I've found little to no details about it. Is it pkg-config based ? Any documentation as to how it works ? Hopefully someone will read this and provide me with some guidance ! Thanks for reading ! -- *Michaël Martín Moro* -------------- next part -------------- An HTML attachment was scrubbed... URL: From boris at codesynthesis.com Mon Aug 15 06:13:01 2022 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon, 15 Aug 2022 08:13:01 +0200 Subject: [build2] How to import local dependencies with bpkg ? In-Reply-To: References: Message-ID: Michael Martín Moro via users writes: > First of all: I've been using build2 for a couple of days now, and it's > been a blast. It's got a steep learning curve, but the results are worth it. Glad to hear that. > Right now, I'm having trouble getting a bpkg configured directory to act as > a repository, and I was looking for some help. > > I've got a library called libmy. I created a build directory for it using > bpkg create. From there, I can run `bpkg build libmy`, and when I run `bpkg > status libmy`, it tells me that it is "configured". > > I want this directory to be used as a repository for another package. You cannot use a build configuration directory (output) as a repository directory (source). In this scenario you have two sensible choices: 1. Use libmy's source directory as the repository. In this case, however, libmy will be built in the build configuration of another package. 2. Link libmy's build configuration directory to another package's build configuration directory. For details on configuration linking, see: https://build2.org/release/0.14.0.xhtml#config-link The bpkg command for linking two configurations is bpkg-cfg-link(1): https://build2.org/bpkg/doc/bpkg-cfg-link.xhtml > ## Attempting to link libmy from the system: > I've also tried installing libmy on my system. I ran a `bpkg install`, > before checking that `pkg-config libmy` was exiting with success status. > Then I tried running `bpkg build [package] ?sys:libmy`. It failed, telling > me that the `sys:libmy` package is unknown. The correct command for this is: bpkg build [package] ?sys:libmy/* That is, because there is no stub package for libmy, you need to explicitly tell bpkg that its version satisfies any constraint. (We don't make the same assumption for just ?sys:libmy because in the future we plan to automatically query the version by calling the system package manager; see bpkg-pkg-build(1) for details). > ## `bpkg add --type pkg` ? > I've also noticed there was a `--type pkg` option for `bpkg add`, but I've > found little to no details about it. Is it pkg-config based ? Any > documentation as to how it works ? Quoting from the DESCRIPTION section of bpkg-cfg-add(1): "Currently three types of repositories are supported: archive-based pkg, directory-based dir, and version control-based git. See bpkg-repository-types(1) for details on their structure and URL format. Normally the repository type can be automatically guessed by examining its URL (for example, the presence of the .git extension) or, in case of a local repository, its content (for example, the presence of the .git/ subdirectory). Without any identifying information the pkg type is assumed unless explicitly specified with the --type option or in the URL scheme. Note, however, that the dir repository type is never guessed since it is not easily distinguishable from local pkg and git repositories."