Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Compilation problem #14

Open
biopolyhedron opened this Issue Jul 22, 2011 · 4 comments

Comments

Projects
None yet
2 participants

I got problem when compling.
I'm not a sudo and I guess I'm not able to change /usr/local/bin in case needed.
the gcc version I'm using is 3.4.5 (sorry, I can't change it) and I see the newest version is 4.0.2 under a name 'gcc4'
I don't know whether I'm still able to install freebayes.

-bash-3.00$ make
cd src && make
make[1]: Entering directory /==MYNAME==/ekg-freebayes-f6b1ab7/src' g++ -O3 -c freebayes.cpp In file included from freebayes.cpp:25: Allele.h: In constructorAllele::Allele(AlleleType, std::string&, long double, long double_, char_, unsigned int, int, int, std::string, std::string&, std::string&, std::string&, bool, long double, std::string, short int, bool, bool, bool)':
Allele.h:173: warning: passing long double' for converting 1 oflong double phred2ln(int)'
In file included from freebayes.cpp:27:
AlleleParser.h:32:31: ../vcflib/Variant.h: No such file or directory
In file included from freebayes.cpp:27:
AlleleParser.h: At global scope:
AlleleParser.h:135: error: vcf' has not been declared AlleleParser.h:135: error: ISO C++ forbids declaration ofVariantCallFile' with no type
...
...
...

Owner

ekg commented Jul 22, 2011

Per the README, you'll need to clone using git clone --recursive or
you won't properly check out the repository.

The result will be the error you are describing.

Obtaining:

To download FreeBayes, please use git to download the most recent development
tree. Currently, the tree is hosted on github, and can be obtained via:

% git clone --recursive git://github.com/ekg/freebayes.git

Note the use of --recursive. This is required, as the project contains some
nested git submodules for external repositories.

On Fri, Jul 22, 2011 at 4:11 AM, biopolyhedron <
reply@reply.github.com>wrote:

I got problem when compling.
I'm not a sudo and I guess I'm not able to change /usr/local/bin in case
needed.
the gcc version I'm using is 3.4.5 (sorry, I can't change it) and I see the
newest version is 4.0.2 under a name 'gcc4'
I don't know whether I'm still able to install freebayes.

-bash-3.00$ make
cd src && make
make[1]: Entering directory /==MYNAME==/ekg-freebayes-f6b1ab7/src' g++ -O3 -c freebayes.cpp In file included from freebayes.cpp:25: Allele.h: In constructorAllele::Allele(AlleleType, std::string&, long
double, long double_, char_, unsigned int, int, int, std::string,
std::string&, std::string&, std::string&, bool, long double, std::string,
short int, bool, bool, bool)':
Allele.h:173: warning: passing long double' for converting 1 oflong
double phred2ln(int)'
In file included from freebayes.cpp:27:
AlleleParser.h:32:31: ../vcflib/Variant.h: No such file or directory
In file included from freebayes.cpp:27:
AlleleParser.h: At global scope:
AlleleParser.h:135: error: vcf' has not been declared AlleleParser.h:135: error: ISO C++ forbids declaration ofVariantCallFile'
with no type
...
...
...

Reply to this email directly or view it on GitHub:
#14

Yes, I've checked README, but since I'm not sudo of the server (of my institute), I'm also not able to install git. therefore, I could only download the .tar.gz (from the "Downloads" button). It would be more user-friendly if, like samtools does, I can avoid git (of which installation might be more complicate than installing freebayes) and make the file all in the subdirectory (in my personal folder) without having to touch public folder like where only sudo accounts can change.

Owner

ekg commented Jul 22, 2011

Unfortunately, git-archive, which github uses to provide you with the
up-to-date tarballs for download, is broken in the sense that it cannot
handle submodules. I did not realize this when I first started using the
submodules, and I apologize for the trouble which this has caused you.

I'll look into setting up a cron job to make nightly build archives on our
own FTP server so that other users won't have this issue.

Until then, please use:
http://clavius.bc.edu/~erik/freebayes/freebayes-f6b1ab70.tar.bz2, which is
the most-current version from git.

Keep in mind that git is very helpful for tracking frequent changes to a
project which is still under active development (like freebayes), so it's
worth requesting that your system administrator install git. It's a very
standard linux package--- the kernel tree itself is maintained using git,
and development on git was begun by Linus Torvalds in response to problems
with other revision control systems.

On Fri, Jul 22, 2011 at 9:46 AM, biopolyhedron <
reply@reply.github.com>wrote:

