conda-forge / gemmi-feedstock

A conda-smithy repository for gemmi.
BSD 3-Clause "New" or "Revised" License
1 stars 5 forks source link

Enable the dynamic linked library in the package #65

Closed agrossfield closed 10 months ago

agrossfield commented 11 months ago

Solution to issue cannot be found in the documentation.

Issue

Related to Issue #57, as of now the package still only contains libgemmi.a and not libgemmi.so. In my hands, this breaks when I try to build my own conda-forge package (loos) on OS X, because the .a file isn't portable across compiler suites and the conda-forge runner uses a more recent compiler than you did to build it.

Someone commented in #57 that they're planning to turn on building the dynamic library by default and re-render the package. I'm just opening an issue to ensure it doesn't slip through the cracks.

Note: the conda list and conda info things aren't relevant, since the problem manifests in the GitHub build system too, which has a more minimal package list.

Installed packages

aoo-mozilla-en-dict-au    2022.08.01           h1a96a4e_0    conda-forge
aoo-mozilla-en-dict-ca    2022.08.01           h1a96a4e_0    conda-forge
aoo-mozilla-en-dict-gb    2022.08.01           h1a96a4e_0    conda-forge
aoo-mozilla-en-dict-us    2022.08.01           hd8ed1ab_0    conda-forge
aoo-mozilla-en-dict-za    2022.08.01           h1a96a4e_0    conda-forge
appnope                   0.1.3              pyhd8ed1ab_0    conda-forge
asttokens                 2.0.8              pyhd8ed1ab_0    conda-forge
atk-1.0                   2.36.0               he69c4ee_4    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
boost                     1.80.0          py311h349b758_2    conda-forge
boost-cpp                 1.80.0               h97e07a4_0    conda-forge
brotli                    1.0.9                hb7f2c08_8    conda-forge
brotli-bin                1.0.9                hb7f2c08_8    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
c-ares                    1.18.1               h0d85af4_0    conda-forge
c-compiler                1.5.1                hbf74d83_0    conda-forge
ca-certificates           2023.11.17           h8857fd0_0    conda-forge
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cairo                     1.16.0            h904041c_1014    conda-forge
cctools                   973.0.1             h76f1dac_10    conda-forge
cctools_osx-64            973.0.1             h2b95895_10    conda-forge
certifi                   2023.11.17         pyhd8ed1ab_0    conda-forge
clang                     14.0.4               h694c41f_0    conda-forge
clang-14                  14.0.4          default_h55ffa42_0    conda-forge
clang_osx-64              14.0.4               h3a95cd4_2    conda-forge
clangxx                   14.0.4          default_h55ffa42_0    conda-forge
clangxx_osx-64            14.0.4               he1dbc44_2    conda-forge
cmake                     3.24.2               h5291bba_0    conda-forge
compiler-rt               14.0.4               h7fcd477_0    conda-forge
compiler-rt_osx-64        14.0.4               h6df654d_0    conda-forge
compilers                 1.5.1                h694c41f_0    conda-forge
contourpy                 1.0.6           py311hd2070f0_0    conda-forge
curl                      7.88.1               h6df9250_1    conda-forge
cxx-compiler              1.5.1                hb8565cd_0    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
debugpy                   1.6.3           py311h814d153_1    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
doxygen                   1.9.5                h6ca31d6_0    conda-forge
eigen                     3.4.0                h940c156_0    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
executing                 1.1.1              pyhd8ed1ab_0    conda-forge
expat                     2.5.0                hf0c8a7f_0    conda-forge
flake8                    5.0.4              pyhd8ed1ab_0    conda-forge
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      3.000                h77eed37_0    conda-forge
font-ttf-source-code-pro  2.038                h77eed37_0    conda-forge
font-ttf-ubuntu           0.83                 hab24e00_0    conda-forge
fontconfig                2.14.1               h5bb23bf_0    conda-forge
fonts-conda-ecosystem     1                             0    conda-forge
fonts-conda-forge         1                             0    conda-forge
fonttools                 4.38.0          py311h5547dcb_1    conda-forge
fortran-compiler          1.5.1                haad3a49_0    conda-forge
freetype                  2.12.1               h3f81eb7_0    conda-forge
fribidi                   1.0.10               hbcb3906_0    conda-forge
gdk-pixbuf                2.42.8               h3648f77_1    conda-forge
gemmi                     0.6.3           py311h0c2eab9_1    conda-forge
gettext                   0.21.1               h8a4c099_0    conda-forge
gfortran                  11.3.0               h2c809b3_0    conda-forge
gfortran_impl_osx-64      11.3.0              h4c39eb8_25    conda-forge
gfortran_osx-64           11.3.0               h18f7dce_0    conda-forge
giflib                    5.2.1                hbcb3906_2    conda-forge
git                       2.38.1          pl5321he9137ab_0    conda-forge
gmp                       6.2.1                h2e338ed_0    conda-forge
graphite2                 1.3.13            h2e338ed_1001    conda-forge
graphviz                  6.0.1                ha8464fc_0    conda-forge
gtk2                      2.24.33              h7c1209e_2    conda-forge
gts                       0.7.6                hccb3bdf_2    conda-forge
h5py                      3.7.0           nompi_py311h777de7a_102    conda-forge
harfbuzz                  5.3.0                h08f8713_0    conda-forge
hdf4                      4.2.15               h0623a88_4    conda-forge
hdf5                      1.12.2          nompi_h48135f9_101    conda-forge
highfive                  2.6.2                h1b1687d_0    conda-forge
hunspell                  1.7.0             h2df5d5c_1001    conda-forge
hunspell-en               2022.08.01           h1a96a4e_0    conda-forge
icu                       70.1                 h96cf925_0    conda-forge
importlib-metadata        5.0.0              pyha770c72_1    conda-forge
ipykernel                 6.16.2             pyh736e0ef_0    conda-forge
ipython                   8.5.0              pyhd1c38e8_1    conda-forge
isl                       0.22.1               hb1e8313_2    conda-forge
jedi                      0.18.1             pyhd8ed1ab_2    conda-forge
joblib                    1.2.0              pyhd8ed1ab_0    conda-forge
jpeg                      9e                   hac89ed1_2    conda-forge
jupyter_client            7.4.4              pyhd8ed1ab_0    conda-forge
jupyter_core              4.11.1          py311h6eed73b_1    conda-forge
kiwisolver                1.4.4           py311hd2070f0_1    conda-forge
krb5                      1.20.1               h049b76e_0    conda-forge
lapack                    3.9.0                    netlib    conda-forge
lcms2                     2.14                 h90f4b2a_0    conda-forge
ld64                      609                 hc6ad406_10    conda-forge
ld64_osx-64               609                 h1e06c2b_10    conda-forge
lerc                      4.0.0                hb486fe8_0    conda-forge
libaec                    1.0.6                hf0c8a7f_1    conda-forge
libblas                   3.9.0           16_osx64_openblas    conda-forge
libbrotlicommon           1.0.9                hb7f2c08_8    conda-forge
libbrotlidec              1.0.9                hb7f2c08_8    conda-forge
libbrotlienc              1.0.9                hb7f2c08_8    conda-forge
libcblas                  3.9.0           16_osx64_openblas    conda-forge
libclang-cpp14            14.0.4          default_h55ffa42_0    conda-forge
libcurl                   7.88.1               h6df9250_1    conda-forge
libcxx                    16.0.6               hd57cbcb_0    conda-forge
libdeflate                1.14                 hb7f2c08_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libev                     4.33                 haf1e3a3_1    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgd                     2.3.3                h1e214de_3    conda-forge
libgfortran               5.0.0           10_4_0_h97931a8_25    conda-forge
libgfortran-devel_osx-64  11.3.0              h824d247_25    conda-forge
libgfortran5              11.3.0              h082f757_25    conda-forge
libglib                   2.74.1               h3ba3332_0    conda-forge
libiconv                  1.17                 hac89ed1_0    conda-forge
liblapack                 3.9.0           16_osx64_openblas    conda-forge
libllvm14                 14.0.4               h41df66c_0    conda-forge
libnetcdf                 4.8.1           nompi_hebd45d5_104    conda-forge
libnghttp2                1.52.0               he2ab024_0    conda-forge
libopenblas               0.3.21          openmp_h429af6e_3    conda-forge
libpng                    1.6.38               ha978bb4_0    conda-forge
librsvg                   2.54.4               h3d48ba6_0    conda-forge
libsodium                 1.0.18               hbcb3906_1    conda-forge
libsqlite                 3.39.4               ha978bb4_0    conda-forge
libssh2                   1.10.0               h47af595_3    conda-forge
libtiff                   4.4.0                hdb44e8a_4    conda-forge
libtool                   2.4.6             he49afe7_1008    conda-forge
libuv                     1.44.2               hac89ed1_0    conda-forge
libwebp                   1.2.4                hfa4350a_0    conda-forge
libwebp-base              1.2.4                h775f41a_0    conda-forge
libxcb                    1.13              h0d85af4_1004    conda-forge
libxml2                   2.10.3               hb9e07b5_0    conda-forge
libzip                    1.9.2                h6db710c_1    conda-forge
libzlib                   1.2.13               hfd90126_4    conda-forge
llvm-openmp               14.0.4               ha654fa7_0    conda-forge
llvm-tools                14.0.4               h41df66c_0    conda-forge
loos                      4.0.4                    pypi_0    pypi
matplotlib                3.6.2           py311h6eed73b_0    conda-forge
matplotlib-base           3.6.2           py311h2bf763f_0    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0    conda-forge
mccabe                    0.7.0              pyhd8ed1ab_0    conda-forge
mpc                       1.2.1                hbb51d92_0    conda-forge
mpfr                      4.1.0                h0f52abe_1    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
ncurses                   6.3                  h96cf925_1    conda-forge
nest-asyncio              1.5.6              pyhd8ed1ab_0    conda-forge
ninja                     1.11.0               h1b54a9f_0    conda-forge
numpy                     1.23.4          py311h62c7003_1    conda-forge
openblas                  0.3.21          openmp_hbefa662_3    conda-forge
openjpeg                  2.5.0                h5d0d7b0_1    conda-forge
openssl                   3.2.0                hd75f5a5_1    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pango                     1.50.11              h7fca291_0    conda-forge
parso                     0.8.3              pyhd8ed1ab_0    conda-forge
pcre2                     10.37                h3f55489_1    conda-forge
perl                      5.32.1          2_h0d85af4_perl5    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.2.0           py311he7df5c9_3    conda-forge
pip                       22.3               pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               hbcb3906_0    conda-forge
prompt-toolkit            3.0.31             pyha770c72_0    conda-forge
psutil                    5.9.3           py311h5547dcb_1    conda-forge
pthread-stubs             0.4               hc929b4f_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pure_eval                 0.2.2              pyhd8ed1ab_0    conda-forge
pycodestyle               2.9.1              pyhd8ed1ab_0    conda-forge
pyflakes                  2.5.0              pyhd8ed1ab_0    conda-forge
pygments                  2.13.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
python                    3.11.0          h559f36b_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.11                    2_cp311    conda-forge
pyzmq                     24.0.1          py311habfacb3_1    conda-forge
readline                  8.1.2                h3899abd_0    conda-forge
rhash                     1.4.3                hac89ed1_0    conda-forge
scikit-learn              1.1.3           py311h087fafe_1    conda-forge
scipy                     1.9.3           py311h939689b_1    conda-forge
setuptools                65.5.0             pyhd8ed1ab_0    conda-forge
sigtool                   0.1.3                h88f4db0_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
stack_data                0.5.1              pyhd8ed1ab_0    conda-forge
swig                      4.1.0                haad75c5_3    conda-forge
tapi                      1100.0.11            h9ce4665_0    conda-forge
threadpoolctl             3.1.0              pyh8a188c0_0    conda-forge
tk                        8.6.12               h5dbffcc_0    conda-forge
tornado                   6.2             py311h5547dcb_1    conda-forge
traitlets                 5.5.0              pyhd8ed1ab_0    conda-forge
tzdata                    2022e                h191b570_0    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.9                h35c211d_0    conda-forge
xorg-libxdmcp             1.1.3                h35c211d_0    conda-forge
xz                        5.2.6                h775f41a_0    conda-forge
zeromq                    4.3.4                he49afe7_1    conda-forge
zipp                      3.10.0             pyhd8ed1ab_0    conda-forge
zlib                      1.2.13               hfd90126_4    conda-forge
zstd                      1.5.2                hfa58983_4    conda-forge

