Hello ports,

I want to describe how meson might fail in "make configure" if meson
is looking for a missing optional dependency, but at the same time,
dpb is junking cmake.  I saw devel/pangomm248 fail in this way, but
it might also happen in other ports using meson.

In each of devel/pangomm248, devel/glibmm268, and devel/cairomm16,
WRKSRC/docs/reference/meson.build looks for mm-common-libstdc++
from devel/mm-common.  These ports don't depend on mm-common, which
is probably not installed.  Meson tries to find mm-common-libstdc++
with pkg-config, then with cmake.

Last month, devel/pangomm248 failed "make configure" in the powerpc
bulk.  (I told dpb to retry pangomm248, which worked.)  I attach a
log.  The important part of the log is,

|   File "/usr/local/lib/python3.9/subprocess.py", line 1821, in \
| _execute_child
|     raise child_exception_type(errno_num, err_msg, err_filename)
| FileNotFoundError: [Errno 2] No such file or directory: \
| '/usr/local/bin/cmake'
| ...
| Configuring pangomm.rc using configuration
| Found CMake: /usr/local/bin/cmake (3.20.3)
|
| ../../../obj/ports/pangomm248-2.50.0/pangomm-2.50.0/docs/\
| reference/meson.build:18:2: ERROR: Unhandled python exception

I believe that "Found CMake" happened before "FileNotFoundError", but
Meson flushed "FileNotFoundError" before "Found CMake".  I deduce that
dpb had deleted cmake.

A successful "make configure" looks like,

| Configuring pangomm.rc using configuration
| Did not find CMake 'cmake'
| Found CMake: NO
| Run-time dependency mm-common-libstdc++ found: NO (tried pkgconfig and cmake)

These 3 ports have WRKSRC/docs/reference/meson.build calling
dependency('mm-common-libstdc++', required: false).  This will try
pkg-config with mm-common-libstdc++.pc (which would exist in
devel/mm-common), then cmake with Findmm-common-libstdc++.cmake,
says https://mesonbuild.com/Dependencies.html

The project looks for mm-common-libstdc++ though it will never get
used: it is only for building docs with doxygen, but by default,
the project never builds the docs.

I have not proposed a fix to this problem.  I only know to retry the
"make configure" if meson fails.

--George

Attachment: lost-cmake-pangomm248.log.gz
Description: application/gzip

Reply via email to