AMBER Archive (2009)

Subject: Re: [AMBER] AmberTools 1.2 Installation on Ubuntu 9.10 Karmic Koala

From: Mark Williamson (mjw_at_sdsc.edu)
Date: Mon Nov 09 2009 - 14:14:03 CST


case wrote:
> On Mon, Nov 09, 2009, Wallace Kunin wrote:

>> fortran.cpp:52: error: ‘sprintf’ was not declared in this scope
>> fortran.cpp: In member function ‘void mort::format::write(std::ostream&)
>> const’:
>> fortran.cpp:133: warning: comparison between signed and unsigned integer
>> expressions
>> fortran.cpp:138: warning: comparison between signed and unsigned integer
>> expressions
>> fortran.cpp:145: warning: comparison between signed and unsigned integer
>> expressions
>> fortran.cpp:153: warning: comparison between signed and unsigned integer
>> expressions
>> make[3]: *** [fortran.o] Error 1
>
> This is a bit weird. What result do you get on typing "g++ --version"?
>
> ....dac

Attempting to perhaps preempt your next question, I'm also using Ubuntu
9.10 on my desktop and I see the following.

<...snip....>
g++ -c -O2 -Wall -W -D_REENTRANT -I../../freelib -I../../freelib -o
fortran.o fortran.cpp
fortran.cpp: In function ‘void mort::write_ivalue(std::ostream&, const
std::string&, const boost::any&)’:
fortran.cpp:19: error: ‘sprintf’ was not declared in this scope
<....failure....>

If so, add the following include (cstdio) to top of

./src/gleap/mortsrc/common/fortran.cpp

#include <cassert>
#include <iostream>
#include <stdexcept>
#include "fortran.hpp"
#include "algorithm.hpp"

so that it now reads:

#include <cassert>
#include <iostream>
#include <stdexcept>
#include <cstdio>
#include "fortran.hpp"
#include "algorithm.hpp"

I think the verion of g++ (part of the 4.4.1 gnu compiler set) shipped
with Ubuntu 9.10 has become stricter.

-- 
Mark Williamson, Post Doc
Walker Molecular Dynamics Group
Room 395E
San Diego Supercomputer Center
9500 Gilman Drive
La Jolla, CA 92093-0505
Email:  mjw at sdsc.edu
Office: 858-246-0827

_______________________________________________ AMBER mailing list AMBER_at_ambermd.org http://lists.ambermd.org/mailman/listinfo/amber