AMBER Archive (2003)

Subject: Re: debug leap

From: Scott Brozell (sbrozell_at_scripps.edu)
Date: Sat Apr 19 2003 - 18:40:03 CDT


Hello,

The compile problem has already been tackled.
This bugfix was sent to the Amber Reflector, but did not get
posted on the web site:

********>Bugfix ??:
Author: Scott Brozell
Date: 11/07/02

Programs: LEaP

Severity: major when building LEaP with DEBUG defined.

Description: The declaration of variables sTemp1 and sTemp2 in function
             zbUnitIOIndexBondParameters was omitted.
             Because these variables were only used as arguments to the
             macro MESSAGE that only uses them when the preprocessor
             name DEBUG is defined, most builds were successful.

Fix: apply the following patch to amber7/src/leap/src/leap/unitio.c:

------------------------------------------------------------------------------
*** unitio.c 2002/10/22 15:14:28 7.29
--- unitio.c 2002/11/07 21:28:22
***************
*** 1254,1259 ****
--- 1254,1260 ----
      double dKb, dR0;
      STRING sAtom1, sAtom2, sDesc;
      PARMSET psTemp;
+ STRING sTemp1, sTemp2;

      bFailedGeneratingParameters = FALSE;

------------------------------------------------------------------------------

Temporary workarounds: don't build LEaP with -DDEBUG.

Files affected: amber7/src/leap/src/leap/unitio.c

********>End Bugfix

The library problem has just been diagnosed.
It seems that the leap makefiles were modified 8 years ago
to avoid name clashes on alphas. The modifications did not
include all permutations of the Leap libraries, eg, Leap*Lib.
This bugfix applies only to LeapDebugLib.
LeapProfileLib and LeapSharedLib remain to be checked for fixing.

********>Preliminary Bugfix ??+1:
Author: Scott Brozell
Date: 04/19/03

Programs: LEaP

Severity: major when building LEaP with LeapDebugLib defined.

Description: The names of the debug versions of various libraries
             were not updated when the corresponding names of the
             normal libraries were changed. Apparently, this dates
             back to 1995/04/17 when the names were modified to
             avoid linking with shared versions on alphas.

Fix: apply the following patch to amber7/src/leap/src/leap/Imakefile:

------------------------------------------------------------------------------
*** Imakefile 27 Feb 2002 19:26:19 -0000 7.25
--- Imakefile 19 Apr 2003 23:02:15 -0000
***************
*** 492,504 ****
  #endif

  #if DoDebugLib
! WCLDEP_d = ../Wc/libWc_d.a
! XPMDEP_d = ../Xpm/libXpm_d.a
! XRAWDEP_d = $(XRAWDIR)/libXraw_d.a

! WCLLIB = -L../Wc -lWc_d
! XPMLIB = -L../Xpm -lXpm_d
! XRAWLIB = -L$(XRAWDIR) -lXraw_d

  #else
          WCLDEP_d =
--- 492,504 ----
  #endif

  #if DoDebugLib
! WCLDEP_d = ../Wc/libWcLeap_d.a
! XPMDEP_d = ../Xpm/libXpmLeap_d.a
! XRAWDEP_d = $(XRAWDIR)/libXrawLeap_d.a

! WCLLIB = -L../Wc -lWcLeap_d
! XPMLIB = -L../Xpm -lXpmLeap_d
! XRAWLIB = -L$(XRAWDIR) -lXrawLeap_d

  #else
          WCLDEP_d =

********>End Bugfix

Applying these patches I have built leap successfully, and xleap
executes simple tasks.

Scott Brozell, Ph.D. | e-mail: sbrozell_at_scripps.edu
Dept. of Molecular Biology, TPC15 | fax: +1-858-784-8896
The Scripps Research Institute | phone: +1-858-784-8754
10550 N. Torrey Pines Rd. | home page:
La Jolla CA 92037 USA | http://www.scripps.edu/~sbrozell

On Sat, 19 Apr 2003 vze6jslz_at_verizon.net wrote:

> Hello amber users
>
> I'm trying to compile leap in debug mode as follows:
>
> In ../amber7/src/leap/Imakefile,
> #define LeapNormalLib YES >> #define LeapNormalLib NO
> #define LeapDebugLib NO >> #define LeapDebugLib YES
>
> then
> xmkmf
> make World& > mkerr
> However I get a compile error:
> unitio.c:1314: 'sTemp1' undeclared (first use in this function)
>
> When I declare sTemp1 and sTemp2 in unitio.c and try to compile,
> I get another error
> make[2]: ***No Rule for make target '../Wc/libWc_d.a', needed by
> 'xaLeap'. Stop.
>
> Can anyone help me compile leap with the debug flags?
>
> Andrew Petersen
>