[build2] Missing include?: build2-0.11.0/build2/target.txx:23: undefined reference to `build2::resolve_members`

Matthew Krupcale mkrupcale at matthewkrupcale.com
Fri Aug 2 15:02:56 UTC 2019


On Fri, Aug 2, 2019 at 10:09 AM Boris Kolpackov <boris at codesynthesis.com> wrote:
>
> This (and a couple of other functions) are inline. It's clear why this
> could lead to a link error (if at all other call sites it was inlined,
> then there would no non-inline symbol).

Okay, makes sense.

> It's a bit puzzling why it only
> happens sometimes (unless there were changes in the optimization level
> or some such).

So in the Fedora build system, I've seen this failure with two
dimensions of variation:
1. Keeping the build2 source, RPM build specification, and target
architecture the same but changing the buildroot (i.e. glibc
etc.)[1,2]
2. Keeping the build2 source, RPM build specification, and buildroot
the same but changing the target architecture[2]

Note that in both of these variations, x86_64 and aarch64 are the only
architectures which actually fail.

Variation 1 suggests that it's possible the change in buildroot caused
the failure, but the other architectures don't have this failure due
to change in buildroot.

Variation 2 suggests that the change in target architecture is the
cause of failure. There are different optimization flags used for the
various architectures:

optflags: x86_64 %{__global_compiler_flags} -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
optflags: aarch64 %{__global_compiler_flags}
-fasynchronous-unwind-tables -fstack-clash-protection
optflags: ppc64le %{__global_compiler_flags} -m64 -mcpu=power8
-mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection

The problem could be however unrelated to either of these variations.

> Those two files actually have a few cyclic dependencies. We've
> resolved this by making one side of the dependency non-inline:
>
> https://git.build2.org/cgit/build2/commit/?id=8e69e09b7ec68377758c63092f9b254e95a0d7be

Okay, would you suggest I apply a similar patch for rebuilding 0.11.0?

> Speaking of which, this will probably affect your package. However,
> I wouldn't look into this just yet, it is still not finished. I
> was planning to ping you and Alex once this restructuring gets
> finalized.

Yeah, I've been waiting for things to settle before I try to update
the RPM spec. I suspect there will be several new library sub-packages
to add (libbuild2, libbuild2-bash, etc.).

Best,
Matthew

[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=35490341
[2] https://koji.fedoraproject.org/koji/taskinfo?taskID=36632199



More information about the users mailing list