[build2] Bootstrap build failing bpkg and bdep tests

Matthew Krupcale mkrupcale at matthewkrupcale.com
Sat Sep 15 07:44:53 UTC 2018


On Fri, Sep 14, 2018 at 12:20 PM, Boris Kolpackov
<boris at codesynthesis.com> wrote:
> Matthew Krupcale <mkrupcale at matthewkrupcale.com> writes:
>
>> I am attempting to make an RPM for build2[1]
>
> Nice. There was an attempt to make a .deb package for build2 some time
> ago which resulted in a number of discussions (and some enhancements to
> the build2 build process). Not sure if you've seen it:

Yes, I've seen the first of those, and the chroot variable which came
out of that discussion was useful for packaging purposes. Your
response[1] to the Arch Linux packager was the lead that I followed
for some of the other packaging aspects: using individual component
archives, linking against system libpkgconfig and libsqlite,
installing libbutl and libbpkg as shared libraries, and linking
statically (bundling) libodb beta releases. The former two
recommendations were in line with my (and generally Fedora's)
intentions, but the latter two I was somewhat unsure about. In
particular, I don't know if it is intended for anyone else to consume
libbutl or libbpkg and whether or not they will have any sort of ABI
stability (right now it appears they are versioned same as release
major.minor). In other words, they might just be considered "private"
libraries for build2 and could be installed somewhere outside of the
usual /usr/lib(64) [2,3]. As for bundling libodb, Fedora recommends
un-bundling things[4], but I don't think there is much other choice
right now since the latest release of libodb (which is packaged in
Fedora) will not work with build2.

> Note that b-boot (both phase 1 and 2 per the Installation and Upgrade
> manual[1]) shouldn't be used to run any tests. Especially phase 1,
> which is actually missing large chunks of the functionality.

I was using the phase 2 bootstrap b-boot to run the tests, which is
what the documentation says to use for install in step 3[5].
Performing the install appears to remove RPATH from the build2 binary,
so when running the tests with the build2 built in step 3 after
installation, build2 fails to load libbutl:

/builddir/build/BUILD/build2-toolchain-0.8.0/build2-0.8.0/build2/b:
error while loading shared libraries: libbutl-0.8.so: cannot open
shared object file: No such file or directory

Per your suggestion that I should use the step 3 build2 for tests, I
set LD_LIBRARY_PATH during the tests, similar to how I'm setting PATH
anyways, and step 3 build2 can run after installation.

> It looks like you have no openssl installed (which it what's used to
> extract the certificate information). Though we should probably improve
> this diagnostics.

The mock build root used to build packages is fairly minimal and does
not include openssl by default. I don't know why I didn't think to
install it given that I saw openssl being referenced in the auth.cxx
code. In any case, this seems to have fixed these remaining errors,
thanks.

To be clear, though, openssl is a runtime requirement for bpkg? And I
suppose the same would be true for curl and git, yes? Am I missing
anything else (these sorts of external process requirements won't be
detected automatically by RPM)?

[1] https://lists.build2.org/archives/users/2017-August/000070.html
[2] https://fedoraproject.org/wiki/Packaging:Guidelines#Rpath_for_Internal_Libraries
[3] https://fedoraproject.org/wiki/Packaging:Guidelines#Alternatives_to_Rpath
[4] https://fedoraproject.org/wiki/Bundled_Libraries
[5] https://git.build2.org/cgit/build2/tree/INSTALL.cli#n134



More information about the users mailing list