Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM OSX Migrator #32

Merged

Conversation

regro-cf-autotick-bot
Copy link
Contributor

This feedstock is being rebuilt as part of the ARM OSX migration.

Feel free to merge the PR if CI is all green, but please don't close it
without reaching out the the ARM OSX team first at @conda-forge/help-osx-arm64.

If this PR was opened in error or needs to be updated please add the bot-rerun label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase @conda-forge-admin, please rerun bot in a PR comment to have the conda-forge-admin add it for you.

This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by https://github.com/regro/cf-scripts/actions/runs/5462111331, please use this URL for debugging.

@conda-forge-webservices
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@traversaro traversaro mentioned this pull request Jul 5, 2023
5 tasks
@traversaro
Copy link
Contributor

Ok, I reproduced the osx-arm64 problem as:

traversaro@IITICUBLAP257:~$ CONDA_SUBDIR=osx-arm64 mamba create -n lgc3 manif python=3.8

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
warning  libmamba osx version not found (virtual package skipped)
error    libmamba Could not solve for environment specs
    The following packages are incompatible
    ├─ manif   is installable with the potential options
    │  ├─ manif 0.0.4 would require
    │  │  └─ python_abi 3.10.* *_cp310, which can be installed;
    │  ├─ manif 0.0.4 would require
    │  │  └─ python_abi 3.11.* *_cp311, which can be installed;
    │  └─ manif 0.0.4 would require
    │     └─ python_abi 3.9.* *_cp39, which can be installed;
    └─ python 3.8**  is uninstallable because it requires
       └─ python_abi 3.8.* *_cp38, which conflicts with any installable versions previously reported.
critical libmamba Could not solve for environment specs

I am not sure why manif depends on python_abi, that should not be the case.

@traversaro
Copy link
Contributor

Ok, I reproduced the osx-arm64 problem as:

traversaro@IITICUBLAP257:~$ CONDA_SUBDIR=osx-arm64 mamba create -n lgc3 manif python=3.8

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

conda-forge/osx-arm64                                       Using cache
conda-forge/noarch                                          Using cache
warning  libmamba osx version not found (virtual package skipped)
error    libmamba Could not solve for environment specs
    The following packages are incompatible
    ├─ manif   is installable with the potential options
    │  ├─ manif 0.0.4 would require
    │  │  └─ python_abi 3.10.* *_cp310, which can be installed;
    │  ├─ manif 0.0.4 would require
    │  │  └─ python_abi 3.11.* *_cp311, which can be installed;
    │  └─ manif 0.0.4 would require
    │     └─ python_abi 3.9.* *_cp39, which can be installed;
    └─ python 3.8**  is uninstallable because it requires
       └─ python_abi 3.8.* *_cp38, which conflicts with any installable versions previously reported.
critical libmamba Could not solve for environment specs

I am not sure why manif depends on python_abi, that should not be the case.

Fixed by conda-forge/manif-feedstock#38 .

@traversaro
Copy link
Contributor

This is a fancier error:

-- Created target YarpUtilities for export BipedalLocomotionFramework.
-- thrift code for thrifts/BipedalLocomotion/YarpUtilities/VectorsCollection.thrift => /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688626592600/work/build/src/YarpUtilities/autogenerated
--     WORKING_DIRECTORY = [/Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688626592600/work/src/YarpUtilities]
--     COMMAND = [/Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688626592600/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/bin/yarpidl_thrift --gen yarp --I /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688626592600/work/src/YarpUtilities -v --out /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688626592600/work/build/src/YarpUtilities/CMakeFiles/yarp_idl_to_dir/thrifts/BipedalLocomotion/YarpUtilities/vectorscollection thrifts/BipedalLocomotion/YarpUtilities/VectorsCollection.thrift]
CMake Error at /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688626592600/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/share/yarp/cmake/YarpIDL.cmake:157 (message):
  yarpidl_thrift
  (/Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688626592600/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/bin/yarpidl_thrift)
  failed, aborting.
Call Stack (most recent call first):
  /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688626592600/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/share/yarp/cmake/YarpIDL.cmake:345 (_yarp_idl_to_dir_generate)
  cmake/AddBipedalLocomotionYARPThrift.cmake:27 (yarp_idl_to_dir)
  src/YarpUtilities/CMakeLists.txt:15 (add_bipedal_locomotion_yarp_thrift)

