genome / breakdancer

SV detection from paired end reads mapping
113 stars 42 forks source link

install instructions incorrect #9

Open igordot opened 8 years ago

igordot commented 8 years ago

I tried following the instructions found in INSTALL.md. There seems to be an error. Specifically, this part:

$ mkdir build
$ cd build

cmake expects CMakeLists.txt, so if you cd into an empty directory, it will not run. Copying CMakeLists.txt to build resulted in other errors later on. However, running cmake from breakdancer (top-level) directory worked.

Unfortunately, running make later in the next step failed with this error:

/bin/sh: ./bootstrap.sh: No such file or directory
gatoravi commented 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.

igordot commented 8 years ago

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
gatoravi commented 8 years ago

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.

igordot commented 8 years ago

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
ernfrid commented 8 years ago

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?

igordot commented 8 years ago

Yes. I deleted the directory and repeated the process.

ernfrid commented 8 years ago

What operating system are you utilizing? What version of cmake?

gatoravi commented 8 years ago

Could you also post the entire output of cmake ..?

igordot commented 8 years ago

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
ernfrid commented 8 years ago

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?

gatoravi commented 8 years ago

(/usr/bin/c++ --version should tell you)

igordot commented 8 years ago
$ /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.
gatoravi commented 8 years ago

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?

igordot commented 8 years ago

I am using CentOS 6.3.

I also tried switching to gcc 4.7 and am still seeing the same error.

ernfrid commented 8 years ago

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?

igordot commented 8 years ago

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.

gatoravi commented 8 years ago

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.

igordot commented 8 years ago

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.

gatoravi commented 8 years ago

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.

ernfrid commented 8 years ago

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.

igordot commented 8 years ago

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.

ernfrid commented 8 years ago

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?

igordot commented 8 years ago

It's modifying the shell environment.

ernfrid commented 8 years ago

Thanks. Can you also tell me what version the system install of cmake is?

igordot commented 8 years ago

By default, this is what I get:

$ cmake --version
cmake version 2.6-patch 4
ernfrid commented 8 years ago

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.

igordot commented 8 years ago

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.

igordot commented 8 years ago

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/

wongfay0207 commented 5 years ago

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