Date: 20th July 2005
This is work in progress.
The following instructions were provided to me by Vladimir Guranovic.
Prerequisites
Installation procedure for Cygwin
PDB Applications Preparation/Utilisation
Known Problems
Error from cp when building PDB applications
This is an error of the form:
cp ./bin/connect ./../bin/. cp: `./bin/connect' and `./../bin/./connect' are the same file make[1]: *** [install] Error 1 make[1]: Leaving directory `/vlad-test/pdb-extract-v1.5-prod/connect-v2.2' make: *** [compile] Error 1
The problem is with the version of /usr/bin/cp.exe, and occurs when version 4.1-2 of the "fileutils" package has been installed.
To fix the problem, go to the Cygwin installation and in Packages selection, select "Base". Under "Base", find the "fileutils" package and check the version to be installed. If version 4.1-2 is selected then change it to either an earlier version (4.1-1) or a later one. It appears that this is fixed in later versions of "fileutils".
Using the Cygwin version from within CCP4i
My cursory attempts to do this failed, presumably because it isn't possible to run the Cygwin compiled applications from outside of the Cygwin environment:
This application has failed to start because cygwin1.dll was not found. Re-installing the application may fix this problem.
This is indicative of a wider problem - that the Cygwin-compiled executables require the Cygwin DLLs in order to run.
To do this it is essentially necessary to build executables which do not depend on the Cygwin DLLs.
I considered a number of possible approaches:
None of these were successful. Below I describe what I did, and the problems that I encountered for each.
This is an option available for the Cygwin compilers, which prevents the executables being linked against the GNU libraries in Cygwin - instead they are linked against the MinGW libraries which are provided as part of the Cygwin distribution.
I used notes from http://www.delorie.com/howto/cygwin/mno-cygwin-howto.html which outline what needs to be done, as well as the problems that I encountered.
Essentially, only basic C headers and libraries are provided by default, so there are problems with C++ and Fortran applications. The PDB applications fail to built using this flag, complaining about a missing pwd.h file. It transpires that pwd.h is not part of the ANSI standard, and it doesn't appear that a MinGW version exists at present within Cygwin.
MinGW is "Minialistic GNU for Windows" - see http://mingw.org
I got my initial download from http://nuwen.net/mingw.html and followed the instructions for setting up to work in the DOS environment. It is also possible to use MinGW under Cygwin, by adding the MinGW bin to your path ahead of Cygwin so that the MinGW tools (compilers etc) are used in preference to the Cygwin ones.
This approach has essentially the same problems as described for the -mno-cygwin option above, i.e. the required headers and libraries are not available.
This was suggested by someone on ccp4-dev but failed from the outset because I was unable to install on my laptop. This approach might work if the compilers can be installed.
The installation instructions that I was given can be found at:
The home page for these compilers can be found at Microsoft Visual C++ Developer Center: