Bug 255480 - mail/evolution-ews fails to configure
Summary: mail/evolution-ews fails to configure
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-29 09:55 UTC by Vikash Badal
Modified: 2021-05-25 09:32 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
[patch] fix configure error with cmake 3.20.1 (2.20 KB, patch)
2021-05-03 00:47 UTC, John Hein
jcfyecrayz: maintainer-approval? (gnome)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vikash Badal 2021-04-29 09:55:56 UTC
===>  Configuring for evolution-ews-3.40.0
===>  Performing out-of-source build
/bin/mkdir -p /wrkdirs/usr/ports/mail/evolution-ews/work/.build
-- The C compiler identification is Clang 10.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at cmake/modules/PrintableOptions.cmake:38 (message):
  variable name cannot be empty
Call Stack (most recent call first):
  CMakeLists.txt:70 (add_printable_variable)


-- Configuring incomplete, errors occurred!
Comment 1 John Hein 2021-05-02 23:03:49 UTC
This was observed here as well.  Add desktop@

I have no patch at this time nor investigated what 'name' cmake thinks is empty.
Comment 2 John Hein 2021-05-02 23:38:38 UTC
Apparently this is a failure due to cmake 3.20.1

See https://cgit.freebsd.org/ports/commit/?id=8e6f26eaaf4271ad963a88eb3fbca3dd08e5373b
Comment 3 John Hein 2021-05-02 23:42:04 UTC
(In reply to John Hein from comment #2)
That commit came from upstream:

https://gitlab.gnome.org/GNOME/evolution/-/commit/7cfe4190e3e72b40472d57871459f1b136393003
Comment 4 John Hein 2021-05-03 00:44:22 UTC
(In reply to John Hein from comment #3)
This looks like it could be a cmake bug or at least an undocumented behavior change.  The cmake-language(7) man page says:

"The if() command has a special condition syntax that allows for variable references in the short form <variable> instead of ${<variable>}. However, environment and cache variables always need to be referenced as $ENV{<variable>} or $CACHE{<variable>}."

I don't see that adding the ${} matters.  But it seems that 'if (foo STREQUAL "")' wants "" around foo now.  With cmake 3.19.6, it works fine without "".  With cmake 3.20.1, that's when the test condition for 'STREQUAL ""' is true despite 'foo' having a non-empty value.
Comment 5 John Hein 2021-05-03 00:47:37 UTC
Created attachment 224623 [details]
[patch] fix configure error with cmake 3.20.1
Comment 6 John Hein 2021-05-19 16:18:19 UTC
This is still failing on package builders.

http://beefy18.nyi.freebsd.org/data/main-amd64-default/p7bfc2c072607_s8d2b4b2e7c/logs/evolution-ews-3.40.0.log

QA:
  The attached patch was tested successfully in poudriere


See also upstream cmake bug:

https://gitlab.kitware.com/cmake/cmake/-/issues/22140#note_15955cbe1111a3219dcbb87e673fdd6831fbf3a4

Fix applied upstream, but it is not yet in the latest cmake (3.20.2)
Comment 7 John Hein 2021-05-24 20:09:27 UTC
This was fixed by the May 21 commit which applies [nearly] the same patch as attachment 224623 [details]:

https://cgit.freebsd.org/ports/commit/?id=3bb6dd60eeac1b7982dfa049aa3696be006ef812

This can probably be closed.