mklarqvist / tomahawk

Fast calculations of linkage-disequilibrium in large-scale human cohorts
https://mklarqvist.github.io/tomahawk/
MIT License
42 stars 9 forks source link

compilation issue #33

Open jaredo opened 4 years ago

jaredo commented 4 years ago

I'm having trouble compiling this on Linux. I tried both your dockerfile docker build -t tomahawk . and on our local system (centOS7.8 with gcc 7.3.1) and received the same error. It looks like a problem with the way headers are being included.

g++ -std=c++0x -O3 -msse4.2  -I../htslib/ -I./include/ -I./lib/ -I/usr/local/include/ -c -DVERSION=\"beta-0.7.1\" -o lib/header_internal.o lib/header_internal.cpp
In file included from lib/header_internal.cpp:1:0:
lib/header_internal.h:16:44: error: expected class-name before '{' token
 class VcfHeaderInternal : public VcfHeader {
                                            ^
lib/header_internal.h:37:28: error: 'string' in namespace 'std' does not name a type
  void AddSample(const std::string& sample_name);
                            ^
lib/header_internal.cpp: In function 'const bcf_hrec_t* tomahawk::GetPopulatedHrec(const bcf_idpair_t&)':
lib/header_internal.cpp:12:2: error: 'cerr' is not a member of 'std'
  std::cerr << "No populated hrec in idPair. Error in htslib." << std::endl;
  ^
lib/header_internal.cpp:12:66: error: 'endl' is not a member of 'std'
  std::cerr << "No populated hrec in idPair. Error in htslib." << std::endl;
...

best,

Jared

DamienFr commented 3 years ago

Dear all,

Same problem here,

Best,

detr22 commented 3 years ago

I've encountered the same issue.

edexter commented 1 year ago

I'm having the same problem as well.