From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Apr 01 2005 - 18:20:20 CST

Hi,
  As it turns out, this is entirely trivial to fix. Sun has finally added
all of the single-precision versions of cos(), sin(), acos(), etc to their
standard library, so there's no longer a need to use macros to redefine
them to call the double-precision versions. The workaround is a one-line
change to the Makefile created by the configure script. Here's the change
I made in order to get a successful build and link on a Solaris 10/Sparc
machine:

# old, original setting
#CPPFLAGS = -mt -fast -xO3 -native -xarch=v9a -D"sqrtf=sqrt" -D"cosf=cos" -D"sinf=sin" -D"fabsf=fabs" -D"acosf=acos" -DARCH_SOLARIS2_64 $(DEFINES) $(
INCDIRS)

# new, eliminated the macros for single-precision transcendental functions
CPPFLAGS = -mt -fast -xO3 -native -xarch=v9a -DARCH_SOLARIS2_64 $(DEFINES) $(INCDIRS)

Let us know if you need more help compiling on Solaris 10 x86.
We don't have one of those running presently, so you might still find
a bug or two in the VMD source, but it ought to be really close to working.

  John Stone
  vmd_at_ks.uiuc.edu

On Fri, Apr 01, 2005 at 06:10:36PM -0600, John Stone wrote:
>
> Hi,
> We've only just begun testing Solaris 10 here in our lab. I just ran
> a build of VMD on a Solaris 10 Sparc machine today and I ran into
> exactly the same problem you're experiencing. I'm hoping it is an easy
> fix. I'll let you know as soon as I have a workaround for this problem.
>
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Fri, Apr 01, 2005 at 02:17:45PM +0800, Koo Kee Kiat wrote:
> > Hi,
> >
> > I am trying to compile VMD 1.8.3 on Solaris 10 x86 and i got the following error when running make: -
> >
> > echo "Compiling " ArtDisplayDevice.C " --> " ArtDisplayDevice.o " ..."; \
> > CC -D__EXTENSIONS__ -fast -xO3 -native -D"sqrtf=sqrt" -D"cosf=cos" -D"sinf=sin" -D"fabsf=fabs" -D"acosf=acos" -DARCH_SOLARIS2 -DVMDSURF -DVMDMSMS -DVMDISOSURFACE -DVMDVOLUMETEXTURE -DVMDSTATICPLUGINS -I../plugins/include -I../plugins/SOLARIS2/molfile -I. -c ArtDisplayDevice.C -o ../SOLARIS2/ArtDisplayDevice.o
> > Compiling ArtDisplayDevice.C --> ArtDisplayDevice.o ...
> > "/usr/include/math.h", line 16: Error: "std::acos(double)" was previously declared "acos(float)".
> > "/usr/include/math.h", line 16: Error: Multiple declaration for std::acos(float).
> > "/usr/include/math.h", line 21: Error: "std::cos(double)" was previously declared "cos(float)".
> > "/usr/include/math.h", line 21: Error: Multiple declaration for std::cos(float).
> > "/usr/include/math.h", line 24: Error: "std::fabs(double)" was previously declared "fabs(float)".
> > "/usr/include/math.h", line 24: Error: Multiple declaration for std::fabs(float).
> > "/usr/include/math.h", line 33: Error: "std::sin(double)" was previously declared "sin(float)".
> > "/usr/include/math.h", line 33: Error: Multiple declaration for std::sin(float).
> > "/usr/include/math.h", line 35: Error: "std::sqrt(double)" was previously declared "sqrt(float)".
> > "/usr/include/math.h", line 35: Error: Multiple declaration for std::sqrt(float).
> > 10 Error(s) detected.
> > *** Error code 10
> > make: Fatal error: Command failed for target `ArtDisplayDevice.o'
> >
> > Any help is appreciated. Thanks a lot in advance!
>
> --
> NIH Resource for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349              
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078