Shicheng-Guo / bsmap

Automatically exported from code.google.com/p/bsmap
0 stars 0 forks source link

Compilation error on Mac OS X 10.9 #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. make
2.
3.

What is the expected output? What do you see instead?

$ make
g++ -DMAXHITS=1000 -DTHREAD -funroll-loops -Lsamtools -Isamtools -Lgzstream 
-Igzstream -O3 -m64 -c align.cpp -o align.o
clang: warning: argument unused during compilation: '-Lsamtools'
clang: warning: argument unused during compilation: '-Lgzstream'
g++ -DMAXHITS=1000 -DTHREAD -funroll-loops -Lsamtools -Isamtools -Lgzstream 
-Igzstream -O3 -m64 -c dbseq.cpp -o dbseq.o
clang: warning: argument unused during compilation: '-Lsamtools'
clang: warning: argument unused during compilation: '-Lgzstream'
dbseq.cpp:178:126: warning: comparison of unsigned expression >= 0 is always 
true [-Wtautological-compare]
            for(i=0,seedloc=*rit+param.digest_site.size()-2*param.digest_pos-param.seed_size;i<param.max_seedseg_num&&seedloc>=0;i++,seedloc-=param.seed_size)
                                                                                                                      ~~~~~~~^ ~
1 warning generated.
g++ -DMAXHITS=1000 -DTHREAD -funroll-loops -Lsamtools -Isamtools -Lgzstream 
-Igzstream -O3 -m64 -c main.cpp -o main.o
clang: warning: argument unused during compilation: '-Lsamtools'
clang: warning: argument unused during compilation: '-Lgzstream'
main.cpp:61:14: error: reference to 'ref' is ambiguous
                a.Do_Batch(ref);
                           ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:95:14: error: reference to 'ref' is ambiguous
                a.Do_Batch(ref);
                           ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:121:36: error: reference to 'ref' is ambiguous
void* wrapper_CalKmerFreq0(void*) {ref.t_CalKmerFreq(0); return NULL;}
                                   ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:122:36: error: reference to 'ref' is ambiguous
void* wrapper_CalKmerFreq1(void*) {ref.t_CalKmerFreq(1); return NULL;}
                                   ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:123:34: error: reference to 'ref' is ambiguous
void* wrapper_FillIndex0(void*) {ref.t_FillIndex(0); return NULL;}
                                 ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:124:34: error: reference to 'ref' is ambiguous