Environment info

active environment : loos
    active env location : /Users/agrossfield/miniconda3/envs/loos
            shell level : 1
       user config file : /Users/agrossfield/.condarc
 populated config files : /Users/agrossfield/.condarc
          conda version : 22.9.0
    conda-build version : not installed
         python version : 3.9.13.final.0
       virtual packages : __osx=13.6.1=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /Users/agrossfield/miniconda3  (writable)
      conda av data dir : /Users/agrossfield/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          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 : /Users/agrossfield/miniconda3/pkgs
                          /Users/agrossfield/.conda/pkgs
       envs directories : /Users/agrossfield/miniconda3/envs
                          /Users/agrossfield/.conda/envs
               platform : osx-64
             user-agent : conda/22.9.0 requests/2.28.1 CPython/3.9.13 Darwin/22.6.0 OSX/13.6.1
                UID:GID : 1326343926:617926151
             netrc file : None
           offline mode : False
agrossfield commented 10 months ago

Bumping this. As far as I can tell, it's a 2-line change. Change recipe/build.sh to contain

cmake ${CMAKE_ARGS} \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_INSTALL_PREFIX=$PREFIX \
    -D CMAKE_PREFIX_PATH=$PREFIX \
    -D Python_EXECUTABLE=$PYTHON \
    -D USE_PYTHON=ON \
    -D CMAKE_CXX_VISIBILITY_PRESET=hidden \
    -D CMAKE_VISIBILITY_INLINES_HIDDEN=ON \
    -D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
    -D BUILD_SHARED_LIBS=ON
    .

(the BUILD_SHARED_LIBS line is the new one).

Then, do the same thing to recipe/bld.bat (insert after line 8).

wojdyr commented 10 months ago

I just pushed v0.6.4 https://github.com/conda-forge/gemmi-feedstock/pull/66