Problem to install Breakdancer on Mac OS X
3
1
Entering edit mode
8.9 years ago
fbesnard ▴ 40

I am running Mac OS X 10.9.5.

I'm struggling to install Breakdancer.

I installed cmake (3.2.3) as required, with the command line option activated (symlink in my usr/bin/ folder)

I started Breakdancer compilation as recommended:

  • 1st step works fine (cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr/local)
  • but 2nd step (make) fails:
Scanning dependencies of target boost-libs
[  1%] Creating directories for 'boost-libs'
[  3%] Performing download step (verify and extract) for 'boost-libs'
...
Scanning dependencies of target breakdancer
[ 43%] Building CXX object build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/BedWriter.cpp.o
[ 45%] Building CXX object build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/BreakDancer.cpp.o
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/breakdancer/BreakDancer.cpp:1:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/breakdancer/BreakDancer.hpp:3:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/breakdancer/BasicRegion.hpp:3:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/io/Alignment.hpp:3:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/common/ReadFlags.hpp:5:
/Users/lab/TOOLS_VariantAnalysis/breakdancer/build/vendor/boost/boost/include/boost/array.hpp:62:11: error:
      implicit instantiation of undefined template 'std::__1::basic_string<char,
      std::__1::char_traits<char>, std::__1::allocator<char> >'
        T elems[N];    // fixed-size array of elements of type T
          ^
/Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/common/ReadFlags.hpp:41:37: note:
      in instantiation of template class
      'boost::array<std::__1::basic_string<char, std::__1::char_traits<char>,
      std::__1::allocator<char> >, 11>' requested here
    PerFlagArray<std::string>::type strings_;
                                    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:188:33: note:
      template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
1 error generated.
make[2]: *** [build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/BreakDancer.cpp.o] Error 1
make[1]: *** [build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/all] Error 2
make: *** [all] Error 2

Does anyone have a suggestion to solve this out ?

Fabrice

Breakdancer MacOsX • 4.4k views
ADD COMMENT
0
Entering edit mode

No problem. I'd love to know if the changes worked for you or not. I hope they do!

ADD REPLY
1
Entering edit mode
8.9 years ago
Ram 43k

Try installing gcc4.9 through homebrew (gcc49) and use gcc49 (make CC=gcc49)as the compiler. Mac's gcc points to clang, which is stricter.

ADD COMMENT
0
Entering edit mode

Hi Ram,

Thank you for feed back.

I installed gcc49 via MacPorts, and set it as the active compiler. Then I deleted my previous breakdancer folder and re-started all the installation from scratch, but it fails again at the same point (STEP=scanning dependencies of target breakdancer):

$make
Scanning dependencies of target boost-libs
[ 1%] Creating directories for 'boost-libs' ...
[ 36%] Performing configure step for 'gtest160'
-- The CXX compiler identification is GNU 4.9.2
-- The C compiler identification is GNU 4.9.2
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /opt/local/bin/c++
-- Check for working CXX compiler: /opt/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc
-- works -- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
...
Scanning dependencies of target breakdancer
[ 43%] Building CXX object build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/BedWriter.cpp.o
[ 45%] Building CXX object build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/BreakDancer.cpp.o
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/breakdancer/BreakDancer.cpp:1:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/breakdancer/BreakDancer.hpp:3:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/breakdancer/BasicRegion.hpp:3:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/io/Alignment.hpp:3:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/common/ReadFlags.hpp:5:
/Users/lab/TOOLS_VariantAnalysis/breakdancer/build/vendor/boost/boost/include/boost/array.hpp:62:11: error:
implicit instantiation of undefined template 'std::__1::basic_string, std::__1::allocator >' T elems[N]; // fixed-size array of elements of type T ^
/Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/common/ReadFlags.hpp:41:37: note: in instantiation of template class 'boost::array, std::__1::allocator >, 11>' requested here PerFlagArray::type strings_; ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:188:33: note: template is declared here class _LIBCPP_TYPE_VIS_ONLY basic_string; ^
1 error generated.
make[2]: *** [build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/BreakDancer.cpp.o] Error 1
make[1]: *** [build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/all] Error 2
make: *** [all] Error 2
ADD REPLY
0
Entering edit mode

I think the developers will be more suited to figure out the root cause. I ran this on my custom-configured-like-crazy Mac, and it gave me the same error. make deps then make, as suggested below by ernfrid, gives the same error as well.

ADD REPLY
1
Entering edit mode
8.9 years ago
ernfrid ▴ 220

I think the documentation on the install process may be slightly out of date. Can you please try the following? Rather than running make right off the bat, try running make deps and subsequently running make. Otherwise, leave everything the same.

ADD COMMENT
0
Entering edit mode

Hi Ernfrid,

I really believed it would work this time... but it ended up with the same crash.

namely, make deps worked well but then make failed at the same step again:

Scanning dependencies of target breakdancer
[ 43%] Building CXX object build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/BedWriter.cpp.o
[ 45%] Building CXX object build/src/lib/breakdancer/CMakeFiles/breakdancer.dir/BreakDancer.cpp.o
...

etc.

Is there something wrong with Xcode, since the last error message says:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:188:33: note:
template is declared here class _LIBCPP_TYPE_VIS_ONLY basic_string;

But understanding this is way beyond my beginner's skills!

Fabrice

ADD REPLY
0
Entering edit mode

I just pushed a commit to hopefully address this. I'm still getting compilation errors related to the testing library, but I do get a breakdancer-max executable after my change. Can you go ahead and give it a try now?

ADD REPLY
0
Entering edit mode

Hi Ernfrid,

Hey, there is improvement ! It is still failing, but it goes further in the compilation.

Again, It started it all from scratch, and I compile in 2 steps as you suggested before (make deps and then make)

1st step works fine, and during the 2nd:

  • I get 1 warning at [63%]:
[ 63%] Building CXX object build/src/lib/io/CMakeFiles/io.dir/BamSummary.cpp.o
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/io/BamSummary.cpp:6:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/io/BamIo.hpp:2:
/Users/lab/TOOLS_VariantAnalysis/breakdancer/src/lib/io/BamReader.hpp:11:17: warning:
      function 'bamOpenMode' is not needed and will not be emitted
      [-Wunneeded-internal-declaration]
    char const* bamOpenMode(std::string const& path) {
                ^
1 warning generated.
  • Then it crashes at [73%] during "Scanning dependencies of target breakdancer-max", generating a huge warning message:

ADD REPLY
1
Entering edit mode

Well that's confusing. I did not have this problem on my Mac, but I am running 10.10.3. I do wonder if the issue might be related to your earlier attempts to compile with GCC. The linker errors could be indicating that boost was compiled with GCC, but Breakdancer is being compiled with Clang. Did you remove all files from your build directory before trying to compile again?

ADD REPLY
0
Entering edit mode

Hi

before each new trial, I remove the breakdancer folder (rm -rf breakdancer) and I re-download it from github (git clone --recursive https://github.com/genome/breakdancer.git).

Do you think I should do something else? Are there other files created somewhere else that I should remove?

ADD REPLY
0
Entering edit mode

Nope, as long as you've removed the directory you were running make in you should be fine. Removing the whole breakdancer directory should definitely take care of it if you are following the directions. Have you tried Ram's earlier suggestion of using GCC as well? I'd make sure to use it for both make deps and make. If that doesn't work, I'll do some more research, but it will be difficult with me unable to replicate the issue.

ADD REPLY
0
Entering edit mode

Hi Ernfrid,

Yes I installed gcc49 as suggested by Ram.

breakdancer was compiling using it, as said during the progress:

The CXX compiler identification is GNU 4.9.2

-- The C compiler identification is GNU 4.9.2

And when I type:gcc --version, I get:

gcc (MacPorts gcc49 4.9.2_2) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.

Since I set it as the default compiler, it should be used both for make deps and make, right?

ADD REPLY
0
Entering edit mode

I'm not too sure. Certainly the end of your output indicates clang is what is running.

clang: error: linker command failed with exit code 1 (use -v to see invocation)

That is why I thought you were running clang and not gcc. I can't say why the output would indicate GNU 4.9.2 but then the error output is indicating clang.

I will look into installing GCC via macports on my machine as well and see if I can't replicate the issue in that manner. In the meantime, can you uninstall gcc via macports and try then?

ADD REPLY
0
Entering edit mode

Ok. I can confirm that installing gcc via macports, selecting gcc as the compiler via macports (sudo port select --set gcc mp-gcc49) and then compiling Breakdancer will fail. Cmake seems to think the compiler is still AppleClang, but later on in the build process, Breakdancer itself is being compiled with gcc4.9.

In my case, deselecting gcc as the compiler (sudo port select --set gcc none) resolves the immediate problem of a failed compilation.

ADD REPLY
0
Entering edit mode

Hi fbesnard,

Were you able to get this to work with the changes and recommendations I made?

ADD REPLY
0
Entering edit mode

Hi Ernfrid,

Excuse-me, I haven't tried yet: I had to pause this job to deal with others urgent things.

I drop you a reply as soon as I get back to this (next week I guess). Thank you very much for your help anyway, I really appreciate your feedback !

ADD REPLY
0
Entering edit mode
8.6 years ago
fbesnard ▴ 40

Hi,

After a long pause, I'm getting back to this issue... without success.

I did what Ernfrid suggested, which is sudo port select --set gcc none

To sum up, here is what I did after:

  1. rm -rf breakdancer then git clone --recursive https://github.com/genome/breakdancer.git
  2. Create build folder and in it, type: cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/usr/local
  3. As first suggested by Ernfrid, I install in two times by typing: make deps (works well) and make, where it fails.

The compilation gets a little bit further than previously (75% instead of 73%), but still crashes:

Scanning dependencies of target TestBdLib
[ 75%] Building CXX object build/test/lib/breakdancer/CMakeFiles/TestBdLib.dir/TestBreakDancer.cpp.o
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/test/lib/breakdancer/TestBreakDancer.cpp:9:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/build/vendor/src/gtest160/include/gtest/gtest.h:57:
In file included from /Users/lab/TOOLS_VariantAnalysis/breakdancer/build/vendor/src/gtest160/include/gtest/internal/gtest-internal.h:40:
/Users/lab/TOOLS_VariantAnalysis/breakdancer/build/vendor/src/gtest160/include/gtest/internal/gtest-port.h:499:13: fatal error:
      'tr1/tuple' file not found
#   include <tr1/tuple>  // NOLINT
            ^
1 error generated.
make[2]: *** [build/test/lib/breakdancer/CMakeFiles/TestBdLib.dir/TestBreakDancer.cpp.o] Error 1
make[1]: *** [build/test/lib/breakdancer/CMakeFiles/TestBdLib.dir/all] Error 2
make: *** [all] Error 2

Any ideas ?

Thank you,
Fabrice

ADD COMMENT
0
Entering edit mode

I never saw this update, but I did push a correction about a week ago that may fix your issue. Can you try it again?

ADD REPLY

Login before adding your answer.

Traffic: 1591 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6