Hello,
I am relatively new to linux, fortran, c and cmake so excuse me if this query has a simple solution.
I am trying to build PLplot from source using Intel Compilers (ifort and icc - both version 17.0.1). I have added both to the .bashrc script making them the default compilers.
The exact sequence of commands I used for the install are:
The cmake compiles successfully. But the make (command #7) runs into the following error:
[ 77%] Linking C executable test-drv-info
ld: warning: libimf.so, needed by ../src/libplplot.so.14.0.0 not found
ld: warning: libsvml.so, needed by ../src/libplplot.so.14.0.0 not found
ld: warning: libirng.so, needed by ../src/libplplot.so.14.0.0 not found
ld: warning: libintlc.so.5, needed by ../src/libplplot.so.14.0.0 not found
ld: test-drv-info: hidden symbol __intel_cpu_feature_indicator_x
in <path_to_libirc.a(cpu_feature.disp.o) is referenced by DSO
ld: final link failed: Bad value
Are there any stages in the build that I am missing?
P.S. The build sequence works with gcc and gfortran as the default compilers. The c examples compile perfectly with gcc and icc, the f95 examples compile perfectly with gfortran. However, they do not compile with ifort and display an error "The module was not built with any version of this compiler". If someone could also clarify why icc works but ifort does not?
The only quibble I have with your cmake options is you did not specify
-DBUILD_TEST=ON (which allows you to build and test all our standard
examples in the build tree).
With regard to the build issue you found with the Intel compiler on
Linux, we do have positive experience with that compiler on Windows,
but we have no experience with it on Linux. But my understanding is
it should "just work" on both platforms.
Therefore, to find out more about the build issue you encountered, I
did a google search using the search terms <"ld: warning: libimf" "not
found"> and got lots of hits. So you are not alone. The general
advice (e.g.,
https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/271188)
to deal with such issues is to set up your ifort environment
correctly. For example, there was a suggestion at that site to source
ifortvars. I assume that is a file that sets some key environment
variables appropriately for the ifort compiler on Linux.
After setting up ifort correctly (as far as you know), I suggest you
initially test it with a much simpler project than PLplot, namely the
project we have created in cmake/test_fortran. See
cmake/test_fortran/README for the description of that project. If
that simple "hello world" project fails to compile with ifort it is
much easier to debug than the full PLplot project.