conda-forge / openmpi-feedstock

A conda-smithy repository for openmpi.
BSD 3-Clause "New" or "Revised" License
9 stars 22 forks source link

Provided package config files are non portable due to `conda-bld` paths #136

Closed robertmaynard closed 6 months ago

robertmaynard commented 6 months ago

Solution to issue cannot be found in the documentation.

Issue

The provided package config files in lib/pkgconfig/ have build env absolute paths encoded causing the output to be non portable.

ompi.pc

# Copyright (c) 2010 Cisco Systems, Inc.  All rights reserved.
# Copyright (c) 2016      IBM Corporation.  All rights reserved.
#
Name: Open MPI
Description: Portable high-performance MPI implementation
Version: 4.1.6
URL: http://www.open-mpi.org/
#
prefix=/Users/runner/miniforge3/conda-bld/openmpi-mpi_1696591847237/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
pkgincludedir=${includedir}/openmpi
#
# Note that -lopen-pal and all the EXTRA_LIBS are only necessary when
# static linking (they're pulled in by libopen-rte.so's implicit
# dependencies), so only list these in Libs.private.
#
Libs: -L${libdir}   -L/Users/runner/miniforge3/conda-bld/openmpi-mpi_1696591847237/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib -Wl,-rpath,/Users/runner/miniforge3/conda-bld/openmpi-mpi_1696591847237/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib -lmpi
Libs.private: -lm  -lz
#
Cflags: -I${includedir}      -I/Users/runner/miniforge3/conda-bld/openmpi-mpi_1696591847237/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/include

Installed packages

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
binutils                  2.40                 hdd6e379_0    conda-forge
binutils_impl_linux-64    2.40                 hf600244_0    conda-forge
binutils_linux-64         2.40                 hbdbef99_2    conda-forge
bzip2                     1.0.8                hd590300_5    conda-forge
c-ares                    1.24.0               hd590300_0    conda-forge
c-compiler                1.7.0                hd590300_0    conda-forge
ca-certificates           2023.11.17           hbcca054_0    conda-forge
cmake                     3.28.1               hcfe8598_0    conda-forge
cxx-compiler              1.7.0                h00ab1b0_0    conda-forge
gcc                       12.3.0               h8d2909c_2    conda-forge
gcc_impl_linux-64         12.3.0               he2b93b0_3    conda-forge
gcc_linux-64              12.3.0               h76fc315_2    conda-forge
gxx                       12.3.0               h8d2909c_2    conda-forge
gxx_impl_linux-64         12.3.0               he2b93b0_3    conda-forge
gxx_linux-64              12.3.0               h8a814eb_2    conda-forge
icu                       73.2                 h59595ed_0    conda-forge
kernel-headers_linux-64   2.6.32              he073ed8_16    conda-forge
keyutils                  1.6.1                h166bdaf_0    conda-forge
krb5                      1.21.2               h659d440_0    conda-forge
ld_impl_linux-64          2.40                 h41732ed_0    conda-forge
libcurl                   8.5.0                hca28451_0    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 hd590300_2    conda-forge
libevent                  2.1.12               hf998b51_1    conda-forge
libexpat                  2.5.0                hcb278e6_1    conda-forge
libgcc-devel_linux-64     12.3.0             h8bca6fd_103    conda-forge
libgcc-ng                 13.2.0               h807b86a_3    conda-forge
libgfortran-ng            13.2.0               h69a702a_3    conda-forge
libgfortran5              13.2.0               ha4646dd_3    conda-forge
libgomp                   13.2.0               h807b86a_3    conda-forge
libhwloc                  2.9.3           default_h554bfaf_1009    conda-forge
libiconv                  1.17                 hd590300_2    conda-forge
libnghttp2                1.58.0               h47da74e_1    conda-forge
libnl                     3.9.0                hd590300_0    conda-forge
libsanitizer              12.3.0               h0f45ef3_3    conda-forge
libssh2                   1.11.0               h0841786_0    conda-forge
libstdcxx-devel_linux-64  12.3.0             h8bca6fd_103    conda-forge
libstdcxx-ng              13.2.0               h7e041cc_3    conda-forge
libuv                     1.46.0               hd590300_0    conda-forge
libxml2                   2.11.6               h232c23b_0    conda-forge
libzlib                   1.2.13               hd590300_5    conda-forge
mpi                       1.0                     openmpi    conda-forge
ncurses                   6.4                  h59595ed_2    conda-forge
openmpi                   5.0.1              hb0ee255_100    conda-forge
openssl                   3.2.0                hd590300_1    conda-forge
rhash                     1.4.4                hd590300_0    conda-forge
sysroot_linux-64          2.12                he073ed8_16    conda-forge
xz                        5.2.6                h166bdaf_0    conda-forge
zstd                      1.5.5                hfc55251_0    conda-forge

Environment info

active environment : openmpi_test
    active env location : /home/rmaynard/miniconda3/envs/openmpi_test
            shell level : 1
       user config file : /home/rmaynard/.condarc
 populated config files : /home/rmaynard/.condarc
          conda version : 23.9.0
    conda-build version : 3.27.0
         python version : 3.11.4.final.0
       virtual packages : __archspec=1=x86_64
                          __cuda=12.0=0
                          __glibc=2.31=0
                          __linux=5.4.0=0
                          __unix=0=0
       base environment : /home/rmaynard/miniconda3  (writable)
      conda av data dir : /home/rmaynard/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/rmaynard/miniconda3/pkgs
                          /home/rmaynard/.conda/pkgs
       envs directories : /home/rmaynard/miniconda3/envs
                          /home/rmaynard/.conda/envs
               platform : linux-64
             user-agent : conda/23.9.0 requests/2.31.0 CPython/3.11.4 Linux/5.4.0-169-generic ubuntu/20.04.6 glibc/2.31 solver/libmamba conda-libmamba-solver/23.7.0 libmambapy/1.4.1
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
robertmaynard commented 6 months ago

Closing. The issue was on my side by manually installing the openmpi package instead of using conda install and so I was getting the untransformed paths