Open brancomat opened 2 years ago
I don't know that error message comes from, but I don't think it's from configure.ac
or the spec file:
If the error was in configure.ac
, the gdal support would be disabled (but it's enabled):
AC_PATH_PROG([GDAL_CONFIG], [gdal-config], [NONE])
if test "x$GDAL_CONFIG" == "xNONE"; then
have_gdal="no"
AC_MSG_WARN("*** GDAL support disabled")
If the error was in the specfile, the variable gdal_pl_version
wouldn't be set and the rpm build would fail, because it wouldn't find the gdal_Meteosatlib.*
files in %{_libdir}/gdalplugins/
directory:
%define gdal_pl_version %(gv=$(gdal-config --version); echo ${gv%.*})
...
%files gdal
%defattr(-,root,root,-)
%{_libdir}/gdalplugins/%{gdal_pl_version}/gdal_Meteosatlib.a
%{_libdir}/gdalplugins/%{gdal_pl_version}/gdal_Meteosatlib.la
%{_libdir}/gdalplugins/%{gdal_pl_version}/gdal_Meteosatlib.so
%{_libdir}/gdalplugins/%{gdal_pl_version}/gdal_Meteosatlib.so.0
%{_libdir}/gdalplugins/%{gdal_pl_version}/gdal_Meteosatlib.so.0.0.0
Abbiamo modo di riprodurlo nella nostra infrastruttura?
I investigated the issue a bit with the mighty help of moncic-ci, it turned out that it was the specfile, but in a kind of unexpected way.
Logs are a bit clearer in moncic-ci builds (https://simc.arpae.it/moncic-ci/meteosatlib/last/master/fedora34/build.log): in short it's the dnf builddep
command that seems to evaluate some spec macros and since gdal is not present, the gdal-config
invocation on line 89 gives the error.
The subsequent launch of rpmbuild
, having all the dependencies, works correctly.
I took a quick look at the (very scarce) documentation trying to find a decent syntax to test the gdal-config
presence in a conditional macro in a way that gives no warnings for dnf builddep
and a clear error during the build itself, but so far I only got labyrinthitis.
I'll keep the issue open for a bit, long story short we can safely ignore the error.
This message occurs in every build (centos7/rocky8/fedora):
Full log: https://download.copr.fedorainfracloud.org/results/simc/stable/epel-8-x86_64/04438391-meteosatlib/builder-live.log.gz
gdal-config seems to be present:
It's invoked in two separate points, it seems the specfile call is failing: