Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake error when "-- Performing Test _LOGICAL_DEFAULT_KIND" during setup; missing ./cmake/Trial_sources directory under ./extern/fArgParse/extern/gFTL-shared/extern/gFTL #422

Open
agel1 opened this issue Apr 17, 2023 · 3 comments

Comments

@agel1
Copy link

agel1 commented Apr 17, 2023

Hi,
I recently cloned the git repository for pFUnit and followed the instructions to install it. I end up with the following error during cmake:

...
.....
-- Performing Test _LOGICAL_DEFAULT_KIND
CMake Error at /home/aike/Work/MFIX/ML-mfix/mfix-20.3.4_ml/ml_tools/thirdpartylibs/pFUnit.cloned/buildGNU/CMakeFiles/CMakeTmp/CMakeLists.txt:18 (add_executable):
Cannot find source file:

/home/aike/Work/MFIX/ML-mfix/mfix-20.3.4_ml/ml_tools/thirdpartylibs/pFUnit.cloned/extern/fArgParse/extern/gFTL-shared/extern/gFTL/**cmake/Trial_sources/LOGICAL_DEFAULT_KIND.F90**

CMake Error at /home/aike/Work/MFIX/ML-mfix/mfix-20.3.4_ml/ml_tools/thirdpartylibs/pFUnit.cloned/buildGNU/CMakeFiles/CMakeTmp/CMakeLists.txt:18 (add_executable):
No SOURCES given to target: cmTC_3d05e

CMake Error at extern/fArgParse/extern/gFTL-shared/extern/gFTL/cmake/CheckFortranSource.cmake:105 (try_run):
Failed to generate test project build system.
Call Stack (most recent call first):
cmake/CheckCompilerCapabilities.cmake:3 (CHECK_FORTRAN_SOURCE_RUN)
extern/fArgParse/extern/gFTL-shared/extern/gFTL/CMakeLists.txt:64 (include)

-- Configuring incomplete, errors occurred!

I checked the directory being referred and apparently there is no Trial_sources directory created leaving apart the file it is looking for (LOGICAL_DEFAULT_KIND.F90):
$ ls /home/aike/Work/MFIX/ML-mfix/mfix-20.3.4_ml/ml_tools/thirdpartylibs/pFUnit.cloned/extern/fArgParse/extern/gFTL-shared/extern/gFTL/cmake
CheckCompilerCapabilities.cmake GFTLConfig.cmake.in Intel.cmake PGI.cmake supportsInt64.F90
CheckFortranSource.cmake GFTL.mk.in NAG.cmake pointerToDeferredLengthString.F90 supportsQuadPrecision.F90
CheckFortranSourceCompiles.cmake GNU.cmake NVHPC.cmake pointerToFixedLengthString.F90

However, when I check if such files exists in the cloned repository, it seems to be there:
$ find . -name LOGICAL_DEFAULT_KIND.F90 -print
./extern/fArgParse/extern/gFTL-shared/cmake/trial_sources/LOGICAL_DEFAULT_KIND.F90
./cmake/Trial_sources/LOGICAL_DEFAULT_KIND.F90

So for some reason ./cmake/Trial_sources directory is not copied under ./extern/fArgParse/extern/gFTL-shared/extern/gFTL
Am I missing something while invoking cmake?
Any suggestions would be helpful and greatly appreciated.

Thanks

Aytek

@agel1 agel1 closed this as completed Apr 17, 2023
@agel1 agel1 reopened this Apr 17, 2023
@agel1
Copy link
Author

agel1 commented Apr 17, 2023

Please disregard the above as I think I found the issue to be due to a previous installation of pFUnit pointed through PFUNIT_DIR environment variable causing the above problem. So, I unset the environment variable for the new installation and the issue seems to be resolved.

@agel1 agel1 closed this as completed Apr 17, 2023
@agel1 agel1 reopened this Apr 17, 2023
@tclune
Copy link
Member

tclune commented Apr 17, 2023

We do occasionally see reports from users where existing installations of pFUnit (or any of its dependencies) send CMake into a weird direction. CMake is just "too good" at looking in other places. There are (semi-obscure) options that can prevent CMake from searching elsewhere. Let me know if you think you still have that issue and I can point you to those command line options.

@agel1
Copy link
Author

agel1 commented Apr 17, 2023

Thanks Tom for looking into this and for your quick response. Indeed, that is exactly what seems to be happening :) I just unset PFUNIT_DIR environment variable and started from a new cloned version from the repository. Now it seems to be ok and the compiled version passed the tests. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants