Comments (4)
I had a lot of problems with this as well. Here's the make file that worked for me eventually:
#COMPILER MODE C++11
CXX=g++ -std=c++11
HTSLIB_ROOT=/home/ubuntu/programs/htslib-1.9
HTSLIB_INC=$(HTSLIB_ROOT)/include
HTSLIB_LIB=-L$(HTSLIB_ROOT)/lib -lhts
BOOST_ROOT=/usr/lib/x86_64-linux-gnu
BOOST_INC=$(BOOST_ROOT)/include
BOOST_LIB_IO=-L$(BOOST_ROOT)/lib -lboost_iostreams
BOOST_LIB_PO=-L$(BOOST_ROOT)/lib -lboost_program_options
#Best performance is achieved with this. Use it if running on the same plateform you're compiling, it's definitely worth it!
CXXFLAG=-O3 -march=native
LDFLAG=-O3
#DYNAMIC LIBRARIES
DYN_LIBS=-lz -lbz2 -lm -lpthread -llzma
#SHAPEIT SOURCES & BINARY
BFILE=bin/shapeit4
HFILE=$(shell find src -name *.h)
CFILE=$(shell find src -name *.cpp)
OFILE=$(shell for file in `find src -name *.cpp`; do echo obj/$$(basename $$file .cpp).o; done)
VPATH=$(shell for file in `find src -name *.cpp`; do echo $$(dirname $$file); done)
#COMPILATION RULES
all: $(BFILE)
$(BFILE): $(OFILE)
$(CXX) $(LDFLAG) $^ $(HTSLIB_LIB) $(BOOST_LIB_IO) $(BOOST_LIB_PO) -o $@ $(DYN_LIBS)
obj/%.o: %.cpp $(HFILE)
$(CXX) $(CXXFLAG) -c $< -o $@ -Isrc -I$(HTSLIB_INC) -I$(BOOST_INC)
clean:
rm -f obj/*.o $(BFILE)
Quite similar to @pcarbo - just with BOOST_ROOT defined. Thanks a lot for the solution! Also when doing it, I afterwards had to export
export LD_LIBRARY_PATH=/home/ubuntu/programs/htslib-1.9/
Because it had trouble linking it otherwise (I think, I'm no makefile expert)
from shapeit4.
BOOST_ROOT
may be undefined.
from shapeit4.
Ah, right---please fix as needed.
from shapeit4.
Thanks guys!
This fixed compiling errors with htslib for me on release 4.1.3 .
from shapeit4.
Related Issues (20)
- phasing without imputation HOT 2
- how to reduce the RAM when phasing a large cohort (~1200) of whole genome sequencing data with about 10Mb? HOT 1
- Scaffold and WhatsHap (physical and statistical phasing?) HOT 1
- Cannot extract map files HOT 1
- Illegal instruction (core dumped) HOT 3
- Question about the static HTSlib library dependence HOT 1
- Arch Linux package HOT 1
- How to handle missing genotype HOT 1
- ERROR: Population based phasing for less than 20 individuals HOT 1
- Reading in files and genetic maps is done sequentially, and could be parallelized across threads HOT 1
- AVX2 usage is determined at compile-time, not runtime
- Indel, CNV and Structural Variation (SV) in Shapeit4 phasing analysis HOT 2
- Read-based phasing with underflow error
- ERROR: Problem opening index file for hg19.fa HOT 2
- Error: Underflow impossible to recover
- T2T chromosome maps?
- MacOS install error
- error on bingraphsample
- Reference dataset for Phase 3
- Error:[31mERROR: [0mCould not find conditioning haplotypes for [1032052] / check options --pbwt-* and --ibd2-*
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shapeit4.