BamUtil: FAQ: Difference between revisions
From Genome Analysis Wiki
Jump to navigationJump to search
No edit summary |
|||
| Line 1: | Line 1: | ||
__TOC__ | __TOC__ | ||
For problems with libStatGen, see [[LibStatGen Troubleshooting]] | |||
= Compile Problems = | = Compile Problems = | ||
| Line 17: | Line 19: | ||
# Set CXX11_AVAIL = 0 in your environment | # Set CXX11_AVAIL = 0 in your environment | ||
By making one of these changes, the code should compile and use map instead of unordered_map. | By making one of these changes, the code should compile and use map instead of unordered_map. | ||
==ld: lto: could not merge in ../obj/BamExecutable.o because Unknown instruction for architecture x86_64== | |||
: ERROR: | |||
<pre> | |||
ld: lto: could not merge in ../obj/BamExecutable.o because Unknown instruction for architecture x86_64 | |||
collect2: ld returned 1 exit status | |||
make[2]: *** [../bin/bam] Error 1 | |||
make[1]: *** [src] Error 2 | |||
make: *** [bamUtil/] Error 2 | |||
</pre> | |||
: This error was seen when running on Mac OS X 10.7.5 on a 64-bit kernel with gcc/g++: i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) | |||
: The error appears to be due to the default build optimization: -O4 | |||
: If you see this error, try compiling for debug (optimization -O0): <code>'''make debug'''</code> | |||
: The debug executable is: <code>'''bamUtil/bin/debug/bam'''</code> | |||
: If the debug compile worked and you would prefer an optimized executable (runs a little faster), then update the optimization flag to -O3: | |||
:# Open '''libStatGen/Makefiles/Makefile.include''' | |||
:# Change <code>OPTFLAG_OPT?=-O4</code> to <code>'''OPTFLAG_OPT?=-O3'''</code> | |||
:# Run <code>'''make clean; make'''</code> in both libStatGen and bamUtil | |||
:# The optimized executable is <code>'''bamUtil/bin/bam'''</code> | |||
Revision as of 09:49, 25 March 2014
For problems with libStatGen, see LibStatGen Troubleshooting
Compile Problems
HashErrorModel.cpp:96: error: ‘class std::unordered_map, std::equal_to, std::allocator > >’ has no member named ‘at’
- Error:
HashErrorModel.cpp: In member function ‘uint8_t HashErrorModel::getQemp(BaseData&)’: HashErrorModel.cpp:96: error: ‘class std::unordered_map, std::equal_to, std::allocator > >’ has no member named ‘at’ make[2]: *** [../obj/HashErrorModel.o] Error 1
- HashErrorModel by default uses an unordered_map which is only found in C++11/C++0x.
- The code attempts to automatically detect whether or not you have C++11/C++0x by checking if the gcc version > X4.3.0.
- If you see this failure, that means this check did not properly work and you will need to manually disable the C++11/C++0x code. There are a couple of ways to do this:
- Update bamUtil/Makefile.inc, line 7, change
CXX11_AVAIL ?= 1toCXX11_AVAIL = 0 - Set CXX11_AVAIL to 0 on the command line:
make CXX11_AVAIL=0
- Set CXX11_AVAIL = 0 in your environment
By making one of these changes, the code should compile and use map instead of unordered_map.
ld: lto: could not merge in ../obj/BamExecutable.o because Unknown instruction for architecture x86_64
- ERROR:
ld: lto: could not merge in ../obj/BamExecutable.o because Unknown instruction for architecture x86_64 collect2: ld returned 1 exit status make[2]: *** [../bin/bam] Error 1 make[1]: *** [src] Error 2 make: *** [bamUtil/] Error 2
- This error was seen when running on Mac OS X 10.7.5 on a 64-bit kernel with gcc/g++: i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
- The error appears to be due to the default build optimization: -O4
- If you see this error, try compiling for debug (optimization -O0):
make debug - The debug executable is:
bamUtil/bin/debug/bam - If the debug compile worked and you would prefer an optimized executable (runs a little faster), then update the optimization flag to -O3:
- Open libStatGen/Makefiles/Makefile.include
- Change
OPTFLAG_OPT?=-O4toOPTFLAG_OPT?=-O3 - Run
make clean; makein both libStatGen and bamUtil - The optimized executable is
bamUtil/bin/bam