Re: [SIESTA-L] undefined reference to `getarg_' undefined reference to `iargc_'

2009-07-28 Thread Руслан Жачук
Thank you for answer. I used both siesta-2.0.1 and siesta-2.0.2 and denchar
does not compile with gfortran on both.

This is how I solved the problem:

edit file f2kcli.f90 :
replace #ifndef  GFORTRAN with #ifdef  __GFORTRAN__

Regards
Ruslan Zhachuk

2009/7/28 Lifeng Sun 

> Hi,
>
> The URL you referenced is for SIESTA _2.0.2_, but your working path
> suggests you are compiling SIESTA _2.0.1_, which has not been updated
> to support gfortran. Here follows a patch for f2kcli.F90 from the
> official releases:
>
> diff --git a/Src/f2kcli.F90 b/Src/f2kcli.F90
> index 826d9de..f415b08 100644
> --- a/Src/f2kcli.F90
> +++ b/Src/f2kcli.F90
> @@ -17,6 +17,8 @@
>  ! Date: February 2001
>  !
>   MODULE F2KCLI
> +#ifndef GFORTRAN
> +
>  #ifdef __NAG__
>   use f90_unix
>  #else
> @@ -220,7 +222,6 @@
>   RETURN
>   END SUBROUTINE GET_COMMAND_ARGUMENT
>  !
> +#endif
>   END MODULE F2KCLI
>
>
>
> Regards,
> Lifeng Sun
>
> On Tue, 28 Jul 2009, ?? ? wrote:
> >Dear Siesta users,
> >
> >in page http://fisica.ehu.es/ag/siesta-extra/release.notes_2.0.2
> >
> >there is stntence  >updated.>
> >
> >But when somebody try to compile denchar with gfortran
> >immediatly receives an error
> >
> >/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:212: undefined reference to
> `getarg_'
> >f2kcli.o: In function `__f2kcli__command_argument_count':
> >/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:122: undefined reference to
> `iargc_'
> >collect2: ld returned 1 exit status
> >make: *** [denchar] Error 1
> >zhac...@solaris:~/siesta-2.0.1/Src>
> >
>
>
> --
> Lifeng Sun
> Center of Mathematics and Theoretical Physics
> Shanghai Institute for Advanced Studies
> University of Science and Technology of China
>


Re: [SIESTA-L] undefined reference to `getarg_' undefined reference to `iargc_'

2009-07-28 Thread Lifeng Sun
Hi,

The URL you referenced is for SIESTA _2.0.2_, but your working path
suggests you are compiling SIESTA _2.0.1_, which has not been updated
to support gfortran. Here follows a patch for f2kcli.F90 from the
official releases:

diff --git a/Src/f2kcli.F90 b/Src/f2kcli.F90
index 826d9de..f415b08 100644
--- a/Src/f2kcli.F90
+++ b/Src/f2kcli.F90
@@ -17,6 +17,8 @@
 ! Date: February 2001
 !
   MODULE F2KCLI
+#ifndef GFORTRAN
+
 #ifdef __NAG__
   use f90_unix
 #else
@@ -220,7 +222,6 @@
   RETURN
   END SUBROUTINE GET_COMMAND_ARGUMENT
 !
+#endif
   END MODULE F2KCLI



Regards,
Lifeng Sun

On Tue, 28 Jul 2009, ?? ? wrote:
>Dear Siesta users,
>
>in page http://fisica.ehu.es/ag/siesta-extra/release.notes_2.0.2
>
>there is stntence updated.>
>
>But when somebody try to compile denchar with gfortran
>immediatly receives an error
>
>/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:212: undefined reference to `getarg_'
>f2kcli.o: In function `__f2kcli__command_argument_count':
>/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:122: undefined reference to `iargc_'
>collect2: ld returned 1 exit status
>make: *** [denchar] Error 1
>zhac...@solaris:~/siesta-2.0.1/Src>
>


-- 
Lifeng Sun
Center of Mathematics and Theoretical Physics
Shanghai Institute for Advanced Studies
University of Science and Technology of China


signature.asc
Description: GnuPG digital signature


Re: [SIESTA-L] undefined reference to `getarg_' undefined reference to `iargc_'

2009-07-28 Thread R.C.Pasianot


 Hi,

 I'm no expert either, but according to the web, gfortran already has
 those functions built in.
 So, an easy workarround is: edit f2kcli.F90 and right after the
 "MODULE F2KCLI" statement type " #define GFORTRAN " (which means
 do not compile the module at all).

 After this you'll get denchar executable, hopefully it will also do
 its job (didn't try by myself).

 Good luck,

 Roberto


On Tue, 28 Jul 2009, ?? ? wrote:


Dear Siesta users,

in page http://fisica.ehu.es/ag/siesta-extra/release.notes_2.0.2

there is stntence 

But when somebody try to compile denchar with gfortran
immediatly receives an error

/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:212: undefined reference to `getarg_'
f2kcli.o: In function `__f2kcli__command_argument_count':
/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:122: undefined reference to `iargc_'
collect2: ld returned 1 exit status
make: *** [denchar] Error 1
zhac...@solaris:~/siesta-2.0.1/Src>


[SIESTA-L] undefined reference to `getarg_' undefined reference to `iargc_'

2009-07-28 Thread Руслан Жачук
Dear Siesta users,

in page http://fisica.ehu.es/ag/siesta-extra/release.notes_2.0.2

there is stntence 

But when somebody try to compile denchar with gfortran
immediatly receives an error

/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:212: undefined reference to `getarg_'
f2kcli.o: In function `__f2kcli__command_argument_count':
/home/zhachuk/siesta-2.0.1/Src/f2kcli.F90:122: undefined reference to `iargc_'
collect2: ld returned 1 exit status
make: *** [denchar] Error 1
zhac...@solaris:~/siesta-2.0.1/Src>