[Dock-fans] Compilation problems with dock 6.2/intel

Francesco Pietra chiendarret at gmail.com
Sat Apr 25 16:05:55 PDT 2009


With previously successful /dock6/install/config.h (between ===)

==========
# DOCK configuration file for GNU compilers.
# This configuration file can be used on many platforms:
#  Linux, Macintosh OS X, Windows with Cygwin, etc.
# If g77 is not available then change FC below to gfortran or g95.

# CC is the C compiler
# CXX is the C++ compiler
# CFLAGS is the flags for the C and C++ compilers
# FC is the Fortran compiler
# FFLAGS is the flags for the Fortran compiler
# LIBS is the flags for the linker
# LOAD is the command to invoke the linker
# SFX is the suffix for the executable

CC=          icc
CXX=         icpc
CFLAGS=      -O3
FC=          ifort
FFLAGS=      -O2
LIBS= -L$(MKL_HOME)/lib/em64t -lmkl -lmkl_lapack32 -lmkl_lapack64
-lguide -lpthread
LINK_WITHOUT_FORTRAN_MAIN= -nofor_main
LOAD=        icpc
SFX=

# Macro definitions for NAB
# AR is the library archiver
# LEX is the lexical analyzer generator
# OCFLAGS is the flags for the C compilers with high optimization
# RANLIB is the library index generator
AR=          ar rv
LEX=         flex
OCFLAGS=     -O3 -D_ANSI_SOURCE
RANLIB=      ranlib
DOCKHOME=/usr/local/dock6
# Created at Tue Jun 3 09:28:41
============

and now edited /dock6/src/grid/define.h (between xxxxxx, edited for
location of parameters)

xxxxxxx
/*                                                                    */
/*                        Copyright UCSF, 1997                        */
/*                                                                    */

/*

Written by Todd Ewing
5/97

*/

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <limits.h>
#include <float.h>

/* Preprocessor constants, strings, and macros */

#define DOCK_VERSION "4.0.1"
#define RELEASING_DATE "May 17, 1998"
#define PARAMETER_PATH "/usr/local/dock6/parameters/"
#define TRUE 1
#define FALSE 0
#define NEITHER -1
#define INITIAL_SCORE 1000
#define DISTANCE_MIN 0.3
#define PI 3.141592654
#define PRINTVAR(var, fmt) printf (#var " = " #fmt "\n", var)
#define SQR(x) ((x)*(x))
#define CUBE(x) ((x)*(x)*(x))
#define ABS(x) ((x) >= 0 ? (x) : -(x))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define MAX(x, y) ((x) > (y) ? (x) : (y))
#define NINT(x) (int) ((x) > 0 ? ((x) + 0.5) : ((x) - 0.5))
#define SIGN(x) ((x) < 0 ? -1 : 1)
#define NON_ZERO(x) (ABS (x) < 0.00001 ? FALSE : TRUE)
#define POWER(b, e, p) \
{ \
  int word; \
  float run; \
  POWER_CORE(b, e, p) \
}

#define POWER_CORE(base, exponent, product) \
  word = exponent; product = 1.0; run = base; \
  while (word) \
  { \
    if (word & 1) \
      product *= run; \
    run *= run; \
    word >>= 1; \
  }

/* String variable types */
xxxxxxxxxxxx

cd install
make clean
make install

failed (between **********)

************
cd ../src && make install
make[1]: Entering directory `/usr/local/dock6/src'
cd dock && make install
make[2]: Entering directory `/usr/local/dock6/src/dock'
icpc -c  -O3 -o amber_typer.o  amber_typer.cpp
/usr/include/c++/4.3.2/x86_64-linux-gnu/bits/c++locale.h(94): error:
argument of type "__va_list_tag *" is incompatible with parameter of
type "char *"
      const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);
                                                                  ^

amber_typer.cpp(15): error: identifier "strlen" is undefined
      for (i = 0; i < strlen(line); i++)
                      ^

amber_typer.cpp(66): error: identifier "strtok" is undefined
      strcpy(temp, strtok(NULL, " "));
                   ^

amber_typer.cpp(66): error: identifier "strcpy" is undefined
      strcpy(temp, strtok(NULL, " "));
      ^

amber_typer.cpp(87): error: identifier "strncmp" is undefined
          if ((!strncmp(branch, "(", 1)) || (!strncmp(branch, "[", 1))) {
                ^

amber_typer.cpp(125): error: identifier "strstr" is undefined
      if ((strstr(candidate, reference)) || (reference[0] == '*'))
           ^

amber_typer.cpp(251): error: identifier "INT_MIN" is undefined
      heavy_flag = INT_MIN;
                   ^

amber_typer.cpp(285): error: identifier "strncmp" is undefined
          if (!strncmp(line, "name", 4)) {        // read in name field
               ^

amber_typer.cpp(346): error: identifier "strtok" is undefined
              strtok(white_line(line), " ");
              ^

amber_typer.cpp(382): error: identifier "INT_MIN" is undefined
          if (types[i].heavy_flag == INT_MIN) {
                                     ^

amber_typer.cpp(475): error: identifier "strcmp" is undefined
                  if ((strcmp(mol.atom_types[nbrs[j]].c_str(), "LP"))
                       ^

amber_typer.cpp(531): error: identifier "strncmp" is undefined
          if (!strncmp(line, "name", 4)) {
               ^

amber_typer.cpp(544): error: identifier "strlen" is undefined
              for (i = 0; i < strlen(types[types.size() - 1].name); i++)
                              ^

amber_typer.cpp(561): error: identifier "strtok" is undefined
              strtok(white_line(line), " ");
              ^

amber_typer.cpp(598): error: identifier "strtok" is undefined
          token = strtok(white_line(line), " ");
                  ^

amber_typer.cpp(600): error: identifier "strcmp" is undefined
          if (!strcmp(token, "drive_id")) {
               ^

amber_typer.cpp(753): error: identifier "strncmp" is undefined
          if (!strncmp(line, "name", 4)) {        // read in name field
               ^

amber_typer.cpp(762): error: identifier "strtok" is undefined
              strtok(white_line(line), " ");
              ^

compilation aborted for amber_typer.cpp (code 2)
make[2]: *** [amber_typer.o] Error 2
make[2]: Leaving directory `/usr/local/dock6/src/dock'
make[1]: *** [dock6] Error 2
make[1]: Leaving directory `/usr/local/dock6/src'
make: *** [install] Error 2
francesco at tya64:/usr/local/dock6/install$
*********************


gcc (Debian 4.3.2-1.1) 4.3.2

at the time of the successful compilation gcc was surely a lower version.

thanks
francesco pietra


More information about the Dock-fans mailing list