Skip to content

Compiling stdlib with cross-compiler #654

Open
@kjelljorner

Description

@kjelljorner

Description

I encounter some errors when trying to cross-compile stdlib on conda-forge for MacOS/Arm64. Specifically, it has to do with the test for f18errorstop, which does not work in cross-compiling mode.

  -- Performing Test f18errorstop
  CMake Error: TRY_RUN() invoked in cross-compiling mode, please set the following cache variables appropriately:
     f18errorstop_EXITCODE (advanced)
     f18errorstop_EXITCODE__TRYRUN_OUTPUT (advanced)

Currently, I'm patching this with the help of some compiler flags that @awvwgk gave me:

-Df18errorstop_EXITCODE=1
-Df18errorstop_EXITCODE__TRYRUN_OUTPUT=''

Expected Behaviour

Not really sure what would be the best way to fix this as I am not a very proficient CMake user, but it seems that it is possible to detect when cross-compiling, and adjust which tests are run accordingly.

Version of stdlib

fb4ca80

Platform and Architecture

MacOS/Arm

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuild: cmakeIssue with stdlib's CMake build filesplatform: MacOSBuild issues specific to the MacOS platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions