BioNMR
NMR aggregator & online community since 2003
BioNMR    
Learn or help to learn NMR - get free NMR books!
 

Go Back   BioNMR > BioNMR wiki > NMR wisdom
Advanced Search
Home Forums Wiki NMR feeds Downloads Register Today's Posts



Jobs Groups Conferences Literature Pulse sequences Software forums Programs Sample preps Web resources BioNMR issues


Rating: Page Rating: 2 votes, 5.00 average.
Default

NMR wisdom:Compiling and installing MolMol under Linux from Louic S. Vermeer blog

Quote:
with 9 comments
The molmol software that is available from the website of ETH Zurich does not compile on Ubuntu Linux without some changes. It seems that it is no longer supported by ETH Zurich, but can be downloaded from several other websites (just google it). I describe below what I needed to do to get it to compile and run on Ubuntu Linux.
A summary of the installation procedure as described in the readme file follows for reference, but it does not seem to work without the changes mentioned below:

tar xvzf molmol-2k.2.0-doc.tar.gz tar xfzf molmol-2k.2.0-src.tar.gz cd tiff-v3.4 ./configure make sudo make install cd .. cp makedef.lnx makedef ./INSTALL make sed -i 's/ksh/sh/g' molmol cd src/main strip molmol cp molmol ../../molmol.lnx cd ../.. ./molmol

First, some additional packages are needed in Ubuntu:

sudo apt-get install libmotif-dev sudo apt-get install x11proto-print-dev sudo apt-get install libxpm-dev

(depending on your current ubuntu installation, you may need some other packages as well. Some error messages during the installation may give you an indication of what else is needed.)
However, when I tried to compile molmol, the following error occured:

/usr/bin/gcc -I../../tools/include -Dsqrtf=sqrt -Dexpf=exp -Dlogf=log -Dpowf=pow -Dsinf=sin -Dcosf=cos -Dtanf=tan -Dasinf=asin -Dacosf=acos -Datanf=atan -Datan2f=atan2 -Dfabsf=fabs -Dceilf=ceil -O2 -I../../tools/include -Dsqrtf=sqrt -Dexpf=exp -Dlogf=log -Dpowf=pow -Dsinf=sin -Dcosf=cos -Dtanf=tan -Dasinf=asin -Dacosf=acos -Datanf=atan -Datan2f=atan2 -Dfabsf=fabs -Dceilf=ceil -c -o RandNum.o RandNum.c In file included from /usr/include/math.h:94, from RandNum.c:29: /usr/include/bits/mathcalls.h:55: error: conflicting types for ‘acos’ /usr/include/bits/mathcalls.h:57: error: conflicting types for ‘asin’ /usr/include/bits/mathcalls.h:59: error: conflicting types for ‘atan’ /usr/include/bits/mathcalls.h:61: error: conflicting types for ‘atan2’ /usr/include/bits/mathcalls.h:64: error: conflicting types for ‘cos’ /usr/include/bits/mathcalls.h:66: error: conflicting types for ‘sin’ /usr/include/bits/mathcalls.h:68: error: conflicting types for ‘tan’ /usr/include/bits/mathcalls.h:101: error: conflicting types for ‘exp’ /usr/include/bits/mathcalls.h:110: error: conflicting types for ‘log’ /usr/include/bits/mathcalls.h:154: error: conflicting types for ‘pow’ /usr/include/bits/mathcalls.h:157: error: conflicting types for ‘sqrt’ /usr/include/bits/mathcalls.h:179: error: conflicting types for ‘ceil’ /usr/include/bits/mathcalls.h:182: error: conflicting types for ‘fabs’ make[4]: *** [RandNum.o] Error 1

This was easily solved by editing the makedef file as follows:
change

MISSFUNC = -Dsqrtf=sqrt -Dexpf=exp -Dlogf=log -Dpowf=pow \ -Dsinf=sin -Dcosf=cos -Dtanf=tan \ -Dasinf=asin -Dacosf=acos -Datanf=atan -Datan2f=atan2 \ -Dfabsf=fabs -Dceilf=ceil

