Problem of " driver.c:99: multiple definition of `main' "
Posted: Mon Oct 24, 2011 12:37 pm
Dear all
I am trying to compile Yambo-3.2.4-r.855. My configure was as:
Then I obtained the configure result as:
How could I solve this problem?
Any suggestion will be welcome.
I am trying to compile Yambo-3.2.4-r.855. My configure was as:
Code: Select all
./configure --exec-prefix=/home/User/ProgramFiles/Yambo --prefix=/home/User/ProgramFiles/Yambo/LIBS --with-fftw=/usr/local/lib/libfftw3.a --with-mpi=/home/User/ProgramFiles/MPICH/lib/libmpich.a --with-libxc-lib=/home/User/ProgramFiles/LibXC/lib --with-libxc-include=/home/User/ProgramFiles/LibXC/include --with-p2y=4.0 --with-iotk=/home/User/ProgramFiles/Quantum-ESPRESSO/iotk FC=mpif90 LDFLAGS=-nofor_main
Finally, during compiling by make yambo, an error occurred:#
# [VER] 3.2.4 r.855
#
# [SYS] linux@x86_64
# [SRC] /home/User/Download/yambo-3.2.4-r.855
# [BIN] /home/User/ProgramFiles/Yambo/LIBS/bin
# [FFT] FFTW Fast Fourier transform
#
# [ ] Double precision
# [X] Redundant compilation
# [X] MPI
# [X] PW (4.0) support
# [ ] ETSF I/O support
# [ ] SCALAPACK
# [X] LibXC
# [ ] NETCDF/HDF5/Large Files
# [XX ] Built-in BLAS/LAPACK/LOCAL
#
# [ CPP ] gcc -E -P
# [ C ] gcc -g -O2 -D_C_US -D_FORTRAN_US
# [MPICC] mpicc -g -O2 -D_C_US -D_FORTRAN_US
# [ F90 ] mpif90 -O
# [MPIF ] mpif90 -O
# [ F77 ] mpif90 -O
# [Cmain]
# [NoOpt] -O0
#
# [ MAKE ] make
# [EDITOR] vim
#
I have checked the post: viewtopic.php?f=1&t=313, but I found I have used the parameter LDFLAGS=-nofor_main.make[1]: Entering directory `/home/User/Download/yambo-3.2.4-r.855/driver'
yambo_driver.F
driver.o: In function `main':
/home/User/Download/yambo-3.2.4-r.855/driver/driver.c:99: multiple definition of `main'
/home/User/intel/composer_xe_2011_sp1.6.233/compiler/lib/intel64/for_main.o:/export/users/nbtester/efi2linux_nightly/branch-12_1/20110812_000000/libdev/frtl/src/libfor/for_main.c:(.text+0x0): first defined here
/home/User/intel/composer_xe_2011_sp1.6.233/compiler/lib/intel64/for_main.o: In function `main':
/export/users/nbtester/efi2linux_nightly/branch-12_1/20110812_000000/libdev/frtl/src/libfor/for_main.c:(.text+0x38): undefined reference to `MAIN__'
make[1]: *** [yambo] Error 1
make[1]: Leaving directory `/home/User/Download/yambo-3.2.4-r.855/driver'
make: *** [yambo] Error 2
How could I solve this problem?
Any suggestion will be welcome.