DKMS / Hapl-o-Mat

A software for haplotype inference
Other
11 stars 7 forks source link

HaploMat make error 1 #5

Closed PaQwecy closed 4 years ago

PaQwecy commented 5 years ago

Hi

i am trying to install Haplomat on Ubuntu 1804.

paqwecy@paqwecy-VirtualBox:~/Documents/Hapl-o-Mat$ ls COPYING examplePopulations Makefile parametersMAC README.md textsForGettingStarted detailedGettingStartedLinux.pdf gettingStarted parametersGLS parametersREAD src detailedGettingStartedWindows.pdf include parametersGLSC prepareData systemTest paqwecy@paqwecy-VirtualBox:~/Documents/Hapl-o-Mat$ make g++ -Wall -march=native -Ofast -std=c++11 -I include -c -o src/Glid.o src/Glid.cc In file included from include/Glid.h:37:0, from src/Glid.cc:35: include/Allele.h: In member function ‘void Allele::sqrtFrequency()’: include/Allele.h:92:37: error: ‘sqrt’ was not declared in this scope void sqrtFrequency() {frequency = sqrt(frequency);} ^~~~ include/Allele.h:92:37: note: suggested alternative: ‘qsort’ void sqrtFrequency() {frequency = sqrt(frequency);} ^~~~ qsort

: recipe for target 'src/Glid.o' failed make: *** [src/Glid.o] Error 1 paqwecy@paqwecy-VirtualBox:~/Documents/Hapl-o-Mat$ I keep getting this make Error 1. Can anyone help? Thanks!
kantale commented 4 years ago

I had the same issue. I added:

#include <cmath>

on the top of include/Allele.h

See also: https://stackoverflow.com/questions/16518210/sqrt-is-not-a-member-of-std

dsobral commented 4 years ago

I had the same issue. I added:

#include <cmath>

on the top of include/Allele.h

See also: https://stackoverflow.com/questions/16518210/sqrt-is-not-a-member-of-std

Thanks man!

quokka-caredx commented 4 years ago

I had to do the same. This should be incorporated surely?

sauter commented 4 years ago

Resolved by @kantale. Thanks.