williamslab / ibis

Algorithm for rapid, phase-free detection of long identical by descent segments
GNU General Public License v3.0
17 stars 7 forks source link

including stdint.h in bseg2seg.cc #9

Closed Ahhgust closed 2 years ago

Ahhgust commented 2 years ago

Some compilers (gcc 10.2 in my case) aren't happy with some of your variable types. Here's an example: g++ -std=c++2a -I. -Wall -fopenmp -mpopcnt -O3 -o bseg2seg bseg2seg.cc bseg2seg.cc:16:3: error: ‘uint16_t’ does not name a type; did you mean ‘u_int16_t’? 16 | uint16_t chromIdx;

It looks like you perhaps forgot to include stdint? -August

williamslab commented 2 years ago

Interesting... the code has #include <stdint.h>, but we can change this to #include <cstdint>. Do you want to confirm that this change fixes the error on your end?

Ahhgust commented 2 years ago

Many of the files do include stdint.h (and they compile without warnings), but I didn't see it in bseg2seg.cc (nor did grep :) ). Maybe you're on a different branch? Using an older version of gcc worked, mind you.

williamslab commented 2 years ago

Ah, I had it in my local copy but hadn't pushed. Hopefully if you pull now and recompile, the error will disappear?

Ahhgust commented 2 years ago

We're closer-- bseg2seg.cc compiles just fine, but the same issue is also found in: seg2coef.cc

williamslab commented 2 years ago

Try now. Hopefully all stdint.h issues are fixed?

Ahhgust commented 2 years ago

We're all good! Thank you!