Hi Jeremy,

My apologies for not reacting sooner (me being one of the maintainers of 
PLplot), but at the very least you were able to solve your problem yourself. 
Could you specify the problems you met with the Intel oneAPI ifx compiler? 
Intel intends to phase out the classic one at some point in the near future and 
I was not aware of any problems it might cause. I have not seen any issues with 
other CMake-enabled builds for Fortran programs. As far as I know CMake picks 
the classic ifort compiler by default.

Regards,

Arjen

From: Jeremy Nesbitt <jrnesb...@gmail.com>
Sent: Saturday, August 19, 2023 3:30 AM
To: plplot-devel@lists.sourceforge.net
Subject: Re: [Plplot-devel] Building plplot in Windows with Intel Fortran 
Compiler

Caution: This message was sent from outside of Deltares. Please do not click 
links or open attachments unless you recognize the source of this email and 
know the content is safe. Please report all suspicious emails to 
"servicedesk-...@deltares.nl<mailto:servicedesk-...@deltares.nl>" as an 
attachment.

Hi,

I had some time today and figured out the issue.  CMake found the Intel IFX 
compiler first and it seemed to cause confusion about what type of compiler was 
actually being used.  I worked around this by simply using set FC=ifort and 
re-running CMake.  Was able to get everything I wanted built and tested using 
the command line tools.

I'm guessing this is not a common use case, but if it happens to others it 
might be worth updating the CMake files to handle both the Fortran compilers 
that are installed from the Intel OneAPI tools.

Thanks,
Jeremy



On Thu, Aug 17, 2023 at 9:10 AM Jeremy Nesbitt 
<jrnesb...@gmail.com<mailto:jrnesb...@gmail.com>> wrote:
Hi,

I would like to get plplot built in windows with intel fortran bindings using 
the Visual Studio command line.  I can get build files generated via CMake if I 
turn off fortran bindings, but if I enable fortran I always get an error when 
running CMake.  I have tried NMake, Ninja, and Visual Studio 2022 generator 
files.

In initial troubleshooting to see if this is a more general problem, I came 
across this note on the plplot site:


Intel Fortran
If you use Intel Fortran, the solution/project files may cause errors when 
building. These affect only the Fortran libraries and examples. It is due to a 
small bug in CMake that should be fixed with the next release.

Was wondering if anyone had any more information on this, such as what bug it 
is, what version of CMake it might be fixed in, and whether there is a 
workaround?  I don't know CMake at all, but if I know there is some hope to get 
tthis working I can give it a shot.

Some details if anyone cares:
-I am using CMake 3.26-msvc

For NMake, used this command
cmake .. -G "NMake Makefiles" -DBUILD_TEST=ON -DBUILD_SHARED_LIBS=ON 
-DPKG_CONFIG_EXECUTABLE=C:\gtk-build\gtk\x64\release\bin\pkg-config.exe 
-DCMAKE_INSTALL_PREFIX=C:\usr\lib\plplot -DENABLE_fortran=ON

Error I get at end
-- Configuring done (29.4s)
CMake Error at cmake/modules/plplot_functions.cmake:577 (add_library):
  Cannot find source file:

    plplotfortran.def

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc
Call Stack (most recent call first):
  bindings/fortran/CMakeLists.txt:172 (configure_library_build)


CMake Error at cmake/modules/plplot_functions.cmake:577 (add_library):
  No SOURCES given to target: plplotfortran
Call Stack (most recent call first):
  bindings/fortran/CMakeLists.txt:172 (configure_library_build)


CMake Generate step failed.  Build files cannot be regenerated correctly.

___

What I use for Visual Studio IDE
cmake .. -G "Visual Studio 17 2022" -Ax64 -DBUILD_TEST=ON 
-DBUILD_SHARED_LIBS=ON 
-DPKG_CONFIG_EXECUTABLE=C:\gtk-build\gtk\x64\release\bin\pkg-config.exe 
-DCMAKE_INSTALL_PREFIX=C:\usr\lib\plplot -DENABLE_fortran=ON

Error I get (Truncated as it repeats several times at the end)
-- Configuring done (201.6s)
CMake Error in bindings/fortran/CMakeLists.txt:
  Evaluation file to be written multiple times with different content.  This
  is generally caused by the content evaluating the configuration type,
  language, or location of object files:

   
C:/PLplot/build/bindings/fortran/plplotfortran_ifort.def.sh<http://plplotfortran_ifort.def.sh/>


CMake Error in bindings/fortran/CMakeLists.txt:
  Evaluation file to be written multiple times with different content.  This
  is generally caused by the content evaluating the configuration type,
  language, or location of object files:

   
C:/PLplot/build/bindings/fortran/plplotfortran_ifort.def.sh<http://plplotfortran_ifort.def.sh/>

Thanks,
Jeremy
DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to