haddocking / haddock3

Official repo of the modular BioExcel version of HADDOCK
https://www.bonvinlab.org/haddock3
Apache License 2.0
101 stars 33 forks source link

[CNS Complie] Makefile Error, CNS_ARCH blank #915

Closed jh2ee closed 3 months ago

jh2ee commented 3 months ago

Hi, I got an error occurred while compiling CNS.

When I try to do make install compiler=gfortran I got an Error

Ambiguous output redirect.
MACHINE=: Command not found.
MACHINE=unknown: Command not found.
Badly placed ()'s.
RELEASE=: Command not found.
RELEASE=unknown: Command not found.
Badly placed ()'s.
SYSTEM=: Command not found.
SYSTEM=unknown: Command not found.
Badly placed ()'s.
VERSION=: Command not found.
VERSION=unknown: Command not found.
RELEASE: Undefined variable.
something is wrong with the machine architecture - CNS_ARCH is blank
type unsetenv CNS_ARCH and then make install
make: *** [Makefile:38: install] Error 1

I'm trying to run haddock in wsl2 ubuntu 20.04. I already tried to run Makefile with csh shell but it doesn't work too.

amjjbonvin commented 3 months ago

Did you follow the instructions on https://www.bonvinlab.org/haddock3/CNS.html (we updated those)

jh2ee commented 3 months ago

Did you follow the instructions on https://www.bonvinlab.org/haddock3/CNS.html (we updated those)

um.. I'm not sure which instruction are you talking about. I already tried Makefile trouble shooting section but this didn't work for me. And I also tried to compile in csh and bash, but not works..(I set the environment variables CNS_ARCH, CNS_SOLVE correctly)

amjjbonvin commented 3 months ago

From step3 on in the link I just gave you…

Check in particular if your architecture is recognised.

And follow all the steps/instructions.

jh2ee commented 3 months ago

I already tried that step to.. Currently I re-copied the haddock's cns files. I think there were some problems when I copy the files.

But I got these error again

Installation directory: /bin/cns_solve_1.3/intel-x86_64bit-linux
copying files in instlib directory intel-x86_64bit-linux to intel-x86_64bit-linux
0read.me
Makefile.header.1.ifort
Makefile.header.2.gfortran
Makefile.header.3.ifort_mp
Makefile.header.4.pgf95
Makefile.header.5.ifort_mp_profile
Makefile.header.6.ifort_mp_tcheck
Makefile.header.7.gfortran_mp
arch_env
machine_c.c
machine_f.f
Using Makefile template for compiler: gfortran
then^M: Command not found.
endif^M: Command not found.
then^M: Command not found.
endif^M: Command not found.
then^M: Command not found.
endif^M: Command not found.
making source directory in intel-x86_64bit-linux
making bin directory in intel-x86_64bit-linux
making utils directory in intel-x86_64bit-linux
making test directory in intel-x86_64bit-linux
linking source files to intel-x86_64bit-linux/source
linking machine_f.f to source directory
linking machine_c.c to source directory
endif^M: Command not found.
endif^M: Command not found.
then^M: Command not found.
endif^M: Command not found.
linking optimized fft file to source directory
removing link for /bin/cns_solve_1.3/intel-x86_64bit-linux/source/fft.f
linking ../../source/fft.f to source directory
making Makefile in source directory

endif^M: Command not found.
endif^M: Command not found.
then^M: Command not found.
endif^M: Command not found.
making compiler-test directory in intel-x86_64bit-linux
testing Fortran and C compilers
 ompiling: gcc -O -DINTEGER='long int' -DCNS_ARCH_TYPE_LINUX
C compiler passes test
 -funroll-loops -ffast-math -static   8 -w  -fallow-argument-mismatch -O3
: No such file or directory
gfortran: error: unrecognized command line option ‘-fallow-argument-mismatch’; did you mean ‘-Wno-argument-mismatch’?
linking: gfortran -w  -static-libgfortran
gfortran: error: test_f.o: No such file or directory
/bin/sh: 1: ./test_f: not found
***** ERROR: problem with Fortran compiler *****
make[3]: *** [Makefile:18: fortran-test] Error 2
make[2]: *** [Makefile:205: compiler-test] Error 2
make[1]: *** [Makefile:68: compiler-test] Error 2
compiler problems - stopping installation
please check compilers before retrying installation
make: *** [Makefile:38: install] Error 1

I created Makefile.header.6.gfortran but not works either.

amjjbonvin commented 3 months ago

What are you exactly doing as commands? Please list all commands you are giving

Which version of gfortran do you have?

What does the getarch (refer to the online instructions) command give as output?

jh2ee commented 3 months ago

I got these errors when I try to compile. The command I used : make install compiler=gfortran I was following all distructions in https://www.bonvinlab.org/haddock3/CNS.html (1,2 and 3). But I got errors in no.4, Compiling CNS.

My gfortranversion

$ gfortran --version
GNU Fortran (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And my getarchoutput

$ ./getarch
intel-x86_64bit-linux

I'm currently working on wsl2 Ubuntu 20.04 and set the environment with docker.

++) I updated my gfortran to ver 10.5.0 but same error occurs

GNU Fortran (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
jh2ee commented 3 months ago

I resolved my issue.