Compilation error in Fedora-25: gfortran: error: unrecognized command line. - Forum - Delft3D
Forum
- Home
- 3. Archive
- General
- Compilation on Linux
- Compilation error in Fedora-25: gfortran: error: unrecognized command line.
Compilation error in Fedora-25: gfortran: error: unrecognized command line.
Compilation error in Fedora-25: gfortran: error: unrecognized command line.
Youngling Posts: 6 Join Date: 7/27/18 Recent PostsHi, I am trying to compile delft3d in fedora-25 by following the steps of ubuntu installaions.
I ran $ ./autogen.sh
./Configure
...................
checking for MPI_Init in -lmpichf90... no
checking for MPI_Init
in -lmpi... (cached) no
checking for MPI_Init in -lmpich...
(cached) no
gfortran: error: unrecognized command line option
'-showme:link'; did you mean '--force-link'?
gfortran: fatal
error: no input files
compilation terminated.
configure: creating
./config.lt
config.lt: creating libtool
checking for the
extension of Delft3D plugins... .so
checking that generated
files are newer than configure... done
configure: creating
./config.status
config.status: creating Makefile
config.status: creating engines_gpl/d_hydro/Makefile
config.status: creating
engines_gpl/d_hydro/packages/d_hydro/Makefile
...............................................................................................................
config.status: creating utils_lgpl/ods/Makefile
config.status:
creating utils_lgpl/ods/packages/Makefile
config.status:
creating utils_lgpl/ods/packages/ods/Makefile
config.status:
creating utils_lgpl/ods/packages/ods/srcf/Makefile
config.status: creating utils_lgpl/ods/packages/ods/src/Makefile
config.status: creating config.h
config.status: config.h is
unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
<<<end of configure>>>
then i ran
Make
libtool: compile: gfortran -DHAVE_CONFIG_H -I. -I../../../../..
-I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src
-I/include -DWITH_DELFTONLINE -O2 -ffree-line-length-none -cpp -c
io_netcdf_version.F90 -fPIC -o .libs/io_netcdf_version.o
f951:
Warning: Nonexistent include directory ‘/include’
[-Wmissing-include-dirs]
libtool: compile: gfortran
-DHAVE_CONFIG_H -I. -I../../../../..
-I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src
-I/include -DWITH_DELFTONLINE -O2 -ffree-line-length-none -cpp -c
io_netcdf_version.F90 -o io_netcdf_version.o >/dev/null
2>&1
/bin/sh ../../../../../libtool --tag=FC
--mode=compile gfortran -DHAVE_CONFIG_H -I. -I../../../../..
-I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src
-I/include -DWITH_DELFTONLINE -O2 -ffree-line-length-none -cpp -c
-o netcdf_utils.lo netcdf_utils.F90
libtool: compile: gfortran
-DHAVE_CONFIG_H -I. -I../../../../..
-I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src
-I/include -DWITH_DELFTONLINE -O2 -ffree-line-length-none -cpp -c
netcdf_utils.F90 -fPIC -o .libs/netcdf_utils.o
f951: Warning: Nonexistent include directory ‘/include’
[-Wmissing-include-dirs]
netcdf_utils.F90:33:4:
use netcdf^M
1
Fatal Error: Can't open
module file ‘netcdf.mod’ for reading at (1): No such file or
directory
compilation terminated.
Makefile:537: recipe for target 'netcdf_utils.lo' failed
make[5]: *** [netcdf_utils.lo] Error 1
make[5]: Leaving
directory
'/home/Elahi/delft3d_repository/src/utils_lgpl/io_netcdf/packages/io_netcdf/src'
Makefile:488: recipe for target 'install-recursive' failed
make[4]: *** [install-recursive] Error 1
make[4]: Leaving
directory
'/home/Elahi/delft3d_repository/src/utils_lgpl/io_netcdf/packages/io_netcdf'
Makefile:488: recipe for target 'install-recursive' failed
make[3]: *** [install-recursive] Error 1
make[3]: Leaving
directory
'/home/Elahi/delft3d_repository/src/utils_lgpl/io_netcdf/packages'
Makefile:488: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving
directory
'/home/Elahi/delft3d_repository/src/utils_lgpl/io_netcdf'
Makefile:498: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving
directory '/home/Elahi/delft3d_repository/src/utils_lgpl'
Makefile:548: recipe for target 'install-recursive' failed
make:
*** [install-recursive] Error 1
<<<end of configure>>>
Please help me out. How to solve these issues?
Any help would be highly appreciated.
Wasif
Attachments:
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Youngling Posts: 6 Join Date: 7/27/18 Recent PostsAfter following all the steps of "build_ubuntu.16.04LT.readme", above errors are solved. However, now I am getting new errors related to uuid library. uuid package is already installed, but don't know why make cannot find -luuid. Errors are given below:
..................................................................
../../../../../engines_gpl/part/packages/utils_f/src/.libs/libutils_f.a
../../../../../engines_gpl/part/packages/kernel_f/src/.libs/libkernel_f.a
../../../../../engines_gpl/part/packages/io_f/src/.libs/libio_f.a
../../../../../engines_gpl/part/packages/data_f/src/.libs/libdata_f.a
-lpthread -luuid -ldl -lrt -lexpat -lstdc++ -pthread -fopenmp
-Wl,-rpath -Wl,/home/Elahi/delft3d_repository/src/lib -Wl,-rpath
-Wl,/home/Elahi/Downloads/libraries/netcdf_4.4/lib -Wl,-rpath -Wl,/home/Elahi/Downloads/libraries/hdf5-1.8.13/lib
/usr/bin/ld: cannot find -luuid (* but uuid
package is there in same directory)
collect2: error: ld returned 1 exit status
Makefile:631:
recipe for target 'delwaq1' failed
make[6]: *** [delwaq1] Error
1
make[6]: Leaving directory
'/home/Elahi/delft3d_repository/src/engines_gpl/waq/packages/delwaq1/src'
Makefile:755: recipe for target 'install' failed
make[5]: ***
[install] Error 2
make[5]: Leaving directory
'/home/Elahi/delft3d_repository/src/engines_gpl/waq/packages/delwaq1/src'
Makefile:488: recipe for target 'install-recursive' failed
make[4]: *** [install-recursive] Error 1
make[4]: Leaving
directory
'/home/Elahi/delft3d_repository/src/engines_gpl/waq/packages/delwaq1'
Makefile:496: recipe for target 'install-recursive' failed
make[3]: *** [install-recursive] Error 1
make[3]: Leaving
directory
'/home/Elahi/delft3d_repository/src/engines_gpl/waq/packages'
Makefile:488: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving
directory '/home/Elahi/delft3d_repository/src/engines_gpl/waq'
Makefile:493: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving
directory '/home/Elahi/delft3d_repository/src/engines_gpl'
Makefile:548: recipe for target 'install-recursive' failed
make:
*** [install-recursive] Error 1
<<<end>>>>
I have attached the log files. I have been trying to compile for a long time. Now I am getting frustrated and losing hope. Any kind of help or suggestion will be highly appreciated.
Attachments:
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Padawan Posts: 97 Join Date: 1/3/11 Recent PostsHi Wasif,
Yes, compiling on Linux can really be a pain. The good news is that once you have it compiling, the process is very stable. And you are already quite far.
The error "cannot find -luuid" is caused because the package "uuid-dev" is not installed on your machine, see the prerequisites.
Regards,
Adri
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Youngling Posts: 6 Join Date: 7/27/18 Recent PostsHi Adri,
Thank you for your response. I am still struggling with the same issue. uuid-dev is already installed in the same directory "/usr/bin/", . Am I missing something? should I change any directory for uuid-dev anywhere? Please help me out.
Kind regards,
Wasif
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Padawan Posts: 97 Join Date: 1/3/11 Recent PostsHi Wasif,
When uuid-dev is installed in the normal way, then the library "libuuid.so.1" is located in directory "/lib64". Can you check that?
Automake should add directory "/lib64" to the search paths when looking for libraries. It's difficult to find out why that goes wrong on your system.
Can you try the following: Before compiling, execute the following command:
export LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH
Regards,
Adri
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Youngling Posts: 6 Join Date: 7/27/18 Recent PostsHi Adri,
Thanks for your qucik response. I checked the location of "libuuid.so.1" is located in "/lib64'. Before compiling, I applied your given command as "export LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH ".
In cofigure.log i found an error line as given below:
.......................
checking for MPI_Init... yes
checking for mpi.h... yes
checking for openmpif77... no
checking for mpif77...
mpif77
checking for mpif.h... yes
checking for
openmpif90... /home/Elahi/Downloads/libraries/mpich-3/bin/mpif90
checking for mpif.h... yes
gfortran: error: unrecognized command line option
'-showme:link'; did you mean '--force-link'? (any suggestion
regarding this please?)
configure: creating ./config.lt
config.lt: creating
libtool
checking for the extension of Delft3D plugins...
.so
checking that generated files are newer than configure...
done
configure: creating ./config.status
config.status:
creating Makefile
config.status: creating
engines_gpl/d_hydro/Makefile
config.status: creating
engines_gpl/d_hydro/packages/d_hydro/Makefile
..............
(lots of line without any error)
config.status: creating
utils_lgpl/ods/packages/ods/src/Makefile
config.status: creating
config.h
config.status: executing depfiles commands
config.status: executing libtool commands
<<<end of configure.log>>>
In make.log error remains the same:
............
libtool: compile: /home/Elahi/Downloads/libraries/mpich-3/bin/mpif90
-DHAVE_CONFIG_H -I. -I../../../../..
-I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src
-I-L/home/Elahi/Downloads/libraries/netcdf_4.4/lib -lnetcdff
-DWITH_DELFTONLINE
-I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src
-I-L/home/Elahi/Downloads/libraries/netcdf_4.4/lib -lnetcdff
-I/home/Elahi/Downloads/libraries/netcdf_4.4/include -O2
-ffree-line-length-none -cpp -c ec_module_version.F90 -fPIC -o
.libs/ec_module_version.o
f951: Warning: Nonexistent
include directory ‘-L/home/Elahi/Downloads/libraries/netcdf_4.4/lib’
[-Wmissing-include-dirs] ( it seems like generated from the error in
configure?)))
f951: Warning: Nonexistent include directory
‘-L/home/Elahi/Downloads/libraries/netcdf_4.4/lib’ [-Wmissing-include-dirs]
libtool: compile:
/home/Elahi/Downloads/libraries/mpich-3/bin/mpif90 -DHAVE_CONFIG_H
-I. -I../../../../..
-I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src
-I-L/home/Elahi/Downloads/libraries/netcdf_4.4/lib -lnetcdff
-DWITH_DELFTONLINE
-I../../../../../utils_lgpl/deltares_common/packages/deltares_common/src
-I-L/home/Elahi/Downloads/libraries/netcdf_4.4/lib -lnetcdff
-I/home/Elahi/Downloads/libraries/netcdf_4.4/include -O2
-ffree-line-length-none -cpp -c ec_module_version.F90 -o
ec_module_version.o >/dev/null 2>&1
........
..........
ibdata_f.a -lpthread -luuid -ldl -lrt -lexpat -lstdc++ -pthread
-fopenmp -Wl,-rpath -Wl,/home/Elahi/delft3d_repository/src/lib
-Wl,-rpath -Wl,/home/Elahi/Downloads/libraries/netcdf_4.4/lib
-Wl,-rpath -Wl,/home/Elahi/Downloads/libraries/hdf5-1.8.13/lib
/usr/bin/ld: cannot find -luuid
collect2: error: ld returned 1
exit status
Makefile:631: recipe for target 'delwaq1'
failed
make[6]: *** [delwaq1] Error 1
make[6]: Leaving
directory
'/home/Elahi/delft3d_repository/src/engines_gpl/waq/packages/delwaq1/src'
Makefile:755: recipe for target 'install' failed
make[5]: ***
[install] Error 2
make[5]: Leaving directory
'/home/Elahi/delft3d_repository/src/engines_gpl/waq/packages/delwaq1/src'
Makefile:488: recipe for target 'install-recursive' failed
make[4]: *** [install-recursive] Error 1
make[4]: Leaving
directory
'/home/Elahi/delft3d_repository/src/engines_gpl/waq/packages/delwaq1'
Makefile:496: recipe for target 'install-recursive' failed
make[3]: *** [install-recursive] Error 1
make[3]: Leaving
directory
'/home/Elahi/delft3d_repository/src/engines_gpl/waq/packages'
Makefile:488: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving
directory '/home/Elahi/delft3d_repository/src/engines_gpl/waq'
Makefile:493: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving
directory '/home/Elahi/delft3d_repository/src/engines_gpl'
Makefile:548: recipe for target 'install-recursive' failed
make:
*** [install-recursive] Error 1
<<<end>>>>
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Padawan Posts: 97 Join Date: 1/3/11 Recent PostsHi Wasif,
Workaround: uuid is only used by WAQ. If you do not need WAQ, you can
exclude it from the compilation as follows:
Open file
".../src/engines_gpl/Makefile.am" in an editor and remove
the line " waq \ "
If you do need WAQ: I'm confused: the make.log file attached to your previous post contains the error "cannot find -luuid". But the fragment you posted now contains an error message about NetCDF. Anyway, I'll ask a WAQ-colleague to help with the uuid problem.
Regards,
Adri
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Padawan Posts: 28 Join Date: 1/21/13 Recent Postsuuid is used in src\engines_gpl\waq\packages\waq_utils_c\src\getuuid.c
If you can't get the compilation to find uuid, you can modifiy this file, so it will generate a fake uuid. Remove this section:
#ifdef WIN32 #include <windows.h> #else #include <uuid/uuid.h> #endif
End replace the call to generate a uuid:
#ifdef WIN32 CoCreateGuid( (GUID *)guid ); #else uuid_generate( guid ); #endif
with this:
for (i = 0; i < 16; i++) { guid[i] = '0'; }
Then remove -luuid in both these Makefile.am's
src\engines_gpl\waq\packages\delwaq2\src\Makefile.am src\engines_gpl\waq\packages\delwaq1\src\Makefile.am
I hope this will avoid the need of the uuid library
Michelle
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Youngling Posts: 6 Join Date: 7/27/18 Recent PostsHi Adri and Michelle,
Thanks a lot. I have successfully finished the compilation after removing WAQ. I tried by modifying getuuid.c as per Michelle's suggestion. Still, I got some errors related to uuid. However, I will use Delft3d to study wave, wind and sediment process altogether. Hope it could be done without WAQ, right?
Thanks again.
Kind regards,
Wasif
RE: Compilation error in Fedora-25: gfortran: error: unrecognized command l
Padawan Posts: 97 Join Date: 1/3/11 Recent PostsHi Wasif,
Yes, by combining FLOW and WAVE, you can model wave, wind and sediment processes.
Regards,
Adri