broadinstitute / CODECsuite

analysis pipeline for CODEC data
Other
9 stars 6 forks source link

Error: call of overloaded ‘abs(unsigned int)’ is ambiguous #1

Closed wclee47 closed 1 year ago

wclee47 commented 1 year ago

Hi, thanks a lot for making this program available. I tried to install it and ran into the following error message. Can you please take a look? I'm using GCC 11.2.0.

In file included from CODECsuite/trimadapter.cpp:11: CODECsuite/include/Adapter.h:495:12: error: call of overloaded ‘abs(unsigned int)’ is ambiguous 495 | abs(rc_cds_mb.start_j - rc_cds_mb.start_i) <= junction_adapter_minlen * 0.1) // matched in similar distance to beginning

ruolin commented 1 year ago

Hi @wclee47, thank you for reporting the bug. I can reproduce this error under GCC7.3. It seems to be a modern GCC complier issue. BTW, I had been using GCC5.2. I had a fix now. Can you try this branch https://github.com/broadinstitute/CODECsuite/tree/hotfix ?

wclee47 commented 1 year ago

Thank you for the quick update! I managed to finish the compilation with the updated version. However, there were several additional issues which I addressed by the solutions I found online.

For example,

CODECsuite/bbcpputil/include/BamRecordExt.h:50:50: error: 'numeric_limits' is not a member of 'std' => I added "#include \<limits>"

It will be appreciated if you can test the whole pipeline with the up-to-date compilers that most people are likely to use.

Anyway I successfully compiled the program!

Thanks,

Won-Chul