getting compile error - osx 10.8

110 views
Skip to first unread message

scott stensland

unread,
Oct 19, 2012, 10:36:26 AM10/19/12
to protom...@googlegroups.com
Hi

I'm getting an error on compile
on a very developer friendly osx 10.8.2

cd ~/other_src/ProtoMS/src
make
...
...

Compiling readpdbline.F...

Compiling readresidueoverride.F...

Compiling readresiduetemplate.F...

Compiling readrestart.F...

Compiling readrotamer.F...

Compiling readsurface.F...

Compiling readrestemplateangleline.F...

Compiling readrestemplateatomline.F...

Compiling readrestemplatebackboneline.F...
readrestemplatebackboneline.F:1.49:

subroutine readResTemplateBackboneLine(line,itmpl)
1
Warning: Unused dummy argument 'line' at (1)
make: *** [readrestemplatebackboneline.o] Error 1
~/other_src/ProtoMS/src

any suggestions ?
Scott

Christopher Woods

unread,
Oct 19, 2012, 10:46:06 AM10/19/12
to protom...@googlegroups.com
Hi Scott,

Welcome to the mailing list ;-). I've just downloaded and tried to
compile ProtoMS on OS X 10.8.2 (which is my normal development
machine) and it compiles without problem. The issue seems to be that
your compile is exiting with an error when it encounters a warning.
readrestemplatebackboneline.F is the first file that contains a
(useless) warning, so it is the first file which causes your
compilation to exit.

I compiled using gfortran 4.2.3, with the command line compile flags being;

"fflags = -m64 -O3 -msse2 -mfpmath=sse -I. -fomit-frame-pointer
-ffixed-line-length-none -Wall -Werror"

(these are set in the "makefile" in the "src" directory).

Could you let me know which fortran compiler and fflags you are using?

Cheers,

Christopher
--
---------------------------------------------------------
Christopher Woods
Centre for Computational Chemistry
School of Chemistry
University of Bristol, BS8 1TS, UK
+44 (0) 7786 264562
http://chryswoods.com
http://uk.linkedin.com/in/chryswoods

scott stensland

unread,
Oct 19, 2012, 1:06:01 PM10/19/12
to protom...@googlegroups.com
Chris

   Only Makefile change I made was :

fortrancompiler = gfortran

.... now looking inside Makefile I'm seeing :


fflags = -m64 -O3 -msse2 -mfpmath=sse -I. -fomit-frame-pointer -ffixed-line-length-none -Wall -Werror

      which I did not change and I see it matches your below suggested values. 
      This is a fresh download.

gfortran --version
GNU Fortran (GCC) 4.6.2 20111019 (prerelease)


uname -a
Darwin BAM-024212-SS 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64

          I'm a developer, though not in fortran, so my system is current.
          Other fortran projects like R compile OK.
          Still getting :


make
...
...

Compiling readrestemplateangleline.F...

Compiling readrestemplateatomline.F...

Compiling readrestemplatebackboneline.F...
readrestemplatebackboneline.F:1.49:

      subroutine readResTemplateBackboneLine(line,itmpl)
                                                 1
Warning: Unused dummy argument 'line' at (1)
make: *** [readrestemplatebackboneline.o] Error 1



Scott Stensland

The Devil's boots don't creak - Scottish proverb

Christopher Woods

unread,
Oct 19, 2012, 1:09:35 PM10/19/12
to protom...@googlegroups.com
Hi Scott,

I get the same warning when I compile, but it doesn't cause the
fortran compiler to exit. It shouldn't exit, as fortran warnings like
this are not fatal, and only say that I am not making use of an
argument that I am passing into the subroutine. It may be some strange
new behaviour of gfortran 4.6. Could you remove "-Werror" from the
FFLAGS and see if that makes any difference?

Cheers,

Christopher

scott stensland

unread,
Oct 19, 2012, 1:27:02 PM10/19/12
to protom...@googlegroups.com
Chris

       OK now it compiles when
       removing the error-on-warning flag.
       See attached make output txt file if interested.
       I'm now running simulations just fine - thanks again.

Scott 
make_output.txt

Jola

unread,
Oct 25, 2012, 3:37:57 AM10/25/12
to protom...@googlegroups.com
Hello,

I got the same warnings using
gfortran = GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Linux 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012 i686 i686 i386 GNU/Linux.

since I edited makefile not to include "-Werror", the compilation did not stop at the warnings, but at:
Generating compilation info...
sh: 1: svn: not found
Linking the executable...
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libgfortran.so when searching for -lgfortran
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libgfortran.a when searching for -lgfortran
/usr/bin/ld: cannot find -lgfortran
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libquadmath.so when searching for -lquadmath
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libquadmath.a when searching for -lquadmath
/usr/bin/ld: cannot find -lquadmath
/usr/bin/ld: cannot find -lm
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status
make: *** [../protoms2] Error 1


Hope you could help,
Jola

Jola

unread,
Oct 25, 2012, 4:27:37 AM10/25/12
to protom...@googlegroups.com
I have also tried to compile on Windows, using GNU Make 3.82 Built for i386-pc-mingw32.