to

# MISSFUNC = -Dsqrtf=sqrt -Dexpf=exp -Dlogf=log -Dpowf=pow \ # -Dsinf=sin -Dcosf=cos -Dtanf=tan \ # -Dasinf=asin -Dacosf=acos -Datanf=atan -Datan2f=atan2 \ # -Dfabsf=fabs -Dceilf=ceil

At this point, I got a second error

/usr/bin/sleep 2 make[6]: /usr/bin/sleep: Command not found

This one is even easier to solve, by again editing makedef:
change

WAIT = /usr/bin/sleep 2

to

WAIT = /bin/sleep 2

Another error occurs that requires us to make some changes in the source code. The error message is:

/usr/bin/gcc -o molmol -I../../tools/include -I../../sg/include -I../../include -O2 MolMol.o MolInit.o ../../lib/libcip.a ../../lib/libcmd.a ../../lib/libui.a ../../lib/libgraph.a ../../lib/libio.a ../../lib/libpu.a ../../lib/libcalc.a ../../lib/libprim.a ../../lib/libdata.a ../../lib/libattr.a ../../lib/libfileio.a ../../lib/libos.a ../../sg/lib/libsg.a ../../tools/lib/libtools.a -L/usr/X11R6/lib -lXm -lXt -lX11 -lm -lc -lieee ../../lib/libos.a(GFile.o): In function `raiseError': GFile.c.text+0x37): warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in ../../lib/libos.a(GFile.o) /lib/libc.so.6: could not read symbols: Bad value collect2: ld returned 1 exit status make[4]: *** [molmol] Error 1

The following changes to the source-code solved the problem.
Add the following line to the file ./src/os/GFile.c

#include

add it for example under the line that says

#include

Also change the following line (line 85 after the previous edit):

msg = sys_errlist[errno];

to

msg = strerror(errno);

Molmol shoud compile now, but unfortunately the problems are not finished yet. After having stripped and copied molmol from ./src/main to molmol.lnx as in the original instructions, when we try to run it, it says:

MOLMOL 2K.2 Version 2.1-2.6: Copyright (c) 1994-98 by Institut fuer Molekularbiologie und Biophysik, ETH Zurich Spectrospin AG, Faellanden, Switzerland Version 2K.2: Custom version by Reto Koradi, 1999-2003 using Motif/OpenGL unknown IO device

This can be solved by editing the startup script (the file called molmol):
Comment out the following lines (line 192-209):

#if [ -n "$nograph" ]; then # MOLMOLDEV=TTY/NO #elif [ -n "$MOLMOLDEV" ]; then # true # already set #elif [ -n "$localdev" -a \( $display = ":0" -o $display = ":0.0" \) ]; then # MOLMOLDEV=$localdev #elif [ -x $xdpy ]; then # xdpyout=`$xdpy -d $display 2>&1 | egrep 'GLX|unable'` # case $xdpyout in # *unable*) MOLMOLDEV=TTY/NO # nograph=y # continue;; # *GLX*) if [ -n "$glxdev" ]; then # MOLMOLDEV=$glxdev # fi # continue;; # esac #fi





Created by markber, 10-18-2010 at 09:05 AM
Last edited by markber, 10-18-2010 at 09:07 AM
0 Comments, 74,705 Views



Comments for: Compiling and installing MolMol under Linux from Louic S. Vermeer blog Page Tools Search this Page
No one has commented on this article.

Reply


Posting Rules
You may not create new articles
You may not edit articles
You may not protect articles

You may not post comments
You may not post attachments
You may not edit your comments

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


BioNMR advertisements to pay for website hosting and domain registration. Nobody does it for us.



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright, BioNMR.com, 2003-2013

All times are GMT. The time now is 11:05 PM.


Map