void* wrapper_FillIndex1(void*) {ref.t_FillIndex(1); return NULL;}
                                 ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:127:22: error: reference to 'ref' is ambiguous
        if(param.RRBS_flag) ref.CreateIndex();
                            ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:130:3: error: reference to 'ref' is ambiguous
                ref.InitialIndex();
                ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:134:3: error: reference to 'ref' is ambiguous
                ref.AllocIndex();
                ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:442:22: error: reference to 'ref' is ambiguous
                        for(bit32_t i=0;i<ref.total_num;i++){
                                          ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:443:39: error: reference to 'ref' is ambiguous
                                sprintf(_ch,"@SQ\tSN:%s\tLN:%u\n",ref.title[i<<1].name.c_str(),ref.title[i<<1].size);
                                                                  ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:489:25: error: reference to 'ref' is ambiguous
                for(bit32_t i=0;i<ref.total_num;i++) {
                                  ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:490:45: error: reference to 'ref' is ambiguous
                    sprintf(_ch,"@SQ\tSN:%s\tLN:%u\n",ref.title[i<<1].name.c_str(),ref.title[i<<1].size);
                                                      ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:540:2: error: reference to 'ref' is ambiguous
        ref.Run_ConvertBinseq(fin_db, gzfin_db);
        ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:541:20: error: reference to 'ref' is ambiguous
        cerr<<"Load in "<<ref.total_num<<" db seqs, total size "<<ref.sum_length<<" bp. "<<Cal_AllTime()<<" secs passed"<<endl;                 
                          ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:541:60: error: reference to 'ref' is ambiguous
        cerr<<"Load in "<<ref.total_num<<" db seqs, total size "<<ref.sum_length<<" bp. "<<Cal_AllTime()<<" secs passed"<<endl;                 
                                                                  ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
main.cpp:562:5: error: reference to 'ref' is ambiguous
    ref.ReleaseIndex();
    ^
main.cpp:36:8: note: candidate found by name lookup is 'ref'
RefSeq ref;
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1066:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(reference_wrapper<_Tp> __t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u
sr/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate found by name 
lookup is 'std::__1::ref'
ref(_Tp& __t)
^
17 errors generated.
make: *** [main.o] Error 1

What version of the product are you using? On what operating system?
Trying to compile v2.7.4 on Mac OS X 10.9

Please provide any additional information below.

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix

Original issue reported on code.google.com by ed.d...@gmail.com on 29 Oct 2013 at 3:06

GoogleCodeExporter commented 9 years ago
I have the exact same problem. And I am using v2.7.4 on Mac OS X 10.9.2

Original comment by varsha.r...@gmail.com on 23 Apr 2014 at 10:01

GoogleCodeExporter commented 9 years ago
Same problem on ubuntu 14.10

Original comment by trustn...@gmail.com on 20 May 2014 at 6:50

GoogleCodeExporter commented 9 years ago
I have the same problem with bsmap-2.87 on Mac OS X 10.9.3. 
And the solution are:
1. replace main.cpp in bsmap file with the attached main.cpp
2. replace param.cpp in bsmap file with the attached param.cpp
3. download the newest samtools from 
http://sourceforge.net/projects/samtools/files/samtools/0.1.19/samtools-0.1.19.t
ar.bz2/download
4. install samtools as instruction
5. replace bsmap/samtools file with the newest installed samtools file

After those try to install bsmap again and it should work!

Original comment by Wanlu....@gmail.com on 9 Jul 2014 at 10:44

Attachments:

GoogleCodeExporter commented 9 years ago
I had a similar problem and followed the 5 instructions listed in the previous 
comment and I received the following error, can you suggest a next step?:

NWCDM04072992:bsmap-2.87 mackenzie.gavery$ make
g++ -DMAXHITS=10000 -DTHREAD -funroll-loops -Lsamtools -Isamtools -Lgzstream 
-Igzstream -O3 -m64 -c main.cpp -o main.o
clang: warning: argument unused during compilation: '-Lsamtools'
clang: warning: argument unused during compilation: '-Lgzstream'
main.cpp:295:60: warning: comparison of unsigned expression < 0 is always false
      [-Wtautological-compare]
  ...if(param.report_repeat_hits>2||param.report_repeat_hits<0) {
                                    ~~~~~~~~~~~~~~~~~~~~~~~~^~
main.cpp:301:50: warning: comparison of unsigned expression < 0 is always false
      [-Wtautological-compare]
  ...if(param.verbose_level>2||param.verbose_level<0) {
                               ~~~~~~~~~~~~~~~~~~~^~
2 warnings generated.
g++ -DMAXHITS=10000 -DTHREAD -funroll-loops -Lsamtools -Isamtools -Lgzstream 
-Igzstream -O3 -m64 -c pairs.cpp -o pairs.o
clang: warning: argument unused during compilation: '-Lsamtools'
clang: warning: argument unused during compilation: '-Lgzstream'
g++ -DMAXHITS=10000 -DTHREAD -funroll-loops -Lsamtools -Isamtools -Lgzstream 
-Igzstream -O3 -m64 -c param.cpp -o param.o
clang: warning: argument unused during compilation: '-Lsamtools'
clang: warning: argument unused during compilation: '-Lgzstream'
param.cpp:8:20: error: use of undeclared identifier '_SC_NPROCESSORS_ONLN'
        num_procs=sysconf(_SC_NPROCESSORS_ONLN);
                          ^
param.cpp:85:25: warning: comparison of unsigned expression < 0 is always false
      [-Wtautological-compare]
    if((dp=ds.find('-'))<0) {
       ~~~~~~~~~~~~~~~~~^~
1 warning and 1 error generated.
make: *** [param.o] Error 1

Original comment by mgav...@uw.edu on 22 Oct 2014 at 7:02