problem compiling garli 2.1 on Mac OS 10.12

42 views
Skip to first unread message

Stefan Ekman

unread,
Sep 1, 2017, 6:46:25 PM9/1/17
to garli_users
I used the build_garli.sh script with the option to check out a new version of NCL (--ncl-svn) on a Mac with OS 10.12 using the default compiler. Configuring and building NCL works fine. A warning is generated during the configuration of Garli:

checking whether build environment is sane... yes
/Users/Stefan/Downloads/garli-master/config/missing: Unknown `--is-lightweight' option
Try `/Users/Stefan/Downloads/garli-master/config/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing

The script , however, goes on to actually build Garli, which ends with an error:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in src
g++ -DHAVE_CONFIG_H -I. -I..  -I/Users/Stefan/Downloads/garli-master/ncl-svn/installed/include -I/Users/Stefan/Downloads/garli-master/ncl-svn/installed/include/ncl -DIGNORE_NXS_ASSERT -I/Users/Stefan/Downloads/garli-master/ncl-svn/installed/include -I/Users/Stefan/Downloads/garli-master/ncl-svn/installed/include/ncl -DIGNORE_NXS_ASSERT  -DUNIX -DNCL_CONST_FUNCS -DNDEBUG -Wno-uninitialized -O3 -ffast-math -funroll-loops -fstrict-aliasing -MT adaptation.o -MD -MP -MF .deps/adaptation.Tpo -c -o adaptation.o adaptation.cpp
In file included from adaptation.cpp:25:
In file included from ./funcs.h:25:
In file included from ./population.h:31:
In file included from ./individual.h:21:
In file included from ./tree.h:31:
In file included from ./treenode.h:29:
In file included from ./clamanager.h:25:
In file included from ./model.h:33:
In file included from ./sequencedata.h:27:
./datamatr.h:468:4: warning: expression result unused [-Wunused-value]
                        byCounts;
                        ^~~~~~~~
In file included from adaptation.cpp:25:
In file included from ./funcs.h:25:
In file included from ./population.h:31:
In file included from ./individual.h:21:
In file included from ./tree.h:31:
In file included from ./treenode.h:29:
In file included from ./clamanager.h:25:
./model.h:974:45: warning: expression result unused [-Wunused-value]
                else if(_stricmp(str, "nucleotide") == 0) str;
                                                          ^~~
./model.h:972:38: warning: expression result unused [-Wunused-value]
                else if(_stricmp(str, "dna") == 0) str;
                                                   ^~~
In file included from adaptation.cpp:18:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iostream:38:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:216:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:702:71: error: 
      invalid operands to binary expression ('const ReconNode' and 'const ReconNode')
    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
                                                                  ~~~ ^ ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/list:2197:13: note: 
      in instantiation of member function 'std::__1::__less<ReconNode, ReconNode>::operator()' requested here
        if (__comp(*--__e2, *__f1))
            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/list:2183:5: note: 
      in instantiation of function template specialization 'std::__1::list<ReconNode, std::__1::allocator<ReconNode>
      >::__sort<std::__1::__less<ReconNode, ReconNode> >' requested here
    __sort(begin(), end(), base::__sz(), __comp);
    ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/list:2174:5: note: 
      in instantiation of function template specialization 'std::__1::list<ReconNode, std::__1::allocator<ReconNode>
      >::sort<std::__1::__less<ReconNode, ReconNode> >' requested here
    sort(__less<value_type>());
    ^
./reconnode.h:209:5: note: in instantiation of member function 'std::__1::list<ReconNode, std::__1::allocator<ReconNode>
      >::sort' requested here
                l.sort();
                  ^
./reconnode.h:53:7: note: candidate function not viable: 'this' argument has type 'const ReconNode', but method is not
      marked const
        bool operator<(const ReconNode &rhs){
             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:430:1: note: 
      candidate template ignored: could not match 'pair<type-parameter-0-0, type-parameter-0-1>' against
      'const ReconNode'
operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:592:1: note: 
      candidate template ignored: could not match 'reverse_iterator<type-parameter-0-0>' against 'const ReconNode'
operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:996:1: note: 
      candidate template ignored: could not match 'move_iterator<type-parameter-0-0>' against 'const ReconNode'
operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:1312:1: note: 
      candidate template ignored: could not match '__wrap_iter<type-parameter-0-0>' against 'const ReconNode'
operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:2995:1: note: 
      candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against
      'const ReconNode'
operator< (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3053:1: note: 
      candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against
      'const ReconNode'
operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:3062:1: note: 
      candidate template ignored: could not match 'unique_ptr<type-parameter-0-0, type-parameter-0-1>' against
      'const ReconNode'
operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4889:1: note: 
      candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const ReconNode'
operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4954:1: note: 
      candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const ReconNode'
operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:4962:1: note: 
      candidate template ignored: could not match 'shared_ptr<type-parameter-0-0>' against 'const ReconNode'
operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
^
3 warnings and 1 error generated.
make[2]: *** [adaptation.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

What can be done to overcome this problem?

Best wishes,
Stefan


Derrick Zwickl

unread,
Sep 1, 2017, 6:52:37 PM9/1/17
to garli...@googlegroups.com


Hi Stefan,

Sorry for the trouble.  I don't have a version of Sierra to test with yet.  Something must have changed slightly with the compiler.

I think that it will probably work if you change reconnode.h line 53 to
    bool operator<(const ReconNode &rhs) const{

Let me know if you have further problems.  I'll look into the message regarding the "missing" file as well.

Best,
Derrick
--
You received this message because you are subscribed to the Google Groups "garli_users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to garli_users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Stefan Ekman

unread,
Sep 4, 2017, 2:47:47 AM9/4/17
to garli_users
Hi Derrick,

Adjusting line 53 in reconnode.h helped! I was able to compile sequential and parallel binaries, which I am testing now. Both seem to work fine. Many thanks for the help!

Best wishes,
Stefan




Reply all
Reply to author
Forward
0 new messages