Re: Bug#942795: Acknowledgement (libsoxr: Building with "nocheck" results in a broken soxr.pc pkg-config file)
Hi Helmut!
On 10/23/19 6:23 PM, Helmut Grohne wrote:
> I looked back at the patch and am unsure here. I cannot imagine adding
> it just for reducing build time. It must have had an effect at that
> time. In general, building tests is not a problem for cross building.
> Just running them is. Could it be that the build target would formerly
> run the tests?
Could be. In any case, just removing the paragraph does not break "nocheck",
i.e. "nocheck" works as expected and disables the testsuite. I would actually
immediately notice if the testsuite was run because it fails on qemu-m68k
due to some bugs in the FPU emulation in qemu-m68k. But the package builds
fine because "nocheck" does what it's supposed to do.
>>> Also, the fact that a thing such as BUILD_EXAMPLE affects the content of
>>> the .pc files sounds wrong on many levels, so I'd rather see it fixed
>>> some other way.
>>
>> Indeed. But I have not figured out yet what the issue is. I can just say
>> that building with "nocheck" currently results in a broken .pc file.
>
> This is easy enough to diagnose. Just build it twice once without
> nocheck and once with. Compare using diffoscope. What happens is that
> the nocheck variant garbles the version:
>
> -Version: 0.1.3
> +Version: ..
>
> It tries to interpolate PROJECT_VERSION here. According to the cmake
> documentation, this is the version given to the most recent invocation
> of "project()". There actually are two such invocations and the second
> one is guarded by BUILD_EXAMPLES (and lacks a version). So the culprit
> is not setting BUILD_TESTS=0, but setting BUILD_EXAMPLES=1, which was
> also added by my patch (to try to make the build reproducible, but it
> failed doing so)!
>
> So yeah, you should revert that part. Doing so will make it fail to
> cross build. Making nocheck work requires a different fix I fear.
I'm pretty sure it won't break cross builds simply because the testsuite
is definitely not run.
> Sorry about that. I try to pay attention to detail, but once in a while
> a mistake escapes.
I don't think this particular effect was predictable, so don't worry.
And while I think it's probably a good idea to fix the generation of
the .pc file as Mattia suggests (and did), we can still throw out
the paragraph simply because you don't have to pass BUILD_TESTS=0
to disable the testsuite. I *did* verify that it works correctly.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: