Open Bayu-Risanto opened 1 year ago
Please post the full output of cmake and make.
Here are the files I found in the cmake directory - I copied them into txt files. FindNetCDF.cmake.txt PackageConfig.cmake.in.txt
And here is the Makefile from the top directory -- I copied it into a txt file Makefile.txt
Here is the Makefile2 from the CMakeFiles directory -- I copied it into a txt file Makefile2.txt
Thank you.
What I need you to do is try to do the build, and then cut and paste the screen which will include both the commands you used, and the output you got back.
For example, here's how it works for me:
ed@koko:~/NCEPLIBS-wrf_io$ mkdir build
ed@koko:~/NCEPLIBS-wrf_io$ cd build
ed@koko:~/NCEPLIBS-wrf_io/build$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/wrf_io .. && make && sudo make install
-- The C compiler identification is GNU 9.4.0
-- The Fortran compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Setting build type to 'Release' as none was specified.
-- Found NetCDF: /usr/include (found version "4.7.3") found components: Fortran
-- FindNetCDF defines targets:
-- - NetCDF_VERSION [4.7.3]
-- - NetCDF_PARALLEL [FALSE]
-- - NetCDF_C_CONFIG_EXECUTABLE [/usr/bin/nc-config]
-- - NetCDF::NetCDF_C [SHARED] [Root: /usr] Lib: /usr/lib/x86_64-linux-gnu/libnetcdf.so
-- - NetCDF_Fortran_CONFIG_EXECUTABLE [/usr/bin/nf-config]
-- - NetCDF::NetCDF_Fortran [SHARED] [Root: /usr] Lib: /usr/lib/x86_64-linux-gnu/libnetcdff.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ed/NCEPLIBS-wrf_io/build
[ 14%] Building Fortran object src/CMakeFiles/wrf_io.dir/module_driver_constants.F90.o
[ 28%] Building Fortran object src/CMakeFiles/wrf_io.dir/module_machine.F90.o
[ 42%] Building Fortran object src/CMakeFiles/wrf_io.dir/wrf_io.f90.o
/home/ed/NCEPLIBS-wrf_io/src/wrf_io.f90:1427:36:
1427 | CALL ext_ncd_open_for_read_begin( DatasetName, Comm1, Comm2, SysDepInfo, DataHandle, Status )
| 1
Warning: Dummy argument ‘datasetname’ with INTENT(IN) in variable definition context (actual argument to INTENT = OUT/INOUT) at (1)
/home/ed/NCEPLIBS-wrf_io/src/wrf_io.f90:7285:71:
7285 | ,i1,i2,j1,j2,k1,k2 )
| 1
Warning: Type mismatch in argument ‘field’ at (1); passed INTEGER(4) to REAL(8) [-Wargument-mismatch]
[ 57%] Building Fortran object src/CMakeFiles/wrf_io.dir/field_routines.F90.o
[ 71%] Building Fortran object src/CMakeFiles/wrf_io.dir/io_int_stubs.f90.o
[ 85%] Building C object src/CMakeFiles/wrf_io.dir/pack_utils.c.o
[100%] Linking Fortran static library libwrf_io.a
[100%] Built target wrf_io
[sudo] password for ed:
[100%] Built target wrf_io
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/wrf_io/include
-- Installing: /usr/local/wrf_io/include/module_driver_constants.mod
-- Installing: /usr/local/wrf_io/include/ext_ncd_support_routines.mod
-- Installing: /usr/local/wrf_io/include/module_machine.mod
-- Installing: /usr/local/wrf_io/include/wrf_data.mod
-- Installing: /usr/local/wrf_io/include/module_message.mod
-- Installing: /usr/local/wrf_io/lib/libwrf_io.a
-- Installing: /usr/local/wrf_io/lib/cmake/wrf_io/wrf_io-config.cmake
-- Installing: /usr/local/wrf_io/lib/cmake/wrf_io/wrf_io-config-version.cmake
-- Installing: /usr/local/wrf_io/lib/cmake/wrf_io/wrf_io-targets.cmake
-- Installing: /usr/local/wrf_io/lib/cmake/wrf_io/wrf_io-targets-release.cmake
ed@koko:~/NCEPLIBS-wrf_io/build$
Here is what I got.
[bayu@stratus build]$ cmake -DCMAKE_INSTALL_PREFIX=/st6/bayu/opt .. && make && sudo make install -- Found NetCDF: /st6/bayu/opt/include (found version "4.8.1") found components: Fortran -- FindNetCDF defines targets: -- - NetCDF_VERSION [4.8.1] -- - NetCDF_PARALLEL [FALSE] -- - NetCDF_C_CONFIG_EXECUTABLE [/st6/bayu/opt/bin/nc-config] -- - NetCDF::NetCDF_C [SHARED] [Root: /st6/bayu/opt] Lib: /st6/bayu/opt/lib/libnetcdf.so -- - NetCDF_Fortran_CONFIG_EXECUTABLE [/st6/bayu/opt/bin/nf-config] -- - NetCDF::NetCDF_Fortran [SHARED] [Root: /st6/bayu/opt] Lib: /st6/bayu/opt/lib/libnetcdff.so -- Configuring done -- Generating done -- Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0 make: *** No targets specified and no makefile found. Stop.
Your output says:
Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0
But that is not the directory you indicate you are in:
[bayu@stratus build]$ cmake -DCMAKE_INSTALL_PREFIX=/st6/bayu/opt .. && make && sudo make install
What directory are you in when you issue the cmake command?
I issued the cmake command in this directory /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0/build
Are you sure?
Mine says: Build files have been written to: /home/ed/NCEPLIBS-wrf_io/build
Yours says: Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0
Where's the /build?
I am sure it is in /build. I typed pwd
command and it shows that the cmake command is issued in /build. Here is what I did:
[bayu@stratus build]$ pwd /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0/build [bayu@stratus build]$ cmake -DCMAKE_INSTALL_PREFIX=/st6/bayu/opt .. && make && sudo make install -- Found NetCDF: /st6/bayu/opt/include (found version "4.8.1") found components: Fortran -- FindNetCDF defines targets: -- - NetCDF_VERSION [4.8.1] -- - NetCDF_PARALLEL [FALSE] -- - NetCDF_C_CONFIG_EXECUTABLE [/st6/bayu/opt/bin/nc-config] -- - NetCDF::NetCDF_C [SHARED] [Root: /st6/bayu/opt] Lib: /st6/bayu/opt/lib/libnetcdf.so -- - NetCDF_Fortran_CONFIG_EXECUTABLE [/st6/bayu/opt/bin/nf-config] -- - NetCDF::NetCDF_Fortran [SHARED] [Root: /st6/bayu/opt] Lib: /st6/bayu/opt/lib/libnetcdff.so -- Configuring done -- Generating done -- Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0 make: *** No targets specified and no makefile found. Stop. [bayu@stratus build]$
Sorry I was stumped at the time but rereading this, could it be that your build directory is not a subdirectory of /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0?
Hello. I am trying to install nceplibs-wrf_io on our linux machine. Following the "build" instruction, I have done
cmake -DCMAKE_INSTALL_PREFIX=/st6/bayu/opt ..
. Then it prompted.-- Build files have been written to: /st6/bayu/opt/NCEPLIBS-wrf_io-1.2.0
. Then to install it, I triedmake
but it generated errormake: *** No targets specified and no makefile found. Stop.
Could you please advise me on how to install the package in our library?