Yes, I've checked README, but since I'm not sudo of the server (of my
institute), I'm also not able to install git. therefore, I could only
download the .tar.gz (from the "Downloads" button). It would be more
user-friendly if, like samtools does, I can avoid git (of which installation
might be more complicate than installing freebayes) and make the file all in
the subdirectory (in my personal folder) without having to touch public
folder like where only sudo accounts can change.

Reply to this email directly or view it on GitHub:
#14 (comment)

Thanks a lot! This time the code seems much wholer.

Unfortunately, I still got warnings and errors when "make" (see below). I'm
using gcc version 3.4.5 20051201, may be it's too old. there's another
"/usr/bin/gcc4" installed showing version 4.0.2. again, a non-sudo user
cannot install a more up-to-date compiler.

Hopefully I can do something useful to you. tell me if you need more
information from me.

-bash-3.00$ make
cd src && make
make[1]: Entering directory /==myfolder==/freebayes/src' g++ -O3 -c freebayes.cpp In file included from freebayes.cpp:25: Allele.h: In constructorAllele::Allele(AlleleType, std::string&, long
double, long double_, char_, unsigned int, int, int, std::string,
std::string&, std::string&, std::string&, bool, long double, std::string,
short int, bool, bool, bool)':
Allele.h:173: warning: passing long double' for converting 1 oflong
double phred2ln(int)'
freebayes.cpp: In function int main(int, char**)': freebayes.cpp:659: warning: converting tolong unsigned int' from long double' g++ -O3 -c BamAlignment.cpp BamAlignment.cpp:687:2: warning: no newline at end of file g++ -O3 -c BamMultiReader.cpp g++ -O3 -c BamReader.cpp g++ -O3 -c BamWriter.cpp g++ -O3 -c BamIndex.cpp g++ -O3 -c BGZF.cpp g++ -O3 -c BedReader.cpp g++ -O3 -c CNV.cpp gcc -O3 -c fastlz.c g++ -O3 -c Fasta.cpp g++ -O3 -c Parameters.cpp g++ -O3 -c Allele.cpp In file included from Allele.cpp:1: Allele.h: In constructorAllele::Allele(AlleleType, std::string&, long
double, long double_, char_, unsigned int, int, int, std::string,
std::string&, std::string&, std::string&, bool, long double, std::string,
short int, bool, bool, bool)':
Allele.h:173: warning: passing long double' for converting 1 oflong
double phred2ln(int)'
Allele.cpp: In member function int Allele::referenceOffset() const': Allele.cpp:10: warning: converting toint' from long double' Allele.cpp: In member functionvoid Allele::update()':
Allele.cpp:17: warning: passing long double' for converting 1 oflong
double phred2ln(int)'
Allele.cpp: In member function const int Allele::subquality(int, int) const': Allele.cpp:26: warning: converting toint' from long double' Allele.cpp: In member functionconst int Allele::subquality(const Allele&)
const':
Allele.cpp:41: warning: converting to int' fromlong double'
Allele.cpp: In member function const short int Allele::currentQuality() const': Allele.cpp:150: warning: converting toshort int' from const long double' g++ -O3 -c Sample.cpp In file included from Sample.h:9, from Sample.cpp:1: Allele.h: In constructorAllele::Allele(AlleleType, std::string&, long
double, long double_, char_, unsigned int, int, int, std::string,
std::string&, std::string&, std::string&, bool, long double, std::string,
short int, bool, bool, bool)':
Allele.h:173: warning: passing long double' for converting 1 oflong
double phred2ln(int)'
Sample.cpp: In member function int Sample::qualSum(const std::string&)': Sample.cpp:38: warning: converting toint' from long double' g++ -O3 -c Result.cpp In file included from Genotype.h:16, from Result.h:8, from Result.cpp:1: Allele.h: In constructorAllele::Allele(AlleleType, std::string&, long
double, long double_, char_, unsigned int, int, int, std::string,
std::string&, std::string&, std::string&, bool, long double, std::string,
short int, bool, bool, bool)':
Allele.h:173: warning: passing long double' for converting 1 oflong
double phred2ln(int)'
g++ -O3 -c AlleleParser.cpp
In file included from AlleleParser.h:23,
from AlleleParser.cpp:1:
Allele.h: In constructor Allele::Allele(AlleleType, std::string&, long double, long double*, char*, unsigned int, int, int, std::string, std::string&, std::string&, std::string&, bool, long double, std::string, short int, bool, bool, bool)': Allele.h:173: warning: passinglong double' for converting 1 of long double phred2ln(int)' AlleleParser.cpp: In member functionvoid
AlleleParser::preserveReferenceSequenceWindow(int)':
AlleleParser.cpp:512: warning: converting to int' fromlong double'
AlleleParser.cpp:519: warning: converting to int' fromlong double'
AlleleParser.cpp: In member function int AlleleParser::currentSamplePloidy(const std::string&)': AlleleParser.cpp:696: warning: passinglong double' for converting 3 of
int CNVMap::ploidy(const std::string&, const std::string&, long int)' AlleleParser.cpp: In member functionstd::string
AlleleParser::currentReferenceBaseString()':
AlleleParser.cpp:779: warning: passing long double' for converting 1 ofstd::basic_string<_CharT, _Traits, _Alloc> std::basic_string<_CharT,
_Traits, _Alloc>::substr(typename _Alloc::size_type, typename
_Alloc::size_type) const [with _CharT = char, _Traits =
std::char_traits, _Alloc = std::allocator]'
AlleleParser.cpp: In member function __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > AlleleParser::currentReferenceBaseIterator()': AlleleParser.cpp:783: warning: passinglong double' for converting 1 of
__gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator+(const typename std::iterator_traits<_Iterator>::difference_type&) const [with _Iterator = char*, _Container = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]' AlleleParser.cpp: In member functionstd::string
AlleleParser::referenceSubstr(long double, unsigned int)':
AlleleParser.cpp:787: warning: passing long double' for converting 2 ofstd::string FastaReference::getSubSequence(std::string, int, int)'
AlleleParser.cpp: In member function bool AlleleParser::isCpG(std::string&)': AlleleParser.cpp:796: warning: passinglong double' for converting 1 of
std::basic_string<_CharT, _Traits, _Alloc> std::basic_string<_CharT, _Traits, _Alloc>::substr(typename _Alloc::size_type, typename _Alloc::size_type) const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' AlleleParser.cpp:797: warning: passinglong double' for converting 1 of
std::basic_string<_CharT, _Traits, _Alloc> std::basic_string<_CharT, _Traits, _Alloc>::substr(typename _Alloc::size_type, typename _Alloc::size_type) const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' AlleleParser.cpp:798: warning: passinglong double' for converting 1 of
std::basic_string<_CharT, _Traits, _Alloc> std::basic_string<_CharT, _Traits, _Alloc>::substr(typename _Alloc::size_type, typename _Alloc::size_type) const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' AlleleParser.cpp: In member functionRegisteredAlignment&
AlleleParser::registerAlignment(BamTools::BamAlignment&,
RegisteredAlignment&, std::string&, std::string&)':
AlleleParser.cpp:1334: warning: converting to int' fromlong double'
AlleleParser.cpp: In member function void AlleleParser::updateRegisteredAlleles()': AlleleParser.cpp:1468: warning: converting tolong unsigned int' from long double' AlleleParser.cpp: In member functionbool AlleleParser::toNextPosition()':
AlleleParser.cpp:1992: warning: passing long double' for converting 1 oftypename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>,
std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, _Alloc>::iterator
std::map<_Key, _Tp, _Compare, _Alloc>::find(const _Key&) [with _Key = long
unsigned int, _Tp = std::deque<RegisteredAlignment,
std::allocator >, Compare = std::less, Alloc = std::allocator<std::pair<const long unsigned int,
std::deque<RegisteredAlignment, std::allocator > > >]'
AlleleParser.cpp: In member function std::vector<Allele, std::allocator<Allele> > AlleleParser::genotypeAlleles(std::map<std::string, std::vector<Allele*, std::allocator<Allele*> >, std::less<std::string>, std::allocator<std::pair<const std::string, std::vector<Allele*, std::allocator<Allele*> > > > >&, Samples&, std::vector<Allele, std::allocator<Allele> >&, bool)': AlleleParser.cpp:2195: warning: converting toint' from long double' AlleleParser.cpp:2233: warning: converting toint' from long double' AlleleParser.cpp: In member functionint
AlleleParser::homopolymerRunLeft(std::string)':
AlleleParser.cpp:2355: warning: converting to int' fromlong double'
AlleleParser.cpp: In member function int AlleleParser::homopolymerRunRight(std::string)': AlleleParser.cpp:2369: warning: converting toint' from long double' AlleleParser.cpp: In member functionstd::map<std::string, int,
std::lessstd::string, std::allocator<std::pair<const std::string, int> > >
AlleleParser::repeatCounts(int)':
AlleleParser.cpp:2386: warning: converting to int' fromlong double'
g++ -O3 -c Utility.cpp
g++ -O3 -c Genotype.cpp
In file included from Genotype.h:16,
from Genotype.cpp:1:
Allele.h: In constructor Allele::Allele(AlleleType, std::string&, long double, long double*, char*, unsigned int, int, int, std::string, std::string&, std::string&, std::string&, bool, long double, std::string, short int, bool, bool, bool)': Allele.h:173: warning: passinglong double' for converting 1 of long double phred2ln(int)' g++ -O3 -c DataLikelihood.cpp In file included from DataLikelihood.h:12, from DataLikelihood.cpp:1: Allele.h: In constructorAllele::Allele(AlleleType, std::string&, long
double, long double
, char
, unsigned int, int, int, std::string,
std::string&, std::string&, std::string&, bool, long double, std::string,
short int, bool, bool, bool)':
Allele.h:173: warning: passing long double' for converting 1 oflong
double phred2ln(int)'
g++ -O3 -c Multinomial.cpp
g++ -O3 -c Ewens.cpp
g++ -O3 -c ResultData.cpp
In file included from Genotype.h:16,
from ResultData.h:7,
from ResultData.cpp:1:
Allele.h: In constructor Allele::Allele(AlleleType, std::string&, long double, long double*, char*, unsigned int, int, int, std::string, std::string&, std::string&, std::string&, bool, long double, std::string, short int, bool, bool, bool)': Allele.h:173: warning: passinglong double' for converting 1 of long double phred2ln(int)' ResultData.cpp: In member functionvcf::Variant&
Results::vcf(vcf::Variant&, long double, long double, Samples&, std::string,
std::vector<Allele, std::allocator >&, std::map<std::string, int,
std::lessstd::string, std::allocator<std::pair<const std::string, int> >

, std::vector<std::string, std::allocatorstd::string >&, int,
GenotypeCombo&, bool, std::map<std::string, std::vector<Allele*,
std::allocator<Allele*> >, std::lessstd::string,
std::allocator<std::pair<const std::string, std::vector<Allele*,
std::allocator<Allele*> > > > >&, std::map<int, std::vector<Genotype,
std::allocator >, std::less, std::allocator<std::pair<const
int, std::vector<Genotype, std::allocator > > > >&,
std::vector<std::string, std::allocatorstd::string >&, AlleleParser_)':
ResultData.cpp:160: error: 'class std::map<std::string, std::vector<Allele_,
std::allocator<Allele*> >, std::lessstd::string,
std::allocator<std::pair<const std::string, std::vector<Allele*,
std::allocator<Allele*> > > > >' has no member named 'at'
ResultData.cpp:314: error: 'class std::map<std::string, std::vector<Allele*,
std::allocator<Allele*> >, std::lessstd::string,
std::allocator<std::pair<const std::string, std::vector<Allele*,
std::allocator<Allele*> > > > >' has no member named 'at'
make[1]: *** [ResultData.o] Error 1
make[1]: Leaving directory `/==myfolder==/freebayes/src'
make: *** [all] Error 2

2011/7/22 ekg <
reply@reply.github.com>

Unfortunately, git-archive, which github uses to provide you with the
up-to-date tarballs for download, is broken in the sense that it cannot
handle submodules. I did not realize this when I first started using the
submodules, and I apologize for the trouble which this has caused you.

I'll look into setting up a cron job to make nightly build archives on our
own FTP server so that other users won't have this issue.

Until then, please use:
http://clavius.bc.edu/~erik/freebayes/freebayes-f6b1ab70.tar.bz2, which is
the most-current version from git.

Keep in mind that git is very helpful for tracking frequent changes to a
project which is still under active development (like freebayes), so it's
worth requesting that your system administrator install git. It's a very
standard linux package--- the kernel tree itself is maintained using git,
and development on git was begun by Linus Torvalds in response to problems
with other revision control systems.

On Fri, Jul 22, 2011 at 9:46 AM, biopolyhedron <
reply@reply.github.com>wrote:

Yes, I've checked README, but since I'm not sudo of the server (of my
institute), I'm also not able to install git. therefore, I could only
download the .tar.gz (from the "Downloads" button). It would be more
user-friendly if, like samtools does, I can avoid git (of which
installation
might be more complicate than installing freebayes) and make the file all
in
the subdirectory (in my personal folder) without having to touch public
folder like where only sudo accounts can change.

Reply to this email directly or view it on GitHub:
#14 (comment)

Reply to this email directly or view it on GitHub:
#14 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment