Error compiling GotCloud

61 views
Skip to first unread message

ma34...@gmail.com

unread,
Mar 21, 2017, 8:39:08 AM3/21/17
to GotCloud
I am having a problem compiling GotCloud. When I check check_requirements.sh, it says I have to install libssl0.9.8 (which does not exist for Ubuntu 16 so I installed instead libssl1.0.0), and that

'/usr/local/gotcloud/test/umake' does not exist so you cannot test this install
#   Install it by doing 'sudo dpkg -i gotcloud-test_*.deb'

I tried to install it but it does not find the file, but anyway that is only for checking that everything went ok in the compilation, right?


Then I go to src and run make, but it gives me the following error:

....
gHash.o obj/StringMap.o obj/Tabix.o obj/UncompressedFileType.o obj/PedigreeLoader.o obj/PedigreeTrim.o obj/PedigreeTwin.o
ar: `u' modifier ignored since `D' is the default (see `U')
ar -cru ../libStatGen.a obj/SamFileHeader.o obj/SamFile.o obj/GenericSamInterface.o obj/SamInterface.o obj/BamInterface.o obj/SamRecord.o obj/BamIndex.o obj/SamHeaderHD.o obj/SamHeaderPG.o obj/SamHeaderRecord.o obj/SamHeaderSQ.o obj/SamHeaderRG.o obj/SamHeaderTag.o obj/SamValidation.o obj/SamStatistics.o obj/SamQuerySeqWithRefHelper.o obj/SamFilter.o obj/PileupElement.o obj/PileupElementBaseQual.o obj/SamReferenceInfo.o obj/SamTags.o obj/PosList.o obj/CigarHelper.o obj/SamRecordPool.o obj/SamCoordOutput.o obj/SamRecordHelper.o
ar: `u' modifier ignored since `D' is the default (see `U')
ar -cru ../libStatGen.a obj/FastQFile.o obj/BaseCount.o obj/BaseComposition.o obj/FastQStatus.o
ar: `u' modifier ignored since `D' is the default (see `U')
ar -cru ../libStatGen.a obj/GlfException.o obj/GlfFile.o obj/GlfHeader.o obj/GlfRecord.o obj/GlfRefSection.o obj/GlfStatus.o
ar: `u' modifier ignored since `D' is the default (see `U')
ar -cru ../libStatGen.a obj/VcfFile.o obj/VcfFileReader.o obj/VcfFileWriter.o obj/VcfGenotypeField.o obj/VcfGenotypeFormat.o obj/VcfGenotypeSample.o obj/VcfHeader.o obj/VcfHelper.o obj/VcfRecord.o obj/VcfRecordField.o obj/VcfRecordFilter.o obj/VcfRecordGenotype.o obj/VcfRecordInfo.o obj/VcfSubsetSamples.o obj/VcfRecordDiscardRules.o
ar: `u' modifier ignored since `D' is the default (see `U')
g++  -std=c++0x -O4 -pipe -Wall  -I../libStatGen/include -I. -I../include/  -D__ZLIB_AVAILABLE__ -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -DDATE="\"mar mar 21 12:08:00 CET 2017\"" -DVERSION="\"1.0.0\"" -DUSER="\"root\"" -o obj/Main.o -c Main.cpp -DVERSION="\"1.0.0\""
Main.cpp: In function ‘double stdnormal_cdf(double)’:
Main.cpp:158:14: error: ‘isnan’ was not declared in this scope
   if (isnan(u))
              ^
Main.cpp:158:14: note: suggested alternative:
In file included from Main.cpp:19:0:
/usr/include/c++/5/cmath:641:5: note:   ‘std::isnan’
     isnan(_Tp __x)
     ^
Main.cpp: In function ‘double stdnormal_inv(double)’:
Main.cpp:225:14: error: ‘isnan’ was not declared in this scope
   if (isnan(p) || p > 1.0 || p < 0.0)
              ^
Main.cpp:225:14: note: suggested alternative:
In file included from Main.cpp:19:0:
/usr/include/c++/5/cmath:641:5: note:   ‘std::isnan’
     isnan(_Tp __x)
     ^
../libStatGen/Makefiles/Makefile.common:81: recipe for target 'obj/Main.o' failed
make[1]: *** [obj/Main.o] Error 1
make[1]: Leaving directory '/home/grupopm/Desktop/BWA/gotcloud/src/invNorm'
Makefile:58: recipe for target 'invNorm' failed
make: *** [invNorm] Error 2


I do not know if the warning message "ar: `u' modifier ignored since `D' is the default (see `U')" is causing the "error: ‘isnan’ was not declared in this scope" or if it is unrelated.
Have you had this problem before, any idea of what I can do?

Thank you very much for your help

pj...@umich.edu

unread,
Mar 24, 2017, 2:54:20 AM3/24/17
to GotCloud
The problems are all related to having an OS newer than Ubuntu 14.04 (the newest our lab uses), but are otherwise independent of each other.

1. I don't know why we tell you to install tests like that.  How are you installing gotcloud?  I always just `git clone https://github.com/statgen/gotcloud.git && cd gotcloud/src && make && cd .. && ./gotcloud test`.  I should probably put that line in the documentation, or in `INSTALL.txt`.

2. I don't know the difference between libssl 0.9.8 and 1.0.0, or why we currently ask for 0.9.8, but I haven't run into problems with 1.0.0 yet so maybe we should update that.  I've created an issue here.

3. It sounds like we should replace all `ar -cru` with `ar -cr`.  I've just committed that change to <https://github.com/statgen/gotcloud>, but not made a new release.

4. (this one is the error) For some reason, with new versions of GCC we need `std::isnan` instead of `isnan` in files using `#include <cmath>`.  Dunno why, but I changed it.

What version of gcc are you using?  (gcc --version)  What distro and version of Linux?

I'm getting other errors with GCC6, which I'm working on fixing.

ma34...@gmail.com

unread,
Mar 24, 2017, 10:04:48 AM3/24/17
to GotCloud
How are you installing gotcloud?

I was doing as you are suggesting:

git clone https://github.com/statgen/gotcloud.git
cd gotcloud/src
make #And here I get the error.


What version of gcc are you using?  (gcc --version)  What distro and version of Linux?

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Ubuntu 16.04.1 LTS

Anyway, I just now downloaded the new version of gotCloud you have modified (it says release version 1.17.5), and now the compilation works (I ran the test and it did not give any error), thank you!
Reply all
Reply to author
Forward
0 new messages