Skip to content

Build failure with cmake 3.19.2 #12920

Description

@dfandrich

I did this

Trying to configure 8.6.0 (or master) using cmake 3.19.2 results in the error:

-- Enabled SSL backends: OpenSSL
-- Configuring done
CMake Error:
  Error evaluating generator expression:

    $<LIST:TRANSFORM,curl_easy_cleanup.3;curl_easy_duphandle.3;curl_easy_escape.3;curl_easy_getinfo.3;curl_easy_header.3;curl_easy_init.3;curl_easy_nextheader.3;curl_easy_option_by_id.3;curl_easy_option_by_name.3;curl_easy_option_next.3;curl_easy_pause.3;curl_easy_perform.3;curl_easy_recv.3;curl_easy_reset.3;curl_easy_send.3;curl_easy_setopt.3;curl_easy_strerror.3;curl_easy_unescape.3;curl_easy_upkeep.3;curl_escape.3;curl_formadd.3;curl_formfree.3;curl_formget.3;curl_free.3;curl_getdate.3;curl_getenv.3;curl_global_cleanup.3;curl_global_init.3;curl_global_init_mem.3;curl_global_trace.3;curl_global_sslset.3;curl_mime_addpart.3;curl_mime_data.3;curl_mime_data_cb.3;curl_mime_encoder.3;curl_mime_filedata.3;curl_mime_filename.3;curl_mime_free.3;curl_mime_headers.3;curl_mime_init.3;curl_mime_name.3;curl_mime_subparts.3;curl_mime_type.3;curl_mprintf.3;curl_multi_add_handle.3;curl_multi_assign.3;curl_multi_cleanup.3;curl_multi_fdset.3;curl_multi_get_handles.3;curl_multi_info_read.3;curl_multi_init.3;curl_multi_perform.3;curl_multi_poll.3;curl_multi_remove_handle.3;curl_multi_setopt.3;curl_multi_socket.3;curl_multi_socket_action.3;curl_multi_socket_all.3;curl_multi_strerror.3;curl_multi_timeout.3;curl_multi_wakeup.3;curl_multi_wait.3;curl_pushheader_bynum.3;curl_pushheader_byname.3;curl_share_cleanup.3;curl_share_init.3;curl_share_setopt.3;curl_share_strerror.3;curl_slist_append.3;curl_slist_free_all.3;curl_strequal.3;curl_strnequal.3;curl_unescape.3;curl_url.3;curl_url_cleanup.3;curl_url_dup.3;curl_url_get.3;curl_url_set.3;curl_url_strerror.3;curl_version.3;curl_version_info.3;curl_ws_meta.3;curl_ws_recv.3;curl_ws_send.3;libcurl-easy.3;libcurl-env.3;libcurl-env-dbg.3;libcurl-errors.3;libcurl-multi.3;libcurl-security.3;libcurl-share.3;libcurl-symbols.3;libcurl-thread.3;libcurl-tutorial.3;libcurl-url.3;libcurl-ws.3;libcurl.3,PREPEND,/home/dan/src/curl-git/build/docs/libcurl/>

  Expression did not evaluate to a known generator expression

Bisecting shows commit a808aab is at fault. This version of cmake is only a couple of years old and the documentation says cmake 3.7 is the earliest supported version, so I would expect this to work.

I expected the following

cmake should run without error.

curl/libcurl version

curl 8.6.0

operating system

Linux x86_64

Activity

  1. vszakats commented on Feb 9, 2024

    @vszakats
    Member

    @dfandrich: This syntax was in fact introduced a few commits earlier in ea0b575 (not by me).

    It's a new here that someone must be pointed out by name to be "at fault"!

  2. dfandrich commented on Feb 10, 2024

    @dfandrich
    ContributorAuthor

    Commit 1621136 (the previous one) configures fine but commit a808aab is the one that starts showing this problem (at least without specifying any build options on my system).

  3. vszakats commented on Feb 10, 2024

    @vszakats
    Member

    These still have nothing to do with the introduction of the breaking CMake syntax.

    It's trivial to look up when it was introduced:

    $ git log -S 'LIST:TRANSFORM'
    commit ea0b575dab86a3c44dd1d547dc500276266aa382
    [...]
    
  4. vszakats commented on Feb 10, 2024

    @vszakats
    Member

    The reason you are not seeing the problem earlier, is because my "at fault" (your wording) commit made the libcurl manual option to work by default (that is without having to manually enable building the curl manual too with another option). But, given the necessary options, you'd see the same issue after the initial commit.

  5. dfandrich commented on Feb 10, 2024

    @dfandrich
    ContributorAuthor

    Makes, sense and what I was hedging about with "without specifying any build options". @levitte, is there an alternate way of doing this that works on older cmake?

  6. bagder commented on Feb 10, 2024

    @bagder
    Member

    Can we do something in the builds/CI to detect when we rely on too new cmake features?

  7. levitte commented on Feb 10, 2024

    @levitte
    Contributor

    It was quite easy to replace the generator expression with a loop. Isn't quite as nice, but should be workable much further back in CMake versions.

    This has me wonder if I should have a container in place with an old CMake, just to test this sort of thing (no, not just for curl...)

    Anyway, fix in #12922

  8. levitte commented on Feb 10, 2024

    @levitte
    Contributor

    Can we do something in the builds/CI to detect when we rely on too new cmake features?

    It's probably possible to install a cmake package with an appropriately old version.

    Question is, how far back do the package repositories go? That being said, this can also be solved, by having a package repository of your own with suitably old stuff and try to install from that [yeah, cringe, and unsure if that's actually possible], or self-host a runner (for those CIs that permit it), again with suitably old stuff [yeah, cringe].

  9. dfandrich commented on Feb 10, 2024

    @dfandrich
    ContributorAuthor
  10. added a commit that references this issue on Feb 12, 2024
  11. thomgree commented on Feb 28, 2024

    @thomgree

    I worked around this using the BUILD_LIBCURL_DOCS=OFF CMake option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions