conda-forge / idyntree-feedstock

A conda-smithy repository for idyntree.
BSD 3-Clause "New" or "Revised" License
3 stars 7 forks source link

Missing symbol on MacOS #105

Closed diegoferigo closed 1 month ago

diegoferigo commented 1 month ago

Solution to issue cannot be found in the documentation.

Issue

I'm not a mac user myself, but I have a downstream project that installs iDynTree distributed with conda-forge for continuous integration checks. I just got a overnight failure in the macOS job of a GitHub action that imports the SWIG-based Python bindings. Here below the following error message:

 ============================= test session starts ==============================
platform darwin -- Python 3.10.15, pytest-8.3.3, pluggy-1.5.0 -- /Users/runner/miniconda3/envs/test/bin/python3.10
cachedir: .pytest_cache
rootdir: /Users/runner/work/rod/rod
configfile: setup.cfg
testpaths: tests
collecting ... collected 2 items / 2 errors

==================================== ERRORS ====================================
_________________ ERROR collecting tests/test_urdf_exporter.py _________________
ImportError while importing test module '/Users/runner/work/rod/rod/tests/test_urdf_exporter.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniconda3/envs/test/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_urdf_exporter.py:1: in <module>
    import idyntree.bindings as idt
../../../miniconda3/envs/test/lib/python3.10/site-packages/idyntree/__init__.py:1: in <module>
    from . import swig
../../../miniconda3/envs/test/lib/python3.10/site-packages/idyntree/swig.py:10: in <module>
    from . import _iDynTree
E   ImportError: dlopen(/Users/runner/miniconda3/envs/test/lib/python3.10/site-packages/idyntree/_iDynTree.so, 0x0002): symbol not found in flat namespace '_SCOTCH_errorPrint'
_________________ ERROR collecting tests/test_urdf_parsing.py __________________
ImportError while importing test module '/Users/runner/work/rod/rod/tests/test_urdf_parsing.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../../miniconda3/envs/test/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_urdf_parsing.py:3: in <module>
    import robot_descriptions.loaders.idyntree
../../../miniconda3/envs/test/lib/python3.10/site-packages/robot_descriptions/loaders/idyntree.py:14: in <module>
    import idyntree.swig as idyn
../../../miniconda3/envs/test/lib/python3.10/site-packages/idyntree/__init__.py:1: in <module>
    from . import swig
../../../miniconda3/envs/test/lib/python3.10/site-packages/idyntree/swig.py:10: in <module>
    from . import _iDynTree
E   ImportError: dlopen(/Users/runner/miniconda3/envs/test/lib/python3.10/site-packages/idyntree/_iDynTree.so, 0x0002): symbol not found in flat namespace '_SCOTCH_errorPrint'
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 2 errors in 0.86s ===============================