Basically as we are cross-compiling targeting osx-arm64 (the host environment) from osx-64 (the build environment) we can't run the yarpidl_thrift from yarp installed in the host environment (that is osx-arm64) on a osx-64 machine. So to fix this we need:

  • Install also yarp in the build environment, only when cross-compiling
  • Pass somehow the location of yarpidl_thrift from the build environment to CMake to make it use that one.

@traversaro
Copy link
Contributor

Pass somehow the location of yarpidl_thrift from the build environment to CMake to make it use that one.

Cool, the location of that programs is found via find_program (see https://github.com/robotology/yarp/blob/v3.8.1/cmake/YarpIDL.cmake#L121) so it is sufficient to specify the CMake cache variable YARPIDL_thrift_LOCATION to yarpidl_thrift and everything should work fine.

@traversaro
Copy link
Contributor

traversaro commented Jul 6, 2023

Basically as we are cross-compiling targeting osx-arm64 (the host environment) from osx-64 (the build environment) we can't run the yarpidl_thrift from yarp installed in the host environment (that is osx-arm64) on a osx-64 machine. So to fix this we need:

  • Install also yarp in the build environment, only when cross-compiling

  • Pass somehow the location of yarpidl_thrift from the build environment to CMake to make it use that one.

The two changes are:

The changes are quite generic so they are appliable for any recipe that uses yarpidl and want to support cross-compilation.

@traversaro traversaro added the automerge Merge the PR when CI passes label Jul 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Hi! This is the friendly conda-forge automerge bot!

I considered the following status checks when analyzing this PR:

  • linter: passed
  • azure: failed

Thus the PR was not passing and not merged.

@traversaro
Copy link
Contributor

The job failed again:

2023-07-06T08:12:12.3680400Z [316/332] Linking CXX executable bin/CentroidalMPCUnitTests
2023-07-06T08:12:24.1290810Z [317/332] Building CXX object utilities/joint-position-tracking/CMakeFiles/joint-position-tracking.dir/src/Main.cpp.o
2023-07-06T08:12:24.1390990Z [318/332] Generating code from thrifts/MasImuTestCommands.thrift
2023-07-06T08:12:24.1493130Z FAILED: utilities/mas-imu-test/thrifts/MasImuTestCommands.cpp utilities/mas-imu-test/thrifts/MasImuTestCommands.h /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688629063557/work/build/utilities/mas-imu-test/thrifts/MasImuTestCommands.cpp /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688629063557/work/build/utilities/mas-imu-test/thrifts/MasImuTestCommands.h 
2023-07-06T08:12:24.1569640Z cd /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688629063557/work/utilities/mas-imu-test && /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688629063557/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/bin/yarpidl_thrift --gen yarp:include_prefix,no_namespace_prefix --I /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688629063557/work/utilities/mas-imu-test --out /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688629063557/work/build/utilities/mas-imu-test thrifts/MasImuTestCommands.thrift
2023-07-06T08:12:24.1672260Z /bin/sh: /Users/runner/miniforge3/conda-bld/bipedal-locomotion-framework_1688629063557/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_/bin/yarpidl_thrift: Bad CPU type in executable
2023-07-06T08:12:27.4108590Z [319/332] Building CXX object devices/VectorsCollectionWrapper/CMakeFiles/VectorsCollectionWrapper.dir/src/VectorsCollectionWrapper.cpp.o

It turns out that there are two CMake macros to run yarpidl programs, yarp_idl_to_dir and yarp_add_idl. blf uses both, and while yarp_idl_to_dir works fine with cross-compilaton as mentioned before, yarp_add_idl does not. I fixed yarp_add_idl to work fine in cross-compilation in robotology/yarp#2983 and backported in conda-forge/yarp-feedstock#29, once the backported version is available we can restart the CI job.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Hi! This is the friendly conda-forge automerge bot!

Commits were made to this PR after the automerge label was added. For security reasons, I have disabled automerge by removing the automerge label. Please add the automerge label again (or ask a maintainer to do so) if you'd like to enable automerge again!

@github-actions github-actions bot removed the automerge Merge the PR when CI passes label Jul 6, 2023
@traversaro traversaro closed this Jul 6, 2023
@traversaro traversaro reopened this Jul 6, 2023
@traversaro traversaro added the automerge Merge the PR when CI passes label Jul 6, 2023
@github-actions github-actions bot merged commit 5a900da into conda-forge:main Jul 6, 2023
@regro-cf-autotick-bot regro-cf-autotick-bot deleted the bot-pr_arm_osx_hc98675 branch July 6, 2023 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the PR when CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants