Open igordot opened 8 years ago
It might perhaps not be immediately clear but in INSTALL.md, the line is
cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr/local
The ..
specifies that the CMakeLists.txt is in a directory above the 'build' dir, which it should be.
You're right. That was not clear. I thought that was just an abbreviation for other options.
Running cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$HOME
from build
works.
However, I still get the same bootstrap.sh
error on the next step (make
):
[xxx@xxx build]$ make
Scanning dependencies of target boost-libs
[-12%] Creating directories for 'boost-libs'
[-12%] Performing download step (verify and extract) for 'boost-libs'
-- verifying file...
file='/xxx/breakdancer/vendor/boost-1.54-breakdancer.tar.gz'
-- verifying file... warning: did not verify file - no URL_HASH specified?
-- extracting...
src='/xxx/breakdancer/vendor/boost-1.54-breakdancer.tar.gz'
dst='/xxx/breakdancer/build/vendor/boost/boost-src'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[-12%] No patch step for 'boost-libs'
[-12%] No update step for 'boost-libs'
[-12%] Performing configure step for 'boost-libs'
/bin/sh: ./bootstrap.sh: No such file or directory
make[2]: *** [vendor/src/boost-libs-stamp/boost-libs-configure] Error 127
make[1]: *** [CMakeFiles/boost-libs.dir/all] Error 2
make: *** [all] Error 2
It seems to work on my end, I'd suggest trying once more - delete the 'build' dir and repeat the same process.
Within the build dir, you should see a vendor/boost/boost-src
directory, that dir will have the bootstrap.sh
script.
My vendor/boost/boost-src
directory only contains boost-bd
directory.
I should mention that at the previous step, although cmake
finishes, it does have an error:
-- Performing Test CXX11_FLAG0
-- Performing Test CXX11_FLAG0 - Failed
-- Performing Test CXX11_FLAG1
-- Performing Test CXX11_FLAG1 - Success
-- C++11 support enabled via -std=c++0x
-- Performing Test CXX11_STDLIB_FLAG0
-- Performing Test CXX11_STDLIB_FLAG0 - Success
-- Sufficient C++11 library support found with flag ' '
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
-- Configuring done
CMake Error at build-common/cmake/TestHelper.cmake:66 (add_test):
Error evaluating generator expression:
$<TARGET_FILE:breakdancer-max>
No target "breakdancer-max"
Call Stack (most recent call first):
integration-test/CMakeLists.txt:3 (def_integration_test)
-- Generating done
-- Build files have been written to: /xxx/breakdancer/build
That IS odd. I have not seen that before. Just to confirm, did you try deleting the build directory and starting the process over? And still see that error?
Yes. I deleted the directory and repeated the process.
What operating system are you utilizing? What version of cmake?
Could you also post the entire output of cmake ..
?
I am running CentOS with cmake version 2.8.11.2.
The entire output of cmake
:
[x@x build]$ cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$HOME
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Score floating point type: double
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Warning at CMakeLists.txt:42 (message):
Unknown compiler: , we'll see how this goes...
-- Performing Test CXX11_FLAG0
-- Performing Test CXX11_FLAG0 - Failed
-- Performing Test CXX11_FLAG1
-- Performing Test CXX11_FLAG1 - Success
-- C++11 support enabled via -std=c++0x
-- Performing Test CXX11_STDLIB_FLAG0
-- Performing Test CXX11_STDLIB_FLAG0 - Success
-- Sufficient C++11 library support found with flag ' '
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
-- Configuring done
CMake Error at build-common/cmake/TestHelper.cmake:66 (add_test):
Error evaluating generator expression:
$<TARGET_FILE:breakdancer-max>
No target "breakdancer-max"
Call Stack (most recent call first):
integration-test/CMakeLists.txt:3 (def_integration_test)
-- Generating done
-- Build files have been written to: /xxx/breakdancer/build
The first thing that I see is that cmake doesn't seem to think your compiler is GCC or Clang. What compiler do you have installed?
(/usr/bin/c++ --version
should tell you)
$ /usr/bin/c++ --version
c++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 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.
Not sure why it does not see gcc, since I have it (I can try a newer version if you think that may help):
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 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.
We might need a little bit of help with this one to reproduce this, it's not immediately obvious since we don't use CentOS here. Are you on CentOS 5 or 6?
I am using CentOS 6.3.
I also tried switching to gcc 4.7 and am still seeing the same error.
I was able to get a successful compilation on a CentOS 6.3 VM with up to date (via yum) cmake (2.8.12.2) and gcc versions (4.4.7-16). Are you using system level installations of cmake and gcc or custom installations?
I think the server I use is not set up in a standard way. For example, cmake is not 2.8 by default, so I have to use a different version. My first error (not mentioned here) was that cmake was too old.
Ok, looks like this is clearly cmake having trouble with your setup. Any chance you could get them to upgrade cmake? You seem to be on a pretty 'recent' OS so it could be possible.
The first line in the CMakeLists
file is cmake_minimum_required(VERSION 2.8)
which is why you need to use cmake>2.8 I'm not really confident if manually editing that line to a version that you have installed and trying the install would work.
I think there was a misunderstanding. I did not edit anything in the scripts. I have the default cmake <2.8 and then an alternate cmake 2.8. I used cmake 2.8. The errors I am reporting are with cmake 2.8.
Yep I understand. I was suggesting a possible alternative which might not work(manually editing.) Your best bet would be to upgrade your regular cmake install.
To echo Avi — We have some concerns that the customizations you've had to do here aren't playing nice with the existing build system. cmake seems to be behaving oddly (not finding gcc, throwing errors we've never seen before).
At this point, I'm not certain how to replicate the problem. I assume you do not have root access and therefore are unable to update the default installs on your server. If that's not the case, then please let us know. Any information you might have on what you've done to use newer versions of cmake and gcc would be helpful.
I have seen similar issues in the past with other software, but in those cases, we had enough information to replicate the bug and work towards a solution.
You are correct. I do not have root access, which is why I tried to install it to my home directory. However, we have various modules installed on the server, so I can "upgrade" cmake by adding the desired version to the path. That's how I got 2.8. That's also how I switched from gcc 4.4 to 4.7.
So you add the full path of these upgraded version to the beginning for your $PATH variable? How do you do this? By modifying your .bashrc or equivalent? Or modifying your shell environment in place?
It's modifying the shell environment.
Thanks. Can you also tell me what version the system install of cmake is?
By default, this is what I get:
$ cmake --version
cmake version 2.6-patch 4
Igor, I've done my best to replicate your environment by:
a) Using a CentOS 5 VM with cmake2.6.4 as the default b) Downloading and compiling cmake 2.8.11.2 c) Creating a symlink to the compiled cmake executable in ~/bin/ e.g. ~/bin/cmake points to 2.8.11.2 d) Exporting ~/bin to my path: export $PATH=~/bin:$PATH e) Cloning breakdancer f) cd breakdancer;mkdir build;cd build; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME
And it compiles...
I don't know what to tell you at this point.
Thank you for checking. That's weird. There must be some other inconsistency. I'll discuss with a sysadmin on my end to see what could be the problem.
Also, I just found this post that I think may be helpful if you decide to distribute binaries: https://pmelsted.wordpress.com/2015/10/14/building-binaries-for-bioinformatics/
Anybody who can help with this, similar to this topic:
make ... collect2: error: ld returned 1 exit status make[2]: [bin/breakdancer-max] Error 1 make[1]: [build/src/exe/breakdancer-max/CMakeFiles/breakdancer-max.dir/all] Error 2 make: *** [all] Error 2
I tried following the instructions found in
INSTALL.md
. There seems to be an error. Specifically, this part:cmake
expectsCMakeLists.txt
, so if you cd into an empty directory, it will not run. CopyingCMakeLists.txt
tobuild
resulted in other errors later on. However, runningcmake
frombreakdancer
(top-level) directory worked.Unfortunately, running
make
later in the next step failed with this error: