Collaborative Computational Project No. 4
Software for Macromolecular X-Ray Crystallography

Known Problems on Solaris platforms

Goto:


Test system (Martyn Winn)

I have a Sun Blade 100 workstation with 256 MB memory, sparcv9 502 MHz processor and PGX64 graphics card. The OS is SunOS 5.8

Original compilers

CCP4 was first tested using the compilers:

These compilers live in /opt/SUNWspro/bin. Beware, there is also a /usr/ucb/cc which is in fact a script wrapping /usr/ccs/bin/ucbcc which in turn is a link to /opt/SUNWspro/WS6U2/bin/acc. acc -V quotes the identity: Sun WorkShop 6 update 2 C 5.3 2001/05/15. I.e. this is the same compiler, but run in a BSD compatability mode. This compiler should not be used.

Then ...

Updated compilers (18/12/03): Irritatingly, these are now in /usr/local/SunOne/SUNWspro/bin Still have the problem of avoiding the BSD-compatible version.

There is now no Fortran 77 compiler. f77 invokes f90 -f77 -ftrap=%none. Note, f90 and f95 are equivalent.

Latest compilers

Now updated to (09/11/04):

Test system (York)

They have an intermediate version:

cc -V gives Forte Developer 7 C 5.4 2002/03/09
CC -V gives Forte Developer 7 C++ 5.4 2002/03/09
f77 -V gives Forte Developer 7 Fortran 95 7.0 2002/03/09

CCP4 configure explicitly sets /opt/SUNWspro/bin/f77 which produces the line:


NOTICE: Invoking /opt/SUNWspro/bin/f90 -f77 -ftrap=%none -O3 ...


Problems with 5.0.1

  1. Syntax problem in mtztona4
    Date : 07/07/2004
    Bug number : #660

    Sun compiler complains about \' to write quote. This happens with the sunos configure option, but not the sunos64 one for some reason. I believe '''' is the correct Fortranic way of doing it (this is used extensively in refmac). \' is probably a widely-accepted extension.

    Change both instances of '\'' to '''' (4 quotes) in line 179 of mtztona4.f

  2. Linking failure of xloggraph
    Date : 08/07/2004
    Bug number : #664

    Linking of xloggraph fails looking for symbols omp_* required by libfsu.so This happens with sunos(32) build but not sunos64.

    These symbols are for OpenMP and specifying -xopenmp makes the compiler/linker sort it out. This flag can be added manually to $CCP4/x-windows/XCCPJIFFY/Imakefile

  3. Linking of rotgen fails
    Date : 08/07/2004
    Bug number : #665

    libjwc_f can't find symbols from libccp4f This happens with sunos(32) build but not sunos64.

    Solution is to swap order of -ljwc_f and -lccp4f in $CCP4/x-windows/Rotgen/Makefile


ccp4 build

The configure script in CCP4 release 4.2.1 will assign the compilers /opt/SUNWspro/bin/cc and /opt/SUNWspro/bin/f77, unless overridden by the variable CC and FC respectively. The X-windows build was sorted between release 4.2 and 4.2.1

The CCP4 suite appears to build successfully with these compilers, but note the following problems:

  1. At the top of x-windows/RasMol/Imakefile, the line DEPTHDEF = -DTHIRTYTWOBIT should be uncommented, and the line DEPTHDEF = -DEIGHTBIT commented, otherwise the program will compile but complain "can't find suitable display" at runtime.
  2. I swear I built shared libraries successfully with -PIC for position-independent code. Now it seems it requires -KPIC although the man page says that this is simply a synonym for -PIC. Liz Potterton finds this too. This should be changed in main configure file.
    Likewise, lib/ccif/configure needs the change:
    1843c1843
    <             SHARED_LIB_CMD='$(LD) $(SHARED_LIB_FLAGS) -G -z text $L \\\
    ---
    >             SHARED_LIB_CMD='$(LD) $(SHARED_LIB_FLAGS) -dy -G -z allextract -z text $L \\\
    
    And more: lib/ccif/configure sets the flag "-pic" which leads to undefined symbol _mount. This will be fixed!
  3. The configure includes a "-Nl45" flag for the Fortran compiler from way back. This seems not to be recognised by recent compilers, and in fact the one in York seems to re-interpret it as "-l45", i.e. it tries to link a non-existent library. I'm removing the flag ...

ccp4i build

I downloaded the general tcltkblt package from the CCP4 ftp site, and it compiled without problems.

BUT

I have had a problem that the fileviewer misses the first 2 characters of filenames. I finally traced it to the fact that bltwish from blt2.4u has a dodgy glob. Upgrading to blt2.4z cures it!


64-bit solaris build

There is now an option --enable-64-bit in the configure of the ccif library, that will build the 64-bit ABI for the ccif library.

From CCP4 5.0, there is a 64-bit option for the main suite:


   configure sunos64

The LD_LIBRARY_PATH needs careful attention here. For my 5.3 compilers, I had necessary libraries in /usr/lib64 and /usr/ucblib/sparcv9. For the 5.5 compilers, I find I need /usr/local/SunOne/SUNWspro/prod/lib/v9

Building with GNU compilers