I get following error:
"\033[1;32mGenerating compilation info...\033[1;35m"
process_begin: CreateProcess(NULL, python d:\programs\ProtoMS\src\getid.py idme.
inc, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe: *** [../protoms2] Error 2

I hope you could help me,
Jola

Jola

unread,
Oct 25, 2012, 5:32:59 AM10/25/12
to protom...@googlegroups.com
After I updated python to v3.3.0, I get the following:


"\033[1;32mGenerating compilation info...\033[1;35m"
  File "d:\programs\ProtoMS\src\getid.py", line 28
    print "USAGE: getid.py outputfile"
                                                   ^

Jola

Christopher Woods

unread,
Oct 26, 2012, 5:40:26 AM10/26/12
to protom...@googlegroups.com
Hi Jola,

I'm sorry I didn't get back to you yesterday - I was out all day on a
visit and was away from email.

The "getid.py" script is a python 2 script so will not work with
python 3. The script tries to call "svn" (subversion) to determine
which version of ProtoMS is being compiled. If subversion is not
installed, then the script fails gracefully, i.e. it doesn't stop
compilation or cause any problems. You can ignore the "getid.py"
script and you do not have to worry about it not working. While the
Linux install correctly ignored the failed getid.py script, the
windows install didn't. Fortunately, the makefile for ProtoMS has an
option that can be used to disable running of getid.py. The option is;

# If you do not have python2 installed then uncomment the below line
# (you will know that you don't have python2 installed if the compilation
# fails with the error 'getid.py: Command not found', or something similar
#NOPYTHON2 = 1

Simply uncomment "NOPYTHON2 = 1" and this will turn off getid.py. This
should allow your windows installation to continue.

For the Linux install, I think that the errors are caused by
incompatibility between your fortran and C compilers. The fflags for
ProtoMS specify 64 bit compilation;

fflags = -m64 -O3 -msse2 -mfpmath=sse -I. -fomit-frame-pointer
-ffixed-line-length-none -Wall -Werror

but perhaps your libraries are 32bit?

(the -m64 does this). Try removing "-m64" or change it into "-m32".

Also, you may need to turn on static linking, e.g. uncomment the line;

#LFLAGS = -static

Best wishes,

Christopher

Jola Kopec

unread,
Oct 29, 2012, 4:42:22 AM10/29/12
to protom...@googlegroups.com
Dear Christopher,

thank you very much for the email.

I tried the fix for Windows and it worked!

Thank you very much!

Jola

Jola

unread,
Nov 15, 2012, 9:35:55 AM11/15/12
to protom...@googlegroups.com
Dear Christopher,

although the compilation under windows worked, I cannot run any simulations,
since every python script gives errors eg:

d:\programs\ProtoMS2\tutorials\protoms-setup-ligand>run.py 1.00
The syntax of the command is incorrect.
Traceback (most recent call last):
  File "D:\programs\ProtoMS2\tutorials\protoms-setup-ligand\run.py", line 88, in <module>
    sim.writeCommandFile("%s/used-%s.cmd" % (out,count))
  File "../../interfaces\protoms.py", line 113, in writeCommandFile
    f = open(filename,"w")
IOError: [Errno 2] No such file or directory: 'out/lam-1.00/used-0001.cmd'

In the Linux compilation, when I remove -m64 or change it to -m32 I get a long list of similar errors:
/usr/bin/ld: i386:x86-64 architecture of input file `updatesplitmoveresiduelist.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `updatesurfaces.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `updatetotalenergies.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `updateureybradley.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `ureybradleyenergy.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `veclength.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `veclength2.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `vecnormalise.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `volumemove.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `writenumberstring.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `writerestart.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `zeroallpdacont.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `zeropdacont.o' is incompatible with i386 output

collect2: ld returned 1 exit status

Can you help, please?
Jola

Christopher Woods

unread,
Nov 15, 2012, 11:32:17 AM11/15/12
to protom...@googlegroups.com

  Hi Jola,

I am sorry that you are having such trouble running the scripts. Unfortunately, the problem is not in ProtoMS (which works ok and does not need to be recompiled), but in the run.py python script. The tutorial scripts were written to use unix and contributed by the community. They invoke unix commands like "mkdir" etc. to create the directories needed to run the simulation. We have not used ProtoMS on windows before so have not before run into this problem.

You have three solutions;

(1) If you understand python, edit the python script to replace the parts that use non-portable unix commands with the portable python equivalents. e.g. where you see "os.system(cmd)" you should find the windows command to do the job, or use the standard python library to do the job.

(2) Install cygwin. This provides a unix compatibility layer for windows, so os.system() should then work using the python that comes with cygwin.

(3) Ignore the tutorials. The protoms2 executable itself should work ok, as it reads in its command file and works with that. The python scripts just automatically generate different protoms command files that are read and used by protoms. If you go through the manual, you will see that most of the manual describes how to write protoms command files directly, so that you then don't need to use python.

  Best wishes,

  Christopher

Reply all
Reply to author
Forward
0 new messages