Error compiling ctffind-4.1.5
Forums
Hello,
I am trying to compile the latest version of ctffind on a CentOS-7 Linux box. I got this error:
[root@mybox ctffind-4.1.5]# make
g++ -DPACKAGE_NAME=\"ctffind\" -DPACKAGE_TARNAME=\"ctffind\" -DPACKAGE_VERSION=\"4.1.5\" -DPACKAGE_STRING=\"ctffind\ 4.1.5\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"ctffind\" -DVERSION=\"4.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -Dwx_is_available=1 -I. -I/usr/local/software/relion/wxWidgets-3.1.0/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/software/relion/wxWidgets-3.1.0/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -DwxUSE_GUI=0 -DNDEBUG -funroll-loops -O3 -Wall -pipe -fexpensive-optimizations -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/usr/local/software/relion/wxWidgets-3.1.0/lib/wx/include/gtk2-unicode-3.1 -I/usr/local/software/relion/wxWidgets-3.1.0/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -DwxUSE_GUI=0 -DNDEBUG -funroll-loops -O3 -Wall -pipe -fexpensive-optimizations -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -MT ctffind-ctffind.o -MD -MP -MF .deps/ctffind-ctffind.Tpo -c -o ctffind-ctffind.o `test -f 'src/programs/ctffind/ctffind.cpp' || echo './'`src/programs/ctffind/ctffind.cpp
In file included from src/programs/ctffind/ctffind.cpp:1:0:
src/programs/ctffind/../../core/core_headers.h:59:32: fatal error: refinement_package.h: No such file or directory
#include "refinement_package.h"
^
compilation terminated.
make: *** [ctffind-ctffind.o] Error 1
It seems to me that refinement_package.h should come with the distribution, but it is actually not present.
Thank a lot for any help you could provide
C
Hi, Alexis will be able to
Hi,
Alexis will be able to give you a proper answer to this in the future, I suspect he may have to create a new distribution package.
In the meantime however, you should be able to just delete the line "#include refinement_package.h" from the "core/core_headers.h" to continue the compilation.
Do the binaries not work for you?
Thanks,
Tim
Hi, I have installed the
In reply to Hi, Alexis will be able to by timgrant
Hi,
I have installed the binaries. I will test them.
Thanks
C
Compiling ctffind-4.1.5/MacOSX
Compiling on MacOS results in the following error regarding a missing refinement package.
In file included from src/programs/ctffind/ctffind.cpp:1:0:
src/programs/ctffind/../../core/core_headers.h:60:24: fatal error: refinement.h: No such file or directory
#include "refinement.h"
Commenting "refinement.h" and "refinement_package.h" in core_headers.h produces more errors. I
I will fix this in the next
In reply to Compiling ctffind-4.1.5/MacOSX by marmon23
I will fix this in the next couple of weeks. In the meantime, please use the distributed binaries.
Alexis
would like 4.1.5 source for refinement_package.h, refienement.h
Just FYI - seeing the same thing trying to build the 4.1.5 source on the Mac,
In file included from src/programs/ctffind/ctffind.cpp:1:0:
src/programs/ctffind/../../core/core_headers.h:59:32: fatal error:
refinement_package.h: No such file or directory
#include "refinement_package.h"
.... removing refinement_package.h from the source file, then
errors out on the next include not being present,
refinement.h,
In file included from src/programs/ctffind/ctffind.cpp:1:0:
src/programs/ctffind/../../core/core_headers.h:59:24: fatal error:
refinement.h: No such file or directory
#include "refinement.h "
any updates?
Hi all,
I've been trying to compile ctffind4 as well and ran into the same problems described by this thread. not sure if the distribution has been fixed yet.. has it?
Liz
Hi Liz, Have you tried the
In reply to any updates? by lizkellogg
Hi Liz,
Have you tried the binaries? In most cases they will be faster than compiling yourself. The binaries can be downloaded as the ctffind-4.1.5-linux64.tar.gz package.
If you are intent on compiling yourself, you can remove lines 59-62 from the src/core/core_headers.h.
these lines should read :-
#include "refinement_package.h"
#include "refinement.h"
#include "database.h"
#include "project.h"
after removing these lines, the compilation should proceed.
Thanks,
Tim
Hi Tim thanks for the
In reply to Hi Liz, Have you tried the by timgrant
Hi Tim
thanks for the response. I actually would like to get the code compiled from source rather than using the binaries.. but maybe I'll have to wait until Alexis remakes the distribution because I keep running into errors.
I've tried commenting out the lines you suggested, but I keep running into another issue with fftw3 libraries. I installed version 3.3.5 and the C++ compiler errors (for ctffind) are always something like this: "error: function cannot return array type 'fftwf_complex' " which I take to be an issue with C++ return values (in that you cannot return an array of numbers from a function call, you have to return a pointer to the array). Obviously the code works so I'm not sure what I'm missing.. wrong fftw library? incomplete typedefs?
Hi Liz, Just out of interest,
In reply to Hi Tim thanks for the by lizkellogg
Hi Liz,
Just out of interest, why do you want to compile from source rather than use binaries?
That error is caused when using include files form older gcc versions. I have actually fixed it in the latest version of the code, but it is still present in this ctffind distribution. If you can compile with a new gcc this error shouldn't happen. I just tested with 4.8.3 and it worked fine.
Thanks,
Tim
Hi Tim, I just want to start
In reply to Hi Liz, Just out of interest, by timgrant
Hi Tim,
I just want to start exploring the CTFFIND code in more detail.. I find that I can understand code best when I can tinker with it...
so purely out of curiosity. thanks for the tip. I'll try it.
Liz
Still failing comping ctffind
In reply to Hi Liz, Just out of interest, by timgrant
Hi Tim,
Liz again here. I tried upgrading to gcc 4.8.5 and it seems it's becoming a little bit of a toolchain nightmare on Mac OS X. You mentioned that you have fixed this compiler compatibility problem in your latest distribution of cttfind.
Would it be possible to send me your devel source code or a patch for me to compile with you fix ? That would make my life easier.
Thanks
Liz
Hi Liz, Aah, I didn't realize
In reply to Still failing comping ctffind by lizkellogg
Hi Liz,
Aah, I didn't realize this was Mac OS X. What version of gcc do you have?
CTFFIND is now part of our larger package (called cisTEM), which isn't currently ready for release. So in order to make a release of CTFFIND, Alexis made a standalone copy, which was a relatively complex thing to do. At the moment, I don't want to spend time doing that, however when cisTEM is released (hopefully by the end of the year), you will have access to the code then, although getting it to compile on Mac might be a bit of a struggle.
Tim
Hi Liz, Sorry about the delay
In reply to Hi Liz, Aah, I didn't realize by timgrant
Hi Liz,
Sorry about the delay - I've been busy with more urgent things in the last few weeks. This has now risen to near the top of my todo, and I almost got it done yesterday. I anticipate I'll have a fixed standalone ctffind by early next week.
Alexis
Hi all, Took me a while
Hi all,
Took me a while (mostly because I don't have a Mac), but I've now confirmed that the next version (4.1.7) compiles & runs correctly on Mac (we've tested on 3 different macs, with different OSes).
Please contact me directly to request the latest tar ball. Here are the basic steps:
1) Install Homebrew (https://brew.sh/)
2) brew install wxmac
3) brew install fftw
4) tar -xvf ctffind*.tar.gz
5) cd ctffind*
6) mkdir build
7) cd build
8) ../configure CXXFLAGS="-I/usr/local/include -L/usr/local/lib"
9) You must use the system gcc (/usr/bin/gcc)
If necessary, you may need to specify CC=/usr/bin/gcc
Once a couple of Mac users have confirmed the fix, I will release.
Thanks,
Alexis
version 4.1.7
In reply to Hi all, Took me a while by Alexis
Hey,
could you please send me the latest version in order to get rid of the errors?
Many thanks
I have now uploaded the
In reply to version 4.1.7 by cmbohg
I have now uploaded the source for 4.1.7. Compiled binaries to follow in the next day or so.
grigoriefflab.janelia.org/ctf
Corrigendum. 4.1.8 was the
In reply to I have now uploaded the by Alexis
Corrigendum. 4.1.8 was the version I meant to upload. I've removed 4.1.7 from the downloads page and replaced with 4.1.8 source. Binaries to follow.