-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building bamUtil returns error: call of overloaded 'to_string(int&)' is ambiguous #49
Comments
Could you try updating libStatGen/vcf/VcfRecord.cpp:
line 160
from
std::to_string(my1BasedPosNum) + " (chr:pos) - " + e.what();
to
std::to_string(static_cast<long long>my1BasedPosNum) + " (chr:pos) - " + e.what();
line 199
from:
std::string strPos = std::to_string(my1BasedPosNum);
to:
std::string strPos = std::to_string(static_cast<long long>my1BasedPosNum);
Let me know if that resolves your issue or if you encounter additional
issues.
|
Thanks for your quick suggestion and it seems to work if you enclose my1BasePosNum in brackets too. std::to_string(static_cast(my1BasedPosNum)) + " (chr:pos) - " + e.what(); Unfortunately, there is another error that pops up and perhaps it is related to the zlib package which I am not able to load on the current HPC cluster. I am in contact with the admin and I will update you if you do not have any further comments at the moment. Here is the error: ../../libStatGen/libStatGen.a(GzipFileType.o): In function |
Hi @mktrost |
OK, problem solved following this suggestion |
Hi there,
I am encountering an error while building this repository using the following codes:
git clone git://github.com/statgen/bamUtil.git
cd bamUtil
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
module load gcc/v6.3.0
make cloneLib
make
## here comes the error...
VcfRecord.cpp: In member function 'bool VcfRecord::read(InputFile*, bool, VcfRecordDiscardRules&, VcfSubsetSamples*)':
VcfRecord.cpp:160: error: call of overloaded 'to_string(int&)' is ambiguous
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2604: note: candidates are: std::string std::to_string(long long int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2610: note: std::string std::to_string(long long unsigned int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2616: note: std::string std::to_string(long double)
VcfRecord.cpp: In member function 'bool VcfRecord::write(InputFile*, bool)':
VcfRecord.cpp:199: error: call of overloaded 'to_string(int&)' is ambiguous
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2604: note: candidates are: std::string std::to_string(long long int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2610: note: std::string std::to_string(long long unsigned int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2616: note: std::string std::to_string(long double)
make[3]: *** [obj/VcfRecord.o] Error 1
make[2]: *** [vcf] Error 2
make[1]: *** [../../libStatGen/libStatGen.a] Error 2
make[1]: Leaving directory `/proj/data9/samuel/modules/bamUtil/src'
make: *** [src] Error 2
I am working on a HPC cluster that uses linux
Any suggestion to avoid the ambiguities?
The text was updated successfully, but these errors were encountered: