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

Know problems on AIX platforms

Goto:


Installation problems for CCP4 5.0.* under AIX 5.2

This section is based on tests done on an AIX 5.2 system using C/C++ Compiler for AIX Version 6 and Fortran Compiler for AIX Version 7.

There appears to be a choice of compiler interfaces, namely /usr/vac/bin/xlc or /usr/vac/bin/cc. The CCP4 configure chooses the former. However, the latter supports extended mode so it can handle most of the C statements compared with xlc which can only handle the ANSI C statement. See configuration file at /etc/vac.cfg.

There is a utility /usr/vacpp/bin/makeC++SharedLib which may be useful for making shared libraries. But I've not tried it.

In summary, CCP4 has been built using:

configure --with-shared-libs --with-x --with-netlib-lapack --disable-mapslicer --disable-pdb_extract aix

There are changes to the following files:

$CCP4/configure
$CCP4/lib/src/ccp4_sysdep.h
$CCP4/lib/src/library_f.c
$CCP4/lib/src/binsortint.c
$CCP4/lib/src/unix.m4
$CCP4/lib/ccif/library.h
$CCP4/lib/data/Makefile.in
$CCP4/src/acorn.f
$CCP4/src/solomon_/cmsk_io.c
A tarball of updated files can be found here.

This compiles all the main programs, and some of the x-windows programs. Missing programs include Rasmol, Rotgen and xloggraph. There are fixes to Mosflm below, but they are not yet included in the above tarball.

  1. MAPSLICER and PDB_EXTRACT configure steps failed. Currently disabled with --disable-mapslicer and --disable-pdb_extract
  2. Biggest problem is whether or not to append an underscore to Fortran symbols. There is great inconsistency here within the suite. I have decided to standardise on no underscore. This means the following changes:
    • $CCP4/lib/src/ccp4_sysdep.h - make AIX to be CALL_LIKE_HPUX
    • $CCP4/lib/src/library_f.h - don't add underscore to gerror
    • $CCP4/lib/src/binsortint.c - change _AIX to be like __hpux
    • $CCP4/lib/ccif/library.h - make AIX to be CALL_LIKE_HPUX
  3. But ltime in $CCP4/lib/src/unix.m4 does need underscore adding.
  4. There is an AIX-specific definition of isatty_ in $CCP4/lib/src/library_f.c around line 678. This compiles under /usr/vac/bin/cc but not under /usr/vac/bin/xlc. For the latter, the definition needs to be replaced by
        #ifdef _AIX
        int isatty_ (int *fd) {
          return(isatty(*fd));
        }
        #endif
    
  5. Creation of shared libraries produces the error:
        ld -G -bnoentry -bexpall libmmdb.a -o libmmdb.so; ld -G -bnoentry
        -bexpall libccp4c.a -o libccp4c.so; ld -G -bnoentry
        -bexpall libccp4f.a -o libccp4f.so
        ld: 0711-244 ERROR: No csects or exported symbols have been saved.
        make: 1254-004 The error code from the last command is 8.
    

    Solution appears to be to add the option -bnogc to SHARE_LIB in configure to turn off garbage collection.

  6. There is a problem with Solomon:
        eval /usr/vac/bin/xlc -I/home/liao1k/ccp4/martyn/ccp4-5.0.2/src/solomon_
        -I/home/liao1k/ccp4/martyn/ccp4-5.0.2/lib/src ${solomon_FLAGS-"-O "} -c
        -o cmsk_io.o /home/liao1k/ccp4/martyn/ccp4-5.0.2/src/solomon_/`basename
        cmsk_io.o .o`.c
        "/home/liao1k/ccp4/martyn/ccp4-5.0.2/src/solomon_/cmsk_io.c", line
        941.7: 1506-343 (S) Redeclaration of strncasecmp differs from previous
        declaration on line 274 of "/usr/include/string.h".
    

    Solution is to exclude definition of strncasecmp for AIX.

  7. The presence of C++ libraries mean that the Fortran programs compiled with xlf need to be told to link in C++ and maths libraries.

    Add "-lC -lm" to XLDFLAGS in configure

  8. On the test system at least, there is a /lib/libessl.a which has BLAS symbols. There are changes to configure to find this library.
  9. The Makefile in $CCP4/lib/data gets confused by the .PHONY target - it ends up making all the targets listed there. Hence it makes "clean" and removes the fontpack executable it just made!

    Solution is to move the .PHONY target in $CCP4/lib/data/Makefile.in to below the first real target.

  10. acorn compilation complains about duplicate CELL. Rename ACORN common block.
  11. Problems with Mosflm compilation:
    • Mosflm/mosflm/control - ran out of resources. So I dropped the optimisation level.
    • Mosflm/mosflm/mosflm_all_ip_inc.for - doesn't like the suffix. Changed to mosflm_all_ip_inc.f
    • Mosflm/mosflm/pck.c - doesn't like redefinition of "abs". Commented out the #define statement. Also doesn't add underscore to "openfile"
    • Mosflm/mosflm/chelp.h - Need to #include rather than otherwise get various syntax errors.
    • Mosflm/src/dps/util, Mosflm/src/dps/util/fftpack, Mosflm/src/dps/util/filec,Mosflm/src/dps/index - "AR = ar r" needs adding.
    • Mosflm/src/dps/util/filec/rdbinary.c - Need to remove "#include "
    • Mosflm/index/Makefile - doesn't like use of empty TIDY. And need to add AR_FLAGS = r for creating DLSLIB.a

September 2004
Thanks to Kexiao Liao for testing and providing feedback.


Installation problems for CCP4 4.0.* under AIX 4.3.3

There are a number of problems installing CCP4 4.0.* on AIX 4.3.3:

Directory File(s) Problem(s)
[top] configure -qfixed=80n flag required for xdlmapman [Also adds --with-x option for AIX!]
lib/src/ library.c missing semicolons
unix.m4 only ltime_ is defined for AIX, not ltime
lib/ccif/ cifdic_to_symtab.c fixed problems with postfix "_" character plus preprocessor directives
f_interface.c
lib_dic2tab.c
src/ detwin.f extraneous commas removed
truncate.f
src/topp_/ autosnd.f extraneous commas removed
"disp" changed to "status" in close statements
topp.f
x-windows/ Makefile.in extra flag required for xdlmapman (see configure fix)
x-windows/ipdisp/src ipdisp.f change "-8" to "(-8)"
new definitions for AIX required
dskio.c

These fixes have been incorporated into later versions of CCP4.

The fixes were tested on AIX 4.3.3 with XL Fortran for AIX version 6.1 and IBM C for AIX version 3.6.6.

Thanks to Sandra McLaughlin for providing the fixes.

23/03/00