My suspicion is that the package is compiled and distributed linking dynamically against a specific version of a C++ dependency, but then the resolved downstream environment installs a different version of this library that is not ABI-compatible (there's a missing symbol).

Installed packages

Channels:
 - conda-forge
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /Users/runner/miniconda3/envs/test

  added / updated specs:
    - black
    - coloredlogs
    - idyntree
    - isort
    - libgz-tools2
    - libsdformat13
    - mashumaro
    - numpy
    - packaging
    - pptree
    - pytest
    - resolve-robotics-uri-py
    - robot_descriptions
    - scipy
    - trimesh
    - xmltodict

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ampl-mp-3.1.0              |    hbec66e7_1006         968 KB  conda-forge
    assimp-5.4.3               |       ha9c0b8d_0         2.4 MB  conda-forge
    black-24.8.0               |  py310hbe9552e_1         299 KB  conda-forge
    cli11-2.4.1                |       hebf3989_0          82 KB  conda-forge
    click-8.1.7                |unix_pyh707e725_0          82 KB  conda-forge
    colorama-0.4.6             |     pyhd8ed1ab_0          25 KB  conda-forge
    coloredlogs-15.0.1         |     pyhd8ed1ab_3          40 KB  conda-forge
    console_bridge-1.0.2       |       h3e96240_1          17 KB  conda-forge
    eigen-3.4.0                |       h1995070_0         1.0 MB  conda-forge
    exceptiongroup-1.2.2       |     pyhd8ed1ab_0          20 KB  conda-forge
    gettext-0.22.5             |       h8414b35_3         472 KB  conda-forge
    gettext-tools-0.22.5       |       h8414b35_3         2.4 MB  conda-forge
    gitdb-4.0.11               |     pyhd8ed1ab_0          52 KB  conda-forge
    gitpython-3.1.43           |     pyhd8ed1ab_0         153 KB  conda-forge
    glfw-3.4                   |       h93a5062_0         111 KB  conda-forge
    gmp-6.3.0                  |       h7bae524_2         357 KB  conda-forge
    humanfriendly-10.0         |     pyhd8ed1ab_6          72 KB  conda-forge
    icu-75.1                   |       hfee45f7_0        11.3 MB  conda-forge
    idyntree-13.0.0            |  py310h450bec7_1         1.9 MB  conda-forge
    iniconfig-2.0.0            |     pyhd8ed1ab_0          11 KB  conda-forge
    ipopt-3.14.16              |       h4500666_5         738 KB  conda-forge
    irrlicht-1.8.5             |       hdfd4c6d_5         1.1 MB  conda-forge
    isort-5.13.2               |     pyhd8ed1ab_0          72 KB  conda-forge
    libasprintf-0.22.5         |       h8414b35_3          40 KB  conda-forge
    libasprintf-devel-0.22.5   |       h8414b35_3          34 KB  conda-forge
    libblas-3.9.0              |24_osxarm64_openblas          15 KB  conda-forge
    libboost-1.86.0            |       h29978a0_2         1.9 MB  conda-forge
    libcblas-3.9.0             |24_osxarm64_openblas          15 KB  conda-forge
    libcxx-19.1.0              |       ha82da77_0         509 KB  conda-forge
    libedit-3.1.20191231       |       hc8eb9b7_2          94 KB  conda-forge
    libgettextpo-0.22.5        |       h8414b35_3         156 KB  conda-forge
    libgettextpo-devel-0.22.5  |       h8414b35_3          36 KB  conda-forge
    libgfortran-5.0.0          |13_2_0_hd922786_3         108 KB  conda-forge
    libgfortran5-13.2.0        |       hf226fd6_3         974 KB  conda-forge
    libgz-cmake3-3.5.3         |       h00cdb27_0         201 KB  conda-forge
    libgz-math7-7.5.1          |       hf9b8971_0         218 KB  conda-forge
    libgz-tools2-2.0.1         |       hce4b3f6_0          38 KB  conda-forge
    libgz-utils2-2.2.0         |       hf9b8971_0          54 KB  conda-forge
    libiconv-1.17              |       h0d3ecfb_2         661 KB  conda-forge
    libintl-0.22.5             |       h8414b35_3          79 KB  conda-forge
    libintl-devel-0.22.5       |       h8414b35_3          38 KB  conda-forge
    libjpeg-turbo-3.0.0        |       hb547adb_1         535 KB  conda-forge
  zstd               conda-forge/osx-arm64::zstd-1.5.6-hb46c0d2_0 

Downloading and Extracting Packages: ...working... done
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done

Environment info

https://github.com/ami-iit/rod/actions/runs/11044452210/job/30680404191
traversaro commented 1 month ago

This will be fixed by https://github.com/conda-forge/ipopt-feedstock/pull/111 .

diegoferigo commented 1 month ago

Awesome, great! I anticipated that issue by good.... 5 minutes :laughing:

traversaro commented 1 month ago

The issue was solved in https://github.com/conda-forge/ipopt-feedstock/pull/111 but reintroduced in some form in https://github.com/conda-forge/ipopt-feedstock/pull/112, see https://github.com/conda-forge/ipopt-feedstock/issues/114 .

traversaro commented 1 month ago

Fixed by https://github.com/conda-forge/ipopt-feedstock/pull/120 .

diegoferigo commented 1 month ago

Thanks! I triggered manually the failed CI runs and I confirm that the problem is now solved. Here below the resolved environment:

Channels:
 - conda-forge
 - defaults
Platform: osx-arm64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
## Package Plan ##
  environment location: /Users/runner/miniconda3/envs/test
  added / updated specs:
    - black
    - coloredlogs
    - idyntree
    - isort
    - libgz-tools2
    - libsdformat13
    - mashumaro
    - numpy
    - packaging
    - pptree
    - pytest
    - resolve-robotics-uri-py
    - robot_descriptions
    - scipy
    - trimesh
    - xmltodict
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    ampl-mp-3.1.0              |    hbec66e7_1006         968 KB  conda-forge
    assimp-5.4.3               |       ha9c0b8d_0         2.4 MB  conda-forge
    black-24.8.0               |  py310hbe9552e_1         299 KB  conda-forge
    cli11-2.4.1                |       hebf3989_0          82 KB  conda-forge
    click-8.1.7                |unix_pyh707e725_0          82 KB  conda-forge
    colorama-0.4.6             |     pyhd8ed1ab_0          25 KB  conda-forge
    coloredlogs-15.0.1         |     pyhd8ed1ab_3          40 KB  conda-forge
    console_bridge-1.0.2       |       h3e96240_1          17 KB  conda-forge
    eigen-3.4.0                |       h1995070_0         1.0 MB  conda-forge
    exceptiongroup-1.2.2       |     pyhd8ed1ab_0          20 KB  conda-forge
    gettext-0.22.5             |       h8414b35_3         472 KB  conda-forge
    gettext-tools-0.22.5       |       h8414b35_3         2.4 MB  conda-forge
    gitdb-4.0.11               |     pyhd8ed1ab_0          52 KB  conda-forge
    gitpython-3.1.43           |     pyhd8ed1ab_0         153 KB  conda-forge
    glfw-3.4                   |       h93a5062_0         111 KB  conda-forge
    gmp-6.3.0                  |       h7bae524_2         357 KB  conda-forge
    humanfriendly-10.0         |     pyhd8ed1ab_6          72 KB  conda-forge
    icu-75.1                   |       hfee45f7_0        11.3 MB  conda-forge
    idyntree-13.0.0            |  py310h450bec7_1         1.9 MB  conda-forge
    iniconfig-2.0.0            |     pyhd8ed1ab_0          11 KB  conda-forge
    ipopt-3.14.16              |       h1cdd005_9         739 KB  conda-forge
    irrlicht-1.8.5             |       hdfd4c6d_5         1.1 MB  conda-forge
    isort-5.13.2               |     pyhd8ed1ab_0          72 KB  conda-forge
    libasprintf-0.22.5         |       h8414b35_3          40 KB  conda-forge
    libasprintf-devel-0.22.5   |       h8414b35_3          34 KB  conda-forge
    libblas-3.9.0              |24_osxarm64_openblas          15 KB  conda-forge
    libboost-1.86.0            |       h29978a0_2         1.9 MB  conda-forge
    libcblas-3.9.0             |24_osxarm64_openblas          15 KB  conda-forge
    libcxx-19.1.0              |       ha82da77_0         509 KB  conda-forge
    libedit-3.1.20191231       |       hc8eb9b7_2          94 KB  conda-forge
    libgettextpo-0.22.5        |       h8414b35_3         156 KB  conda-forge
    libgettextpo-devel-0.22.5  |       h8414b35_3          36 KB  conda-forge
    libgfortran-5.0.0          |13_2_0_hd922786_3         108 KB  conda-forge
    libgfortran5-13.2.0        |       hf226fd6_3         974 KB  conda-forge
    libgz-cmake3-3.5.3         |       h00cdb27_0         201 KB  conda-forge
    libgz-math7-7.5.1          |       hf9b8971_0         218 KB  conda-forge
    libgz-tools2-2.0.1         |       hce4b3f6_0          38 KB  conda-forge
    libgz-utils2-2.2.0         |       hf9b8971_0          54 KB  conda-forge
    libiconv-1.17              |       h0d3ecfb_2         661 KB  conda-forge
    libintl-0.22.5             |       h8414b35_3          79 KB  conda-forge
    libintl-devel-0.22.5       |       h8414b35_3          38 KB  conda-forge
    libjpeg-turbo-3.0.0        |       hb547adb_1         535 KB  conda-forge
    liblapack-3.9.0            |24_osxarm64_openblas          15 KB  conda-forge
    libopenblas-0.3.27         |openmp_h517c56d_1         2.8 MB  conda-forge
    libosqp-0.6.3              |       h13dd4ca_0          63 KB  conda-forge
    libpng-1.6.44              |       hc14010f_0         257 KB  conda-forge
    libqdldl-0.1.5             |       hb7217d7_1          15 KB  conda-forge
    libscotch-7.0.4            |       h7c38b86_5         266 KB  conda-forge
    libsdformat13-13.6.0       |       h79a30e3_4         722 KB  conda-forge
    libxcb-1.17.0              |       hdb1d25a_0         316 KB  conda-forge
    libxml2-2.12.7             |       h01dff8b_4         575 KB  conda-forge
    llvm-openmp-18.1.8         |       hde57baf_1         270 KB  conda-forge
    mashumaro-3.13.1           |     pyhd8ed1ab_0          71 KB  conda-forge
    metis-5.1.0                |    h13dd4ca_1007         3.7 MB  conda-forge
    mumps-include-5.7.3        |       hce30654_4          23 KB  conda-forge
    mumps-seq-5.7.3            |       h5112546_4         2.1 MB  conda-forge
    mypy_extensions-1.0.0      |     pyha770c72_0          10 KB  conda-forge
    numpy-2.1.1                |  py310hcaf17df_0         5.6 MB  conda-forge
    osqp-eigen-0.8.1           |       h136a8c3_1          33 KB  conda-forge
    packaging-24.1             |     pyhd8ed1ab_0          49 KB  conda-forge
    pathspec-0.12.1            |     pyhd8ed1ab_0          40 KB  conda-forge
    platformdirs-4.3.6         |     pyhd8ed1ab_0          20 KB  conda-forge
    pluggy-1.5.0               |     pyhd8ed1ab_0          23 KB  conda-forge
    pptree-3.1                 |     pyhd8ed1ab_0           9 KB  conda-forge
    pthread-stubs-0.4          |    hd74edd7_1002           8 KB  conda-forge
    pytest-8.3.3               |     pyhd8ed1ab_0         252 KB  conda-forge
    python_abi-3.10            |          5_cp310           6 KB  conda-forge
    resolve-robotics-uri-py-0.3.0|     pyhd8ed1ab_0          12 KB  conda-forge
    robot_descriptions-1.12.0  |     pyhd8ed1ab_0          38 KB  conda-forge
    ruby-3.3.3                 |       h57ff7e8_0         8.2 MB  conda-forge
    scipy-1.14.1               |  py310h35b72dc_0        13.7 MB  conda-forge
    sdl-1.2.68                 |       hfc12253_0         152 KB  conda-forge
    sdl2-2.30.7                |       hf9b8971_0         1.2 MB  conda-forge
    smmap-5.0.0                |     pyhd8ed1ab_0          22 KB  conda-forge
    tinyxml2-10.0.0            |       hebf3989_0         110 KB  conda-forge
    tomli-2.0.1                |     pyhd8ed1ab_0          16 KB  conda-forge
    tqdm-4.66.5                |     pyhd8ed1ab_0          87 KB  conda-forge
    trimesh-4.4.9              |     pyhd8ed1ab_0         553 KB  conda-forge
    typing-extensions-4.12.2   |       hd8ed1ab_0          10 KB  conda-forge
    typing_extensions-4.12.2   |     pyha770c72_0          39 KB  conda-forge
    unixodbc-2.3.12            |       h0e2417a_0         248 KB  conda-forge
    urdfdom-4.0.1              |       h922ef61_0          91 KB  conda-forge
    urdfdom_headers-1.1.2      |       h7b3277c_0          19 KB  conda-forge
    xmltodict-0.13.0           |     pyhd8ed1ab_0          13 KB  conda-forge
    xorg-libx11-1.8.10         |       h2321a68_0         736 KB  conda-forge
    xorg-libxau-1.0.11         |       hd74edd7_1          13 KB  conda-forge
    xorg-libxdmcp-1.1.3        |       hd74edd7_1          18 KB  conda-forge
    xorg-libxext-1.3.4         |       h1a8c8d9_2          41 KB  conda-forge
    xorg-xextproto-7.3.0       |    hd74edd7_1004          30 KB  conda-forge
    xorg-xorgproto-2024.1      |       hd74edd7_1         554 KB  conda-forge
    yaml-0.2.5                 |       h3422bc3_2          86 KB  conda-forge
    zlib-1.3.1                 |       hfb2fe0b_1          76 KB  conda-forge
    zstd-1.5.6                 |       hb46c0d2_0         396 KB  conda-forge
    ------------------------------------------------------------