conda-forge / occt-feedstock

A conda-smithy repository for occt.
BSD 3-Clause "New" or "Revised" License
4 stars 21 forks source link

FreeImage related error with latest build on osx (hb9b6dc7_6) #42

Closed adam-urbanczyk closed 3 years ago

adam-urbanczyk commented 4 years ago

Issue: after importing a compiled python module linking to occt I get this:

ImportError: dlopen(/Users/runner/runners/2.166.4/work/1/s/build/OCP.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libfreeimage.3.dylib
  Referenced from: /usr/local/miniconda/envs/cpp-py-bindgen/lib/libTKService.7.4.0.dylib
  Reason: Incompatible library version: libTKService.7.dylib requires version 3.0.0 or later, but libfreeimage.3.dylib provides version 0.0.0

Environment (conda list):

``` 2020-04-28T09:07:01.4224870Z # Name Version Build Channel 2020-04-28T09:07:01.4225880Z bzip2 1.0.8 h0b31af3_2 conda-forge 2020-04-28T09:07:01.4226850Z ca-certificates 2020.4.5.1 hecc5488_0 conda-forge 2020-04-28T09:07:01.4227810Z certifi 2020.4.5.1 py36h9f0ad1d_0 conda-forge 2020-04-28T09:07:01.4228300Z clang 6.0.0 pypi_0 pypi 2020-04-28T09:07:01.4229280Z clang-tools 9.0.1 default_hf57f61e_0 conda-forge 2020-04-28T09:07:01.4230850Z clangdev 9.0.1 default_hf57f61e_0 conda-forge 2020-04-28T09:07:01.4231910Z clangxx 9.0.1 default_hf57f61e_0 conda-forge 2020-04-28T09:07:01.4232580Z click 7.1.2 pypi_0 pypi 2020-04-28T09:07:01.4233600Z cmake 3.16.5 hd28f656_0 conda-forge 2020-04-28T09:07:01.4234190Z contextlib2 0.6.0.post1 pypi_0 pypi 2020-04-28T09:07:01.4235220Z curl 7.69.1 h2d98d24_0 conda-forge 2020-04-28T09:07:01.4235870Z cymbal 1.0.0 pypi_0 pypi 2020-04-28T09:07:01.4236820Z expat 2.2.9 h4a8c4bd_2 conda-forge 2020-04-28T09:07:01.4237870Z fontconfig 2.13.1 h6b1039f_1001 conda-forge 2020-04-28T09:07:01.4238920Z freeimage 3.18.0 h4a8c4bd_0 conda-forge 2020-04-28T09:07:01.4239910Z freetype 2.10.1 h8da9a1a_0 conda-forge 2020-04-28T09:07:01.4240980Z future 0.18.2 py36h9f0ad1d_1 conda-forge 2020-04-28T09:07:01.4242030Z hdf4 4.2.13 h84186c3_1003 conda-forge 2020-04-28T09:07:01.4243030Z hdf5 1.10.6 nompi_h3e39495_100 conda-forge 2020-04-28T09:07:01.4244080Z icu 64.2 h6de7cb9_1 conda-forge 2020-04-28T09:07:01.4245070Z importlib-metadata 1.6.0 pypi_0 pypi 2020-04-28T09:07:01.4245720Z jinja2 2.11.2 pypi_0 pypi 2020-04-28T09:07:01.4246720Z joblib 0.14.1 py_0 conda-forge 2020-04-28T09:07:01.4247700Z jpeg 9c h1de35cc_1001 conda-forge 2020-04-28T09:07:01.4248760Z jsoncpp 1.8.4 ha1b3eb9_1002 conda-forge 2020-04-28T09:07:01.4249810Z krb5 1.17.1 h1752a42_0 conda-forge 2020-04-28T09:07:01.4251440Z libclang 9.0.1 default_hf57f61e_0 conda-forge 2020-04-28T09:07:01.4252510Z libcurl 7.69.1 hc0b9707_0 conda-forge 2020-04-28T09:07:01.4253560Z libcxx 10.0.0 h1af66ff_2 conda-forge 2020-04-28T09:07:01.4254560Z libedit 3.1.20170329 hcfe32e1_1001 conda-forge 2020-04-28T09:07:01.4255630Z libffi 3.2.1 h4a8c4bd_1007 conda-forge 2020-04-28T09:07:01.4256680Z libgfortran 4.0.0 0 conda-forge 2020-04-28T09:07:01.4257740Z libiconv 1.15 h0b31af3_1006 conda-forge 2020-04-28T09:07:01.4258820Z libllvm9 9.0.1 h7475705_1 conda-forge 2020-04-28T09:07:01.4260230Z libnetcdf 4.7.4 nompi_ha11d67f_102 conda-forge 2020-04-28T09:07:01.4261660Z libpng 1.6.37 hbbe82c9_1 conda-forge 2020-04-28T09:07:01.4262830Z libssh2 1.8.2 hcdc9a53_2 conda-forge 2020-04-28T09:07:01.4263900Z libtiff 4.1.0 h2ae36a8_6 conda-forge 2020-04-28T09:07:01.4264910Z libuv 1.34.0 h0b31af3_0 conda-forge 2020-04-28T09:07:01.4266000Z libwebp-base 1.1.0 h0b31af3_3 conda-forge 2020-04-28T09:07:01.4267050Z libxml2 2.9.10 h53d96d6_0 conda-forge 2020-04-28T09:07:01.4268040Z llvm-tools 9.0.1 h1341992_1 conda-forge 2020-04-28T09:07:01.4269090Z llvmdev 9.0.1 h7475705_1 conda-forge 2020-04-28T09:07:01.4269740Z logzero 1.5.0 pypi_0 pypi 2020-04-28T09:07:01.4270690Z lz4-c 1.9.2 h4a8c4bd_0 conda-forge 2020-04-28T09:07:01.4271340Z markupsafe 1.1.1 pypi_0 pypi 2020-04-28T09:07:01.4272740Z ncurses 6.1 h0a44026_1002 conda-forge 2020-04-28T09:07:01.4273800Z ninja 1.10.0 ha1b3eb9_0 conda-forge 2020-04-28T09:07:01.4274440Z numpy 1.18.3 pypi_0 pypi 2020-04-28T09:07:01.4275400Z occt 7.4.0 hb9b6dc7_6 conda-forge 2020-04-28T09:07:01.4276450Z openssl 1.1.1g h0b31af3_0 conda-forge 2020-04-28T09:07:01.4277090Z pandas 1.0.3 pypi_0 pypi 2020-04-28T09:07:01.4277620Z path 13.1.0 pypi_0 pypi 2020-04-28T09:07:01.4278580Z path-py 12.4.0 pypi_0 pypi 2020-04-28T09:07:01.4279610Z pip 20.0.2 py_2 conda-forge 2020-04-28T09:07:01.4280590Z pybind11 2.4.3 py36h863e41a_3 conda-forge 2020-04-28T09:07:01.4281240Z pyparsing 2.4.7 pypi_0 pypi 2020-04-28T09:07:01.4282260Z python 3.6.10 h4334963_1011_cpython conda-forge 2020-04-28T09:07:01.4283250Z python-dateutil 2.8.1 pypi_0 pypi 2020-04-28T09:07:01.4284280Z python_abi 3.6 1_cp36m conda-forge 2020-04-28T09:07:01.4284930Z pytz 2020.1 pypi_0 pypi 2020-04-28T09:07:01.4285870Z readline 8.0 hcfe32e1_0 conda-forge 2020-04-28T09:07:01.4286920Z rhash 1.3.6 h1de35cc_1001 conda-forge 2020-04-28T09:07:01.4287500Z schema 0.7.2 pypi_0 pypi 2020-04-28T09:07:01.4288490Z setuptools 46.1.3 py36h9f0ad1d_0 conda-forge 2020-04-28T09:07:01.4289130Z six 1.14.0 pypi_0 pypi 2020-04-28T09:07:01.4290070Z sqlite 3.30.1 h93121df_0 conda-forge 2020-04-28T09:07:01.4291600Z tbb 2019.9 ha1b3eb9_1 conda-forge 2020-04-28T09:07:01.4292640Z tk 8.6.10 hbbe82c9_0 conda-forge 2020-04-28T09:07:01.4293620Z toml 0.10.0 py_0 conda-forge 2020-04-28T09:07:01.4294270Z toposort 1.5 pypi_0 pypi 2020-04-28T09:07:01.4294870Z tqdm 4.45.0 pypi_0 pypi 2020-04-28T09:07:01.4295810Z vtk 8.2.0 py36h17790de_215 conda-forge 2020-04-28T09:07:01.4296850Z wheel 0.34.2 py_1 conda-forge 2020-04-28T09:07:01.4297890Z xz 5.2.5 h0b31af3_0 conda-forge 2020-04-28T09:07:01.4298480Z zipp 3.1.0 pypi_0 pypi 2020-04-28T09:07:01.4299460Z zlib 1.2.11 h0b31af3_1006 conda-forge 2020-04-28T09:07:01.4300500Z zstd 1.4.4 h4b3e974_3 conda-forge ```


Details about conda and system ( conda info ):

``` active environment : cpp-py-bindgen active env location : /usr/local/miniconda/envs/cpp-py-bindgen shell level : 1 user config file : /Users/runner/.condarc populated config files : /Users/runner/.condarc conda version : 4.8.2 conda-build version : not installed python version : 3.7.6.final.0 virtual packages : __osx=10.15.4 base environment : /usr/local/miniconda (writable) channel URLs : https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /usr/local/miniconda/pkgs /Users/runner/.conda/pkgs envs directories : /usr/local/miniconda/envs /Users/runner/.conda/envs platform : osx-64 user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Darwin/19.4.0 OSX/10.15.4 UID:GID : 501:20 netrc file : None offline mode : False # conda environments: # base /usr/local/miniconda cpp-py-bindgen * /usr/local/miniconda/envs/cpp-py-bindgen ```
adam-urbanczyk commented 4 years ago

Looks like #41 triggers this

looooo commented 4 years ago

Any ideas what went wrong? Does occt from cadquery builds with freeimage enabled?

adam-urbanczyk commented 4 years ago

No clue I'm afraid - I only uploaded your build no 5 version to keep my ci pipeline going.

frmdstryr commented 4 years ago

Can you try the more recent build h2fc2405_2 of freeimage?

The version listed above does not set the version properly https://anaconda.org/conda-forge/freeimage/3.18.0/download/osx-64/freeimage-3.18.0-h4a8c4bd_0.tar.bz2

$ otool -L Downloads/freeimage-3.18.0-h4a8c4bd_0/lib/libfreeimage.3.dylib 
Downloads/freeimage-3.18.0-h4a8c4bd_0/lib/libfreeimage.3.dylib:
    libfreeimage-3.18.0.dylib-x86_64 (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)

Edit: And the correct output of the new version

$ otool -L Downloads/freeimage-3.18.0-h2fc2405_2/lib/libfreeimage.dylib 
Downloads/freeimage-3.18.0-h2fc2405_2/lib/libfreeimage.dylib:
    @rpath/libfreeimage.3.dylib (compatibility version 3.0.0, current version 3.18.0)
    @rpath/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
    @rpath/libjpeg.9.dylib (compatibility version 13.0.0, current version 13.0.0)
    @rpath/libtiff.5.dylib (compatibility version 11.0.0, current version 11.0.0)
    @rpath/libpng16.16.dylib (compatibility version 54.0.0, current version 54.0.0)
    @rpath/libopenjp2.7.dylib (compatibility version 7.0.0, current version 2.3.1)
    @rpath/libwebpmux.3.dylib (compatibility version 4.0.0, current version 4.4.0)
    @rpath/libwebp.7.dylib (compatibility version 8.0.0, current version 8.4.0)
    @rpath/libjxrglue.0.dylib (compatibility version 0.0.0, current version 1.1.0)
    @rpath/libraw.19.dylib (compatibility version 20.0.0, current version 20.2.0)
    @rpath/libIlmImf.24.dylib (compatibility version 24.0.0, current version 24.0.0)
    @rpath/libIex.24.dylib (compatibility version 24.0.0, current version 24.0.0)
    @rpath/libHalf.24.dylib (compatibility version 24.0.0, current version 24.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
    @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
looooo commented 4 years ago

@frmdstryr should we set the failing freeimage package to broken? https://github.com/conda-forge/cf-mark-broken

adam-urbanczyk commented 4 years ago

@frmdstryr I can confirm that using newer freeimage is solving the issue. @looooo that sounds like a logical conclusion.

looooo commented 4 years ago

@frmdstryr btw.: freeimage seems to be gpl2/gpl3 licensed. I don't think we are allowed to distribute occt (lgpl) this way. Other occt versions on anaconda use freeimage plus So best to package freeimage-plus for conda-forge. And I guess we have to set the new occt-version to broken until we have changed to freeimage-plus.

looooo commented 3 years ago

regarding https://dev.opencascade.org/doc/occt-6.9.1/overview/html/index.html freeimage can be used with occt on condition of the FIPL license:

FreeImage is an Open Source library supporting popular graphics image formats, such as PNG, BMP, JPEG, TIFF, and others used by multimedia applications. This library is developed by Hervé Drolon and Floris van den Berg. FreeImage is easy to use, fast, multithreading safe, compatible with all 32-bit or 64-bit versions of Windows, and cross-platform (works both with Linux and Mac OS X). FreeImage is optionally used by OCCT to work with images, on conditions of the FreeImage Public License (FIPL) (http://freeimage.sourceforge.net/freeimage-license.txt).

I guess we can close this issue @adam-urbanczyk

adam-urbanczyk commented 3 years ago

LGTM