Computational Science and Engineering Department |
|
---|
CCP4Home | What is CCP4? | CCP4 Projects | Downloads | Documentation | Courses | Developers | CCP4 people |
---|
From v4.2 Mac OSX is just part of the normal CCP4 build.
Note, it is not advisable to use gfortran 4.0 pre 4.0.2 to compile the ccp4 suite.
If you do not have the SDK it is available from Bill.
Alternatively: if a fink style installation is preferred Bill Scott has produced fink scripts for installing CCP4.
Please note that these are not officially supported and are not compatible with the CCP4 Update mechanism.
The extended tcl/tk required to run ccp4i is available from our Downloads pages, ftp site or fink.
The latest version of tcl/tk is 8.5, however, blt is not under active development so we recommed using tcl 8.4, which requires blt4.2z. Currently blt4.2z is part of the fink stable branch.
Note: bltwish works with X, not aqua, so does not come with AquaTcl. Set CCP4I_TCLTK in ccp4.setup. This is especially required if the tcl and tk libraries are in a non-standard location, such as /sw.
During the first run of ccp4i on a machine, certain initializations are performed, these require write permission to the installation directory.
e-mail: ccb@ccp4.ac.uk
Special thanks to Dr. Michael Love and Dr. Martin Noble
also those brave enough to test out 4.1.1: Derek Logan, William Scott
# find awk executable for myawk in nawk gawk awk do if ( `type $myawk >/dev/null 2>&1` ); then break fi done
diff -r1.10 uniqueify 129,131c129 < if ( `type $myawk >/dev/null 2>&1` ); then < break < fi --- > test -f $myawk && break
%vim big.c static char big[0x10000000]; int main() { return 0; } %cc big.c /usr/bin/ld: /usr/lib/crt1.o relocation overflow for relocation entry 24 in section (__TEXT,__text) (displacement too large) /usr/bin/ld: /usr/lib/crt1.o relocation overflow for relocation entry 29 in section (__TEXT,__text) (displacement too large)
#if defined (__APPLE__) && defined (__GNUC__) && ( __GNUC__ < 3 ) void _carbon_init(int argc, char **argv) {} void _objcInit(void) {} #endif
1815c1815 < tryexts="a so" --- > tryexts="a so dylib"MacOSX uses dylib.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:Darwin:*:*) echo powerpc-apple-Darwin${UNAME_RELEASE} exit 0 ;; . . esacconfig.sub:
case $os in -Darwin*) ;; . . esacthis should get you through the configure at least.
/usr/bin/ld: Undefined symbols: _f__xargc _f__xargv make: *** [ccp4mapwish] Error 1
usr/bin/ld: /usr/lib/crt1.o relocation overflow for relocation entry 33 in section (__TEXT,__text) (displacement too large)
"makefile", line 150: Missing dependency operator "makefile", line 162: Missing dependency operator . .
Failed to run Unix ps -ef command
diff -r1.15 local.tcl 561,563c561,602 < #d_sum Return the output of Unix command ps -ef as a list < #d_desc Execute the ps -ef command and return the output as a list, with \ < each line of output as an element of the list. Returns an empty string \ --- > #d_sum Return the process information from the Unix ps command > #d_desc Determine the possible forms of the "ps" command for the current \ > operating system, then execute using the get_process_list command to \ > return the output as a list (with each line of output as an element of \ > the list). Returns an empty string on error. > # Determine the possible ps commands for this system > global tcl_platform > # Ideally I would prefer to put the tcl_platform(os) value into > # e.g. the "system" array, cf system(OPSYS) for tcl_platform(platform) > # But this is the only place at present that the o/s name is required > # so this should be sufficient for the time being > if { $tcl_platform(os) == "Darwin" } { > # MacOs (Darwin) ps command > set cmd_list [list "|ps lax"] > } elseif { $tcl_platform(os) == "SunOS" } { > # SunOS ps command(s) > # Depends whether you are using BSD ps or not > set cmd_list [list "|ps -ef" "|ps lax"] > } else { > # Default > set cmd_list [list "|ps -ef"] > } > # Call get_process_list for each possible command > # Stop when you find one that works - or run out of possibilities > foreach ps_command $cmd_list { > set process_list [get_process_list $ps_command] > if { $process_list != "" } { > # Got a non-blank list of process info - return > return $process_list > } > } > # All commands failed > return "" > } > > #------------------------------------------------------------- > proc get_process_list { ps_command } { > #------------------------------------------------------------- > #d_sum Execute and return the output of Unix command ps ... > #d_desc Internal command called from GetProcessList. Executes the \ > supplied "ps" command and returns the output as a list, with each \ > line of output as an element of the list. Returns an empty string \ 565c604,607 < if [catch {set input [open "|ps -ef" r] --- > #d_arg ps_command The ps ... command appropriate to this system \ > (normally ps -ef) > # Try to execute the process list command > if [catch {set input [open "$ps_command" r] 568c610 < return "" --- > return ""(P.Briggs)
c*** imgsiz.h c maxpix maximum number of pixels in each direction integer maxpix parameter (maxpix = 700) c***
diff -c -2 -r1.16 local.tcl *** local.tcl 2002/06/18 12:50:19 1.16 --- local.tcl 2002/06/24 13:45:27 *************** *** 97,101 **** --- 97,113 ---- global configure global system + global tcl_platform + # Check that a viewer is set in configure + if { [regexp "^\[ \t\]*$" $configure(HYPERTEXT_VIEWER)] } { + WarningMessage "Cannot open requested URL: + + \"$url\" + + The hypertext viewer command is not set in + the CCP4i configuration window." + return + } + set target {} set remote 0 *************** *** 153,160 **** } else { ! # Command to open requested URL in non-netscape browser set viewer_cmd "exec $configure(HYPERTEXT_VIEWER) $url &" ! } } --- 165,175 ---- } else { ! if { $tcl_platform(os) == "Darwin" } { ! # for IE on make open only opens pages ! set viewer_cmd "exec open -a {$configure(HYPERTEXT_VIEWER)} [lindex [split $url # ] 0 ]" ! } else { # Command to open requested URL in non-netscape browser set viewer_cmd "exec $configure(HYPERTEXT_VIEWER) $url &" ! } } }
control.o: ${F77} ${MOSFLAGS} control.f
XXX.c: 1317: bad macro argument list
Harvest: Cant mkdir HARVESTHOME/DepositFiles/gaba - no deposit file
patch library.c < library.c.patch
then remake libccp4.a, scala and refmac5
ln -s /sw/bin/g77 /usr/bin/g77 ln -s /sw/include/g2c.h /usr/include/g2c.h ln -s /sw/lib/libg2c.a /usr/lib/libg2c.a
Darwin) XLAPACK_LIB="-framework vecLib" LAPACKLIB="vecLib" noblas=yes trylapack= tryblas=( thanks to Markus Meier )
csh% limit stacksize 65536 sh$ ulimit -s 65536
Dear Phil et al: g77 3.4 and either gcc 3.1 or 3.3 will work to compile ccp4, but I had to make a few changes... Briefly, you now need to include explicitly the flag -lcc_dynamic in order to get g77 3.4 to work, and if you link to apple's frameworks, the syntax used to do so has changed. In the configure file, I added this along with new (different syntax) flags to get ccp4 to use Apple's blas/lapack libs: Add this to the configure file after line 1815: Darwin) XLAPACK_LIB="-lcc_dynamic -Wl,-framework -Wl,vecLib" LAPACKLIB="-lcc_dynamic -Wl,-framework -Wl,vecLib" noblas=yes trylapack= tryblas= ;; THEN, I also had to ensure that the x-windows makefiles contained this. This, along with one other fix that has been required since 10.2, can be done as follows in the tcsh: source include/ccp4.setup .../configure --with-x Darwin # additional ugly hacks to get X-windows programs to compile perl -pi -e 's/EXTRA_LOAD_FLAGS = -lg2c//g' x-windows/XCCPJIFFY/Imakefile foreach distmakefile ( `find -iname Makefile | grep x-windows` ) perl -pi -e 's/-lxdl_view/-lxdl_view -lcc_dynamic/g' $distmakefile perl -pi -e 's/-lXt/-lXt -lcc_dynamic/g' $distmakefile perl -pi -e 's/-L\/usr\/X11R6\/lib/-L\/usr\/X11R6\/lib -lcc_dynamic/g' $distmakefile end # now fix the one I just broke perl -pi -e 's/dynamicextra/dynamic -lxdl_viewextra/g' x-windows/Rotgen/Makefile # make make install make clean If you want fink to do the dirty work for you, download this: http://www.chemistry.ucsc.edu/~wgscott/xtal/ccp4.info This file will also now install a ccp4.setup file that places well with bash and zsh.
Apply the following patches to EditString.c and log_file.c. Recompile and install xloggraph.( thanks to Markus Meier )
1. edit beast_/sizes.fh PARAMETER (MAXTHREAD=2) 2a. edit src/Makefile to add -qsmp=omp and use xlf_r compiler 2b. recompile 3. set OMP_NUM_THREADS environmental variable to 2
The simplest solution is to add the other compilers library path to xlf.cfg or vac.cfg
/etc/opt/ibmcmp/xlf/8.1/xlf.cfg 108c108 < libdirs = -L/opt/ibmcmp/xlsmp/1.4/lib,-L/opt/ibmcmp/xlf/8.1/lib,-L/opt/ibmcmp/vac/6.0/lib --- > libdirs = -L/opt/ibmcmp/xlsmp/1.4/lib,-L/opt/ibmcmp/xlf/8.1/lib /etc/opt/ibmcmp/vac/6.0/vac.cfg 111c111 < libdirs = -L/opt/ibmcmp/xlsmp/1.4/lib,-L/opt/ibmcmp/vac/6.0/lib,-L/opt/ibmcmp/vacpp/6.0/lib --- > libdirs = -L/opt/ibmcmp/xlsmp/1.4/lib,-L/opt/ibmcmp/vac/6.0/lib,-L/opt/ibmcmp/vacpp/6.0/lib,-L/opt/ibmcmp/xlf/8.1/lib
[address=437ffffc pc=00380318] /Users/shared/ccp4-5.0-beta/src/molrep_/molrep_prog.f: In subroutine `calcrs_asc': In file included from /Users/shared/ccp4-5.0-beta/src/molrep_/molrep_prog.f:0: /Users/shared/ccp4-5.0-beta/src/molrep_/molrep_prog.f:26870: internal compiler error: Segmentation Fault
From: Bill Scott
I wrote a fairly simple-minded shell-script to try to deal with getting it all to compile. Basically, it relies on having the dependencies installed in /sw, but this will install into /usr/local/ccp4/ccp4-5.0 (unless you edit the script). It does some sanity checks, then downloads and tries to compile everything. Then it checks to see if refmac, sapi and sfcheck, (I have different results on different computers that should behave identically), and if they are not there, it makes a second attempt at compiling using different optimizations that at least for me got around the problem. If you or anyone knows of others, please let me know, and I will add these. So, in short, this doesn't mess with the optimizations unless it needs to. I configure --with-x Darwin only, but feel free to experiment. You can download the shell script here: http://www.chemistry.ucsc.edu/%7Ewgscott/xtal/ccp4_install.zsh Save it as a text file (zsh suffix) and chmod a+x ccp4_install.zsh, and run it from anywhere like this: sudo ccp4_install.zsh It will make the directories and download the tarball for you.
From: Jianghai Zhu
Fink just update g77 in 10.3 tree. I don't know about 10.2 tree. The new version of g77 is not experimental anymore. Reading specs from /sw/lib/gcc/powerpc-apple-darwin7.3.0/3.4.0/specs Configured with: ../gcc-3.4.0/configure --prefix=/sw --enable-languages=f77 --infodir=/share/info --libexecdir=/lib --disable-shared Thread model: posix gcc version 3.4.0 I used this new g77 to compile ccp4 5.0. All those problems are gone. Everything went fine. I configured it as "./configure --with-x --with-shared-libs --with-netlib-lapack --with-fftw=/sw/lib Darwin". I even changed the optimization level of molrep and refmac5 to -O2. Molrep and Refmac5 can be compiled with no error.
ld: Undefined symbols: _acosf _atanf make: *** [rotgen] Error 1This is traced to libjwc_c module rdm.c and the system maths functions. The maths functions are declared in /usr/include/math.h and defined in /usr/lib/libm.dylib->libSystem.dylib . This only contains symbols acos and atan.
#if defined (__APPLE__) && defined (__GNUC__) && ( __GNUC__ == 3 ) && (__GNUC_MINOR__ == 1) float acosf(float x) { return (float) acos( (double) x); } float atanf(float x) { return (float) atan( (double) x); } float asinf(float x) { return (float) asin( (double) x); } #endif
/usr/bin/ld: warning prebinding disabled because of undefined symbols /usr/bin/ld: Undefined symbols: restFP saveFP collect2: ld returned 1 exit status
/bin/sh ./mkinstalldirs /sw/share/xtal/ccp4-5.0/lib /bin/sh ./libtool --mode=install /usr/bin/install -c libjwc_f.la /sw/share/xtal/ccp4-5.0/lib/libjwc_f.la /usr/bin/install -c .libs/libjwc_f.0.dylib /sw/share/xtal/ccp4-5.0/lib/libjwc_f.0.dylib install: .libs/libjwc_f.0.dylib: No such file or directory make[1]: *** [install-libLTLIBRARIES] Error 71 make: *** [install-am] Error 2
retrieving revision 1.18 retrieving revision 1.19 diff -r1.18 -r1.19 13547c13547 < if $CC -v conftest.$ac_ext -o conftest$ac_exeext 2>&1 | grep 'Apple' >/dev/null || $CC -v conftest.$ac_ext -o conftest$ac_exeext 2>&1 | grep 'powerpc_apple_darwin' >/dev/null; then --- > if $CC -v conftest.$ac_ext -o conftest$ac_exeext 2>&1 | grep 'Apple' >/dev/null || $CC -v conftest.$ac_ext -o conftest$ac_exeext 2>&1 | grep 'powerpc-apple-darwin' >/dev/null; then
(thanks to Mischa Machius for spotting this)
Data line--- RANGE 'A 6.' 'A 30.' ALL 1525-005 The formatted I/O statement on the internal file cannot be completed because the end of the record was reached. The program will recover by ignoring the remaining data items in the I/O statement.
###### TLS Group Definitions ###### Group: 1: No. of pieces: 1 Chain: A Span: -1 -1and the TLS results will all be 0.
diff -r1.11 tls_newdic_non.f 622c622 < READ(RANGEFROM(2:IDOT-1),'(I19)') ITLSGRP_FROM(IPIECE,IGR) --- > READ(RANGEFROM(2:IDOT-1),*) ITLSGRP_FROM(IPIECE,IGR) 629c629 < READ(RANGETO(2:IDOT-1),'(I19)') ITLSGRP_TO(IPIECE,IGR) --- > READ(RANGETO(2:IDOT-1),*) ITLSGRP_TO(IPIECE,IGR)
csh% setenv XLFRTEOPTS buffering=disable_preconn
[ccp4m:/Users/Shared/ccp4-5.99.3] ccb% setenv CC gcc-3.3 [ccp4m:/Users/Shared/ccp4-5.99.3] ccb% setenv CXX g++-3.3 [ccp4m:/Users/Shared/ccp4-5.99.3] ccb% setenv FC g77 [ccp4m:/Users/Shared/ccp4-5.99.3] ccb% sudo gcc_select 3.3 -root Default compiler has been set to: gcc version 3.3 20030304 (Apple Computer, Inc. build 1809) [ccp4m:/Users/Shared/ccp4-5.99.3] ccb% configure --with-x Darwin
One last reason you may be confused is that there is sometimes (but not always) a bug that occurs when linking C++ and C code on account of C++ using version 3.3 and C using version 4.0. When you link C and C++ code together, you must use the C++ compiler since C doesn"t know about the stdc++ runtime library. But g++-3.3 (which is the same as g+ + and c++ for fink packages) doesn"t know about certain new gcc-4.0 features. If your packages doesn"t experience a problem linking C and C++ code together, then you don"t have to worry about this. On the other hand, if it does, you"ll see this: ld: Undefined symbols: _fprintf$LDBLStub ... In that case, you need to add -lSystemStubs to the compilation command.
ld: multiple definitions of symbol ___umoddi3 /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/libgcc.a(_umoddi3.o) private external definition of ___umoddi3 in section (__TEXT,__text) /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_umoddi3_s.o) definition of ___umoddi3 /usr/bin/libtool: internal link edit command failed
*** configure 21 Feb 2006 11:30:43 -0000 1.374 --- configure 22 Feb 2006 15:21:00 -0000 *************** *** 2115,2119 **** if test "$shared_lib" = yes; then SHARED_LIB_CFLAGS=${SHARED_LIB_CFLAGS:-'-fPIC -fno-common'} ! SHARE_LIB='${CXX} -dynamiclib -flat_namespace -undefined suppress ${SHARED_LIB_CFLAGS} -install_name libmmdb.dylib -all_load libmmdb.a -o libmmdb.dylib -lstdc++ ; ${CC} -dynamiclib -flat_namespace -undefined suppress ${SHARED_LIB_CFLAGS} -install_name libccp4c.dylib -all_load libccp4c.a -o libccp4c.dylib' SHARE_INST='${INSTALL_DATA} `pwd`/libmmdb.dylib ${libdir}/libmmdb.dylib; ${INSTALL_DATA} `pwd`/libccp4c.dylib ${libdir}/libccp4c.dylib' fi --- 2115,2119 ---- if test "$shared_lib" = yes; then SHARED_LIB_CFLAGS=${SHARED_LIB_CFLAGS:-'-fPIC -fno-common'} ! SHARE_LIB='${CC} -dynamiclib -flat_namespace -undefined suppress ${SHARED_LIB_CFLAGS} -install_name libmmdb.dylib -all_load libmmdb.a -o libmmdb.dylib; ${CC} -dynamiclib -flat_namespace -undefined suppress ${SHARED_LIB_CFLAGS} -install_name libccp4c.dylib -all_load libccp4c.a -o libccp4c.dylib' SHARE_INST='${INSTALL_DATA} `pwd`/libmmdb.dylib ${libdir}/libmmdb.dylib; ${INSTALL_DATA} `pwd`/libccp4c.dylib ${libdir}/libccp4c.dylib' fi
*** configure 16 Feb 2006 14:49:33 -0000 1.373 --- configure 21 Feb 2006 11:28:28 -0000 *************** *** 4068,4095 **** # for g77 3.1 some builds do not have no-common for system libs, # so disable for now case $system in ! Darwin ) ! cat >conftest.f <<_ACEOF ! int main () ! { ! ; ! } ! _ACEOF ! if test $FC = g77 && $FC -v conftest.f -o conftest 2>&1 | grep '3.1' >/dev/null ; then ! echo "configure --disable-shared --libdir=${libdir}" ! ( touch /tmp/$$.cache_file 2>/dev/null && \ ! cat /dev/null > /tmp/$$.cache_file && \ ! ./configure --disable-shared --libdir=${libdir} --cache-file=/tmp/$$.cache_file ) || \ ! ./configure --disable-shared --libdir=${libdir} ! else ! echo "configure $xopts --libdir=${libdir}" ! ( touch /tmp/$$.cache_file 2>/dev/null && \ ! cat /dev/null > /tmp/$$.cache_file && \ ! ./configure $xopts --libdir=${libdir} --cache-file=/tmp/$$.cache_file ) || \ ! ./configure $xopts --libdir=${libdir} ! fi ! ;; ! Darwin_ibm_compilers ) echo "configure --disable-shared --libdir=${libdir}" ( touch /tmp/$$.cache_file 2>/dev/null && \ cat /dev/null > /tmp/$$.cache_file && \ --- 4068,4074 ---- # for g77 3.1 some builds do not have no-common for system libs, # so disable for now case $system in ! Darwin_ibm_compilers | Darwin ) echo "configure --disable-shared --libdir=${libdir}" ( touch /tmp/$$.cache_file 2>/dev/null && \ cat /dev/null > /tmp/$$.cache_file && \
Grid...Nuvw = ( 216, 216, 162) doing fft... coot(26854) malloc: *** error for object 0x97ffe00: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug coot(26854) malloc: *** set a breakpoint in szone_error to debug
*** scala.f 29 Nov 2006 10:48:12 -0000 1.101.2.4 --- scala.f 22 Mar 2007 11:40:15 -0000 *************** *** 22428,22433 **** --- 22428,22434 ---- c Print scale factors call prtscl c + if (ldump) close (unit=lundmp) c end c
For binaries, the scala_ppc ( compiled for g4, but will work on g5) can replace that in /usr/local/ccp4-6.0.2/bin.
Yes, that is a general "problem" with sudo, with the latest version distributed in OS X. Briefly, sudo (and I have noticed other programs, like screen) don't inherit the environment, so sudo ccp4i no longer works. sudo -s spawns a root shell. Then you can source the environment file, and then it will all work.
If this represents a serious problem, you can try the following (at your own risk): comment out this line in /etc/sudoers: Defaults env_reset Some sort of reboot/logout might be required for it to go into effect.(thanks to Bill Scott and Ian Ollmann for the workarounds)
rm -rf ccp4-6.0.2.mpkg
$ cd $CCP4_BIN $ for file in `ls | grep -v class` ; do otool -L $file | grep -q /usr/local ; if [ $? -eq 0 ]; then echo $file ; otool -L $file | grep local ; fi ; done $ for file in `ls | grep -v class` ; do install_name_tool -change /usr/local/lib/libstdc++.6.dylib /usr/lib/libstdc++.6.dylib $file ; done(thanks to Ben Eisenbraun for spotting this)
KeyError: 'CCP4_BIN'
export CCP4_BIN=${CBIN}or, to ccp4.setup-csh
setenv CCP4_BIN ${CBIN}after the CBIN definitions
*** script 2010-06-11 10:26:43.000000000 +0100 --- script 2010-06-11 10:27:09.000000000 +0100 *************** *** 159,164 **** --- 159,165 ---- GUILE_LOAD_PATH=\ $COOT_PREFIX/share/guile/1.6:$COOT_PREFIX/share/guile:$COOT_PREFIX/share/guile/gtk-2.0:$COOT_PREFIX/share/guile/gui:$COOT_PREFIX/share/guile/www:$COOT_PREFIX/share/guile/site GUILE_WARN_DEPRECATED=no + source /Applications/ccp4-6.1.13/bin/ccp4.setup-sh if [ -n "$LOCAL_GUILE_LOAD_PATH_EXTRAS" ] ; then GUILE_LOAD_PATH=${LOCAL_GUILE_LOAD_PATH_EXTRAS}:$GUILE_LOAD_PATHusing the correct path to the ccp4.setup-sh file.
unset F_UFMTENDIANin the ccp4.setup files.
(thanks to William Nicholson)
cp $CCP4/share/ccp4i/bin/check_zero_res.py $CCP4/bin/check_zero_res.py
(thanks to Raj Pannu)