Skip to content

Failed compilation on Cygwin #10614

@Aethedor

Description

@Aethedor

Summary

Version 4.0.0 doesn't compile on Cygwin.

System information

Using the latest Cygwin on a Windows machine.
mbedTLS version 4.0.0

Expected behavior

A successful compilation.

Actual behavior

Several CMake errors.

=== Python warning

CMake Warning (dev) at /usr/share/cmake-4.2.1/Modules/FindPython/Support.cmake:2088 (find_program):
  Policy CMP0109 is not set: find_program() requires permission to execute
  but not to read.  Run "cmake --help-policy CMP0109" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  The file

    /cygdrive/c/Users/hugo/AppData/Local/Microsoft/WindowsApps/python3.exe

  is readable but not executable.  CMake is using it for compatibility.
Call Stack (most recent call first):
  /usr/share/cmake-4.2.1/Modules/FindPython3.cmake:671 (include)
  mbedtls/tf-psa-crypto/CMakeLists.txt:132 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Python3 (missing: Interpreter)
    Reason given by package:
        Interpreter: Cannot run the interpreter "/cygdrive/c/Users/hugo/AppData/Local/Microsoft/WindowsApps/python3.exe"

=== Build error

CMake Error at mbedtls/library/CMakeLists.txt:342 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_SONAME_FILE_NAME:tfpsacrypto>

  TARGET_SONAME_FILE is not allowed for DLL target platforms.


CMake Error at mbedtls/library/CMakeLists.txt:342 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_SONAME_FILE_NAME:tfpsacrypto>

  TARGET_SONAME_FILE is not allowed for DLL target platforms.


CMake Error at mbedtls/library/CMakeLists.txt:342 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_SONAME_FILE_NAME:tfpsacrypto>

  TARGET_SONAME_FILE is not allowed for DLL target platforms.


CMake Error at mbedtls/library/CMakeLists.txt:342 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_SONAME_FILE_NAME:tfpsacrypto>

  TARGET_SONAME_FILE is not allowed for DLL target platforms.


CMake Error at mbedtls/library/CMakeLists.txt:342 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_SONAME_FILE_NAME:tfpsacrypto>

  TARGET_SONAME_FILE is not allowed for DLL target platforms.


CMake Error at mbedtls/library/CMakeLists.txt:342 (add_custom_command):
  Error evaluating generator expression:

    $<TARGET_SONAME_FILE_NAME:tfpsacrypto>

  TARGET_SONAME_FILE is not allowed for DLL target platforms.

Steps to reproduce

Install Cygwin on a Windows machine. Download http://www.leisink.net/hiawatha-12.0.tar.gz and unpack it. In the unpacked directory, use
mkdir build
cd build
cmake ..

Additional information

The Python warning was solved by adding "cmake_policy(SET CMP0109 NEW)" to tf-psa-crypto/CMakeLists.txt, which I already applied in the specified Hiawatha source. The problem is the TARGET_SONAME_FILE is not allowed for DLL target platforms. errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp-wantedThis issue is not being actively worked on, but PRs welcome.

    Type

    Projects

    Status

    Incoming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions