Entering edit mode
2.7 years ago
erin.brettmann
▴
20
Hello, I'm trying to install bam-readcount and it keeps failing during the make step. I'm on MacOS Monterey with the M1 chip (if that makes a difference). I used cmake 3.23.1 from homebrew. Command Line Tools are up to date, according to brew doctor
. I would love to just install it via conda, but conda can't find it (even though it's in the conda directory). Anyone have any thoughts about how to fix this? The installation is:
git clone https://github.com/genome/bam-readcount
cd bam-readcount
mkdir build
cd build
cmake ..
make
This is the error it shows:
[ 10%] Built target gtest160
[ 12%] Performing configure step for 'boost-1.55'
-n Building Boost.Build engine with toolset darwin...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
make[2]: *** [vendor/src/boost-1.55-stamp/boost-1.55-configure] Error 1
make[1]: *** [CMakeFiles/boost-1.55.dir/all] Error 2
make: *** [all] Error 2
CMakeError.log says:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler: /Library/Developer/CommandLineTools/usr/bin/cc
Build flags:
Id flags:
The output was:
1
ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /Library/Developer/CommandLineTools/usr/bin/c++
Build flags:
Id flags:
The output was:
1
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
bootstrap.log says:
###
### Using 'darwin' toolset.
###
rm -rf bootstrap
mkdir bootstrap
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
make.c:296:37: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "make\t--\t%s%s\n", spaces( depth ), object_str( t->name ) );
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:296:37: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:303:37: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "make\t--\t%s%s\n", spaces( depth ), object_str( t->name ) );
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:303:37: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:376:45: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "bind\t--\t%s%s: %s\n", spaces( depth ),
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:376:45: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:384:45: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "time\t--\t%s%s: %s\n", spaces( depth ),
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:384:45: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:389:45: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
printf( "time\t--\t%s%s: %s\n", spaces( depth ),
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:389:45: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
make.c:731:13: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
spaces( depth ), object_str( t->name ) );
^~~~~~~~~~~~~~~
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
make.c:731:13: note: use array indexing to silence this warning
make.c:85:44: note: expanded from macro 'spaces'
#define spaces(x) ( " " + ( x > 20 ? 0 : 20-x ) )
^
6 warnings generated.
modules/path.c:16:12: error: implicit declaration of function 'file_query' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
return file_query( list_front( lol_get( frame->args, 0 ) ) ) ?
^
1 error generated.
Thank you!
I figured it out! The issue was with the version of boost supplied in the package. I found an old post about new versions of clang/Xcode not playing nicely with old versions of boost. So I deleted the bam-readcount folder and re-cloned it. Then I downloaded the newest version of boost (1.79). I changed the file name of boost1.79 to match the name of the boost supplied with bam-readcount, and swapped the old for the new. Then I followed the install instructions and it worked. Go figure.
Thanks, this worked for me. Just to clarify that the file to be replaced is located in the
bam-readcount/vendor/
directory.Try
brew install gcc
and then use that to compile this. I have an M1 Mac running Monterey as well, so I'll try installing and share my STDOUT and STDERR with you soon.Follow up: I am facing the same error. Interesting. Maybe Chris Miller can help
I actually already tried that, but it was in an attempt to install pymol (which has been unsuccessful). The error it threw was
I wonder if the two are related.