1

I am trying to build a environment.yml file to make gathering all the dependencies for a project that is written in Python, C, and Fortran easier. One of the dependencies for the Fortran part of the code is the FFTW library, specifically the fftw3f portion of the library (single precision float, version 3+?). I have tried to install it through several different channels on Anaconda cloud, specifically the Omnia channel and conda-forge. However when I try to link the library with gfortran like gfortran -o output_name input_names -lfftw3f, I receive the following error I am not sure how to fix:

/opt/anaconda3/envs/env_name/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lfftw3f collect2: error: ld returned 1 exit status

I do no believe this file path is even valid, but I know the library is being installed because I can view it with conda list. However I am completely stuck with how to approach this problem. I believe there is a mismatch with where conda is installing the package and where gfortran thinks it is? Or perhaps I am not installing the right package?

Any help would be greatly appreciated!

merv
  • 67,214
  • 13
  • 180
  • 245
J. Auon
  • 189
  • 2
  • 12
  • 1
    The linker doesn't know by default how to find libraries that are in your Conda env. A nice trick is to set `LD_LIBRARY_PATH` to include the active env's `/lib` dir whenever you activate the env, as suggested in this possible duplicate of [Conda set LD\_LIBRARY\_PATH for env only](https://stackoverflow.com/questions/46826497/conda-set-ld-library-path-for-env-only). – merv Sep 18 '19 at 22:12

0 Answers0