Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1051650: cmake: Problems finding libraries on Alpha

1 view
Skip to first unread message

Adrian Bunk

unread,
Sep 10, 2023, 6:30:04 PM9/10/23
to
Package: cmake
Version: 3.26.4-4
Severity: normal
Tags: ftbfs
X-Debbugs-Cc: debian...@lists.debian.org

Many (> 50) have been FTBFS on alpha recently due to
cmake not finding libraries.

This bug is sent against cmake with Cc to the debian-alpha
list to document and track this issue.

Observations:

1. The problem is about not finding a library,
it happens in many packages with many libraries.

2. The problem happens only on alpha.

3. There is no such problem with non-cmake build systems.

4. The problem started after the release of bookworm.
It might be a regression in cmake 3.26 or somewhere else (glibc?).

5. It happens both on the real hardware buildd and on the qemu buildds.

6. The problem does not always happen, it seems to be a race condition.
In the attached files, within 2 hours the same buildd with exactly the same build
dependencies installed had one failure and one success:
https://buildd.debian.org/status/logs.php?pkg=fcitx5-skk&ver=5.1.0-2&arch=alpha&suite=sid
When diff'ing these build logs, the first non-trivial difference is
-CMake Error at /usr/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
- Could NOT find LibSKK (missing: LIBSKK_LIBRARIES)
+-- Found LibSKK: /usr/lib/alpha-linux-gnu/libskk.so

Adrian Bunk

unread,
Oct 13, 2023, 5:20:03 PM10/13/23
to
On Fri, Sep 15, 2023 at 08:57:15PM +0200, Timo Röhling wrote:
> Hi Adrian,

Hi Timo,

thanks for taking a look (and sorry for the late reply).

> On Mon, 11 Sep 2023 01:20:53 +0300 Adrian Bunk <bu...@debian.org> wrote:
> > 1. The problem is about not finding a library,
> > it happens in many packages with many libraries.
> >
> > 2. The problem happens only on alpha.
> >
> > 3. There is no such problem with non-cmake build systems.
> >
> > 4. The problem started after the release of bookworm.
> > It might be a regression in cmake 3.26 or somewhere else (glibc?).
> Do you think the bug is reproducible with a small shell script
> such as:
>
> set -e
> while sleep 5
> do
> mkdir /tmp/_build
> cmake -B /tmp/_build -S /path/to/project/with/required/find_library
> rm -rf /tmp/_build
> done

Yes, I would suspect this should reproduce this bug with a package like
the mentioned fcitx5-skk.

I'm adding the debian-alpha list to Cc since I don't have access to
Alpha hardware and I cannot reproduce the problem locally with qemu
since my local qemu setup is apparently in some relevant way different
from the qemu buildds where the problem does happen.

> If yes, we could try this with a rebuilt CMake 3.25 and see if
> this is truly a CMake regression. I looked at the code and could not
> spot anything suspicious yet, so this would certainly be
> instructive.
>
> Cheers
> Timo

Thanks
Adrian

Timo Röhling

unread,
Oct 14, 2023, 4:10:04 AM10/14/23
to
Hi Michael,

On Fri, 6 Oct 2023 09:42:40 +1300 Michael Cree <mc...@orcon.net.nz>
wrote:
> I have tried the suggested script (with a small modification to count
> number of failures) running for a few hours on one of the packages
> that had failed on the buildd and never saw cmake fail.
>
> But then building a few packages locally with sbuild, apbs failed
> first time to build with the cmake failure. Second try at
> building apbs with sbuild succeeded.
>
> So it appears that there is something different about running in
> sbuild (or possibly under dpkg-buildpackage) that is triggering
> this failure on occassion.

Thank you for your effort!

Assuming this is somehow related to the actual package build,
debhelper injects a number of additional CLI arguments, mostly
setting global variables that affect CMake's default behavior:

-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_BUILD_TYPE=None
-DCMAKE_INSTALL_SYSCONFDIR=/etc
-DCMAKE_INSTALL_LOCALSTATEDIR=/var
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON
-DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON
-DFETCHCONTENT_FULLY_DISCONNECTED=ON
-DCMAKE_INSTALL_RUNSTATEDIR=/run
-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON
-DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_INSTALL_LIBDIR=lib/alpha-linux-gnu
-G"Unix Makefiles"

None of that should be affecting find_library(), but...


Cheers
Timo


--
⢀⣴⠾⠻⢶⣦⠀ ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁ │ Timo Röhling │
⢿⡄⠘⠷⠚⠋⠀ │ 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀ ╰────────────────────────────────────────────────────╯
signature.asc
0 new messages