Re: [AMBER] Installation error: recipe for target 'pupildata.o' failed

From: Parker de Waal <>
Date: Sun, 23 Nov 2014 16:24:25 +0000

Hi Jason,

Currently I am using GNU Fortran (GCC) 4.9.2.

Unfortunately after changing len=4 to character(len=*) :: to_upper an error still persists:

gfortran -DBINTRAJ -DEMIL -c -O0 -ffree-form -I../pbsa -I../sqm -I../rism -I../../../include -I/opt/amber14/include -I/opt/amber14/include -DRISMSANDER -o pupildata.o pupildata.F90

   character(len=*) :: to_upper
Error: Explicit interface required for 'to_upper' at (1): result with non-constant character length

   auxname = to_upper(name)
Error: Function 'to_upper' is declared CHARACTER(*) and cannot be used at (1) since it is not a dummy argument
depend:3757: recipe for target 'pupildata.o' failed
make[2]: *** [pupildata.o] Error 1
make[2]: Leaving directory '/opt/amber14/AmberTools/src/sander'
Makefile:16: recipe for target 'serial' failed
make[1]: *** [serial] Error 2
make[1]: Leaving directory '/opt/amber14/AmberTools/src'
Makefile:7: recipe for target 'install' failed
make: *** [install] Error 2


From: Jason Swails []
Sent: Saturday, November 22, 2014 11:58 PM
To: AMBER Mailing List
Subject: Re: [AMBER] Installation error: recipe for target 'pupildata.o' failed

On Sat, Nov 22, 2014 at 5:37 PM, Parker de Waal <>

> Hi Everyone,
> I'm currently working to install Amber14 on our new workstation, however
> whenever I try to compile the serial version with gnu (./configure gnu) the
> following error occurs:
> make[3]: Leaving directory '/opt/amber14/AmberTools/src/rism'
> gfortran -DBINTRAJ -DEMIL -c -O0 -ffree-form -I../pbsa -I../sqm
> -I../rism -I../../../include -I/opt/amber14/include
> -I/opt/amber14/include -DRISMSANDER -o pupildata.o pupildata.F90
> pupildata.F90:68.31:
> character(len=4) :: to_upper
> 1
> Error: Explicit interface required for 'to_upper' at (1): result with
> non-constant character length

​What version of gfortran are you using? (i.e., what is the output of
"gfortran --version"?)

​So what I *think* the problem here is that to_upper is defined as a
length-4 integer, whereas the to_upper function (see line 164 of
pupildata.F90) is defined as length-* character function (basically any
length). As a result, gfortran chokes, because it doesn't find a
"to_upper" function that matches the specific type it is assigned.

Therefore, gfortran asks for an explicit interface (which, as I understand
it, is basically Fortran's way of implementing function overloading in the
C++ sense) that defines how to_upper behaves as a length-4 character

The simplest solution here, in my opinion, is to change (len=4) in that
line (pupildata.F90, line 68) to (len=*).

If you make that change, does it work? On the other hand, you can try to
define to_upper to use length-4 characters rather than arbitrary length
(again, so call signatures match). If you find something that fixes this
problem, please let us know so we can make that same fix.

It would also help to know what version of compilers you are using so I can
try and reproduce the issue on my machine to better understand what's


Jason M. Swails
Rutgers University
Postdoctoral Researcher
AMBER mailing list
AMBER mailing list
Received on Sun Nov 23 2014 - 08:30:02 PST
Custom Search