Problems when running the program
Problems with building the programIf you don't have the CCP4 suite installed correctly or you don't want to install the whole thing, you must still have some files from it located in sensible places, or you will get the following kind of error;
MOSFLM is looking for two files (environ.def and default.def) which are in the logical directory $CINCL, and these should be obtained from the CCP4 server and installed.PROMPT% ipmosflm Open failed: Unit: 31, File: /net/mars/disk3/noname/environ.def (logical: /net/mars/disk3/noname/environ.def) Last system error message: No such file or directory ipmosflm: Open failed: File: /net/mars/disk3/noname/environ.def Times: User: 0.0s System: 0.0s Elapsed: 0:00
You will also need the file symop.lib which should be in the logical directory $CLIBD, or MOSFLM will stop with an error later in its processing (specifically, when it wants to access Space Group symmetry data, e.g. after autoindexing).
We recommend installing the CCP4 suite, since MOSFLM writes its reflection data to an MTZ file, a binary file which is most easily read by CCP4 programs.
followed by several pages of output. This is caused by an error in the cbf reading routines.*** glibc detected *** mosflm: double free or corruption (!prev): 0x25e759d0 *** ======= Backtrace: ========= /lib/libc.so.6[0x7ab0f1]
The cure is currently to set the environment variable MALLOC_CHECK_ (note the trailing underscore character) to zero. i.e. for csh/tcsh
setenv MALLOC_CHECK_ 0or for sh
MALLOC_CHECK_=0or for ksh/bash
export MALLOC_CHECK_
export MALLOC_CHECK_=0
These problems will show up when the program is being built, not when it is running. Although problems running the program may be due to errors in the build, they are not dealt with in this section.
You may get an error like:
This means that the X11 libraries are not in the location that the build procedure was expecting; this happens because the developers of different Linux distributions think they should be in different places./usr/bin/gfortran -m32 -s -static -static-libgcc control.o mosflm_all_ip_inc.o unoptimizable.o pck.o ctimer.o chelp.o open_socket.o close_socket.o read_socket.o write_socket.o mosflm_jpeg.o matzerr.o hklmanage.o torefix.o bravais_fortran.o cbfwrap.o pilatus_c.o /usr/local/src/mosflm705/lib/DPSLIB.a ../cbf/lib/libcbf.a ../jpg/ libjpeg.a \ -L/usr/local/src/ccp4-6.1.2/lib -lccp4f -lccp4c - lxdl_view -lncurses -L/usr/X11R6/lib -lXt -lSM -lICE -lX11 -ldl -lpthread -lm -o ../bin/ipmosflm /usr/bin/ld: cannot find -lXt collect2: ld returned 1 exit status make[1]: *** [ipmosflm] Error 1 make[1]: Leaving directory `/usr/local/src/mosflm705/mosflm' make: *** [all] Error 2
You can see from the above that the Mosflm build is expecting to find the X11 libraries in "/usr/X11R6/lib"; that's where they would have been traditionally, but newer distributions of Linux put them in /usr/lib/X11 or /usr/lib64/X11, among others.
This can be fixed by editing the "setup" file in the top-level of the build-it-yourself distribution of Mosflm, and change the line that sets the environment variable "X11_LIBS" to reflect where the libraries are on your system.