CCP4 can be built with GNU compilers rather than the native compilers. This is not a standard configure option, so the config.status file (generated e.g. from a "configure sunos" run) needs to be adjusted manually to set the GNU compilers and the right compiler options. An example is:

#!/bin/sh
# (Generated automatically by configure)
# CCP4 was configured as follows:
libdir="/opt/ccp4-5.0.1/lib"            RANLIB=":" \
FC="/opt/bin/g77"                       FOPTIM="-O3" \
COPTIM="-O"    XFFLAGS="-w -fno-second-underscore -fno-globals -fno-automatic -fPIC" \
XCFLAGS="-w -DG77 -DPROTOTYPE -DHAVE_G2C_H -fPIC"      CC="/opt/bin/gcc" \
LNS="ln -s"                     M4="m4 -D_g77=1" \
XCXXFLAGS="-w  -fPIC"                CXX="/opt/bin/g++" \
CXXOPTIM="-O"   \
M4FLAGS=""    SETFLAGS="amore_FLAGS=' -w -fno-second-underscore -fno-globals -O2' \
  rantan_FLAGS=' -w -fno-second-underscore -fno-globals -O2'  \
  refmac5_FLAGS=' -w -fno-second-underscore -fno-globals -O2'" \
MAKE="make"                     F="f"       \
INSTALL_PROGRAM="/usr/ucb/install -c"   INSTALL_DATA="/usr/ucb/install -m644 -c" \
XLDFLAGS="" \
SHARE_LIB="ld -dy -G -z allextract -z text libmmdb.a -o libmmdb.so; \
  ld -dy -G -z allextract -z text libccp4c.a -o libccp4c.so; \
  ld -dy -G -z allextract -z text libccp4f.a -o libccp4f.so" \
SHARED_LIB_CFLAGS="" \
SHARED_LIB_FFLAGS="" \
SHARE_INST="$(INSTALL_DATA) `pwd`/libmmdb.so $(libdir)/libmmdb.so; $(INSTALL_DATA) `pwd`/libccp4c.so $ \
(libdir)/libccp4c.so; $(INSTALL_DATA) `pwd`/libccp4f.so $(libdir)/libccp4f.so" \
/opt/ccp4-5.0.1/configure --srcdir=/opt/ccp4-5.0.1 --bindir=/opt/ccp4-5.0.1/bin \
 --libdir=/opt/ccp4-5.0.1/lib  --with-shared-libs --with-netlib-lapack \
 --with-x sunos -hush

Notes:
  1. This is build with shared libraries.
  2. This assumes use of Sun ld. You could of course use GNU ld but would have to change associated flags.
  3. You will need to make sure your LD_LIBRARY_PATH picks up the GNU libraries, i.e. it should include /opt/lib in the above example, or it may be /usr/local/lib. This directory will contain libraries such as libstdc++.so
  4. The above includes the option --with-netlib-lapack to force use of the distributed lapack. In a real trial, it got confused and tried to use non-existant sunperf library. This may have been an artefact of the order things were done in.
  5. In the same real trial, the ld line for creating libccp4map.so from libccp4map.a was wrong. It should be
    ld -dy -G -z allextract -z text libccp4c.a -o libccp4c.so
    This may have been an artefact, but if not, edit $CCP4/src/ccp4mapwish_/Makefile appropriately.

CCP4 Execution

  1. Refmac and libcheck sometimes exit with:
    
     Note: IEEE floating-point exception flags raised: 
        Inexact;  Invalid Operation; 
     See the Numerical Computation Guide, ieee_flags(3M) 
    
    
    or similar. ccp4i reports the job as FAILED.

    24/03/04: Compiling with "f77" translates to using f90/f95 in f77 compatibility mode. This sets -ftrap=%none i.e. no IEEE exceptions are trapped. However, ieee_retrospective() is called on program exit, which reports exceptions that are raised, whether or not they are trapped. This seems to give a non-zero exit status to the program, which ccp4i then reports as FAILED. Possible solutions:

    1. Solve the problem that leads to the exception. Not realistic, because the exceptions involved include Underflow and Inexact which are frequent and don't necessarily indicate a problem.
    2. Call ieee_flags("clearall","","", &ieee_out); to explicit clear the exceptions before program exit. If this is done in ccp4_general.c just before calling exit(0), it seems to work.
    3. Assign handler with ieee_handler("set","underflow",SIGFPE_IGNORE); Sun documentation says this will clear the flags, but didn't seem to work for me.
    4. Try using f90/f95 as compiler. Yes, using "f90" seems to work. Do older Sun platforms have f90? Goes back at least to Sun WorkShop 6 update 2 which was 2001.
    Option 4 is currently my preferred option.

Clipper

The Clipper C++ libraries (to be included in CCP4 5.0) will not compile with Sun compilers v5.3 - "incomplete template support" apparently. Compiler version 5.4 is recommended. Compiles for me with version 5.5.

Miscellaneous Problems

General problems are given at CCP4 problems. What follows are SunOS features, quirks, and bugs.
  1. Sun has a command "tplot" at /usr/bin/tplot This conflicts with the procheck program of the same name.
  2. On an older system, the commands whoami and make were not found. I have /usr/ucb/whoami and /usr/xpg4/bin/make.
  3. The path for xmkmf (needed for X-windows programs) on my system is /usr/openwin/bin/xmkmf.