Compiling with Mac OS and Intel compiler leads to missing library warning

Issue #279 closed
Ian Hinder created an issue

When I compile Cactus with the Intel compiler on Mac OS I get the following warning at link time:

ld: warning: directory '/opt/intel/Compiler/11.1/084/bin/lib' following -L not found

I traced this to the known_architectures/darwin file which guesses the location of the library directory relative to the output of $(which ifort). I think now that newer compilers have 32 bit and 64 bit versions under different directories, the directory layout has changed and the guess is now wrong. The warning appears to be harmless, but it is annoying. The attached patch checks to see if the first guess directory exists, and if it doesn't, it looks one level higher up. On my system this guess is correct and the warning message is eliminated. I looked at the corresponding logic in the linux file but maybe the directory layout is different on Linux.

Keyword:

Comments (5)

  1. anonymous
    • removed comment

    This patch might cure the problem of the warning. However, it also produces a wrong (but existing) directory, at least on Linux, and I suspect also on mac (but since the directory exists, the warning is gone). Not only the ifort binary is one level deeper than usual, also the libraries are for the intel compiler. I attach a patch which takes that into account. Since linux actually had the same problem (but apparently didn't give a warning, the new patch changes both files. Please review.

  2. Frank Löffler
    • removed comment

    And just in case somebody would like to know who to blame for the second patch: I forgot to login...

  3. Log in to comment