JorgeGonzalezC / treemix

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

trouble compiling treemix Mac OS 10.7 #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I downloaded Treemix 1.1
2. I installed gsl 1.15
3. I installed BOOST
4. I followed TreeMix installation instructions through ./compile.
5. When I type sudo make, I get the following errors:

Settings.hpp:29:31: error: boost/tokenizer.hpp: No such file or directory
Settings.hpp:43:40: error: boost/graph/graph_traits.hpp: No such file or 
directory
Settings.hpp:44:42: error: boost/graph/adjacency_list.hpp: No such file or 
directory
Settings.hpp:45:44: error: boost/graph/topological_sort.hpp: No such file or 
directory
Settings.hpp:46:51: error: boost/graph/dijkstra_shortest_paths.hpp: No such 
file or directory
Settings.hpp:47:38: error: boost/algorithm/string.hpp: No such file or directory
In file included from TreeMix.cpp:8:
Settings.hpp:69: error: ‘boost’ has not been declared
Settings.hpp:70: error: ‘boost’ has not been declared
Settings.hpp:71: error: ‘boost’ has not been declared
Settings.hpp:72: error: ‘boost’ has not been declared
In file included from GraphState2.h:12,
                 from TreeMix.cpp:10:
PopGraph.h:32: error: expected initializer before ‘<’ token
PopGraph.h:34: error: ‘boost’ has not been declared
PopGraph.h:34: error: expected initializer before ‘<’ token
PopGraph.h:35: error: ‘boost’ has not been declared
PopGraph.h:35: error: expected initializer before ‘<’ token
PopGraph.h:56: error: ‘Graph’ does not name a type
PopGraph.h:60: error: ‘Graph’ was not declared in this scope
PopGraph.h:60: error: template argument 1 is invalid
PopGraph.h:60: error: template argument 2 is invalid
PopGraph.h:62: error: ‘Graph’ has not been declared
PopGraph.h:62: error: ISO C++ forbids declaration of ‘vertex_descriptor’ 
with no type
PopGraph.h:62: error: expected ‘;’ before ‘root’
PopGraph.h:63: error: ‘Graph’ was not declared in this scope
PopGraph.h:63: error: template argument 2 is invalid
PopGraph.h:63: error: template argument 4 is invalid
PopGraph.h:65: error: ‘Graph’ has not been declared
PopGraph.h:65: error: ISO C++ forbids declaration of ‘vertex_descriptor’ 
with no type
PopGraph.h:65: error: expected ‘;’ before ‘add_tip’
PopGraph.h:66: error: ‘Graph’ has not been declared
PopGraph.h:69: error: ‘Graph’ has not been declared
PopGraph.h:70: error: ‘Graph’ was not declared in this scope
PopGraph.h:70: error: template argument 1 is invalid
PopGraph.h:70: error: template argument 2 is invalid
PopGraph.h:70: error: template argument 3 is invalid
PopGraph.h:71: error: ‘Graph’ was not declared in this scope
PopGraph.h:71: error: template argument 1 is invalid
PopGraph.h:71: error: template argument 2 is invalid
PopGraph.h:71: error: template argument 3 is invalid
PopGraph.h:74: error: ‘Graph’ was not declared in this scope
PopGraph.h:74: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
PopGraph.h:76: error: ‘Graph’ was not declared in this scope
PopGraph.h:76: error: template argument 2 is invalid
PopGraph.h:76: error: template argument 4 is invalid
PopGraph.h:76: error: ‘Graph’ has not been declared
PopGraph.h:77: error: ‘Graph’ was not declared in this scope
PopGraph.h:77: error: template argument 2 is invalid
PopGraph.h:77: error: template argument 4 is invalid
PopGraph.h:77: error: ‘Graph’ has not been declared
PopGraph.h:79: error: ‘Graph’ has not been declared
PopGraph.h:80: error: ‘Graph’ has not been declared
PopGraph.h:81: error: ‘Graph’ has not been declared
PopGraph.h:84: error: ‘Graph’ was not declared in this scope
PopGraph.h:84: error: template argument 1 is invalid
PopGraph.h:84: error: template argument 2 is invalid
PopGraph.h:85: error: ‘Graph’ has not been declared
PopGraph.h:85: error: ‘Graph’ was not declared in this scope
PopGraph.h:85: error: template argument 1 is invalid
PopGraph.h:85: error: template argument 2 is invalid
PopGraph.h:86: error: ‘Graph’ was not declared in this scope
PopGraph.h:86: error: template argument 1 is invalid
PopGraph.h:86: error: template argument 2 is invalid
PopGraph.h:87: error: ‘Graph’ was not declared in this scope
PopGraph.h:87: error: template argument 1 is invalid
PopGraph.h:87: error: template argument 2 is invalid
PopGraph.h:90: error: ‘Graph’ has not been declared
PopGraph.h:90: error: ISO C++ forbids declaration of ‘vertex_descriptor’ 
with no type
PopGraph.h:90: error: expected ‘;’ before ‘get_LCA’
PopGraph.h:93: error: ‘Graph’ was not declared in this scope
PopGraph.h:93: error: template argument 1 is invalid
PopGraph.h:93: error: template argument 2 is invalid
PopGraph.h:93: error: template argument 3 is invalid
PopGraph.h:93: error: ‘Graph’ has not been declared
PopGraph.h:94: error: ‘Graph’ was not declared in this scope
PopGraph.h:94: error: template argument 1 is invalid
PopGraph.h:94: error: template argument 2 is invalid
PopGraph.h:94: error: ‘Graph’ has not been declared
PopGraph.h:97: error: ‘Graph’ has not been declared
PopGraph.h:103: error: ‘Graph’ has not been declared
PopGraph.h:103: error: ‘Graph’ has not been declared
PopGraph.h:107: error: ‘Graph’ has not been declared
PopGraph.h:109: error: ‘Graph’ has not been declared
PopGraph.h:109: error: ‘Graph’ has not been declared
PopGraph.h:110: error: ‘Graph’ has not been declared
PopGraph.h:111: error: ‘Graph’ has not been declared
PopGraph.h:112: error: ‘Graph’ has not been declared
PopGraph.h:115: error: ‘Graph’ has not been declared
PopGraph.h:115: error: ISO C++ forbids declaration of ‘edge_descriptor’ 
with no type
PopGraph.h:115: error: expected ‘;’ before ‘add_mig_edge’
PopGraph.h:116: error: ‘Graph’ was not declared in this scope
PopGraph.h:116: error: template argument 1 is invalid
PopGraph.h:116: error: template argument 2 is invalid
PopGraph.h:116: error: template argument 3 is invalid
PopGraph.h:116: error: template argument 2 is invalid
PopGraph.h:116: error: template argument 1 is invalid
PopGraph.h:116: error: template argument 2 is invalid
PopGraph.h:116: error: template argument 3 is invalid
PopGraph.h:116: error: ‘Graph’ has not been declared
PopGraph.h:117: error: ‘Graph’ was not declared in this scope
PopGraph.h:117: error: template argument 1 is invalid
PopGraph.h:117: error: template argument 2 is invalid
PopGraph.h:117: error: template argument 3 is invalid
PopGraph.h:117: error: template argument 2 is invalid
PopGraph.h:117: error: template argument 1 is invalid
PopGraph.h:117: error: template argument 2 is invalid
PopGraph.h:117: error: template argument 3 is invalid
PopGraph.h:117: error: ‘Graph’ has not been declared
PopGraph.h:118: error: ‘Graph’ was not declared in this scope
PopGraph.h:118: error: template argument 1 is invalid
PopGraph.h:118: error: template argument 2 is invalid
PopGraph.h:119: error: ‘Graph’ has not been declared
PopGraph.h:120: error: ‘Graph’ was not declared in this scope
PopGraph.h:120: error: template argument 1 is invalid
PopGraph.h:120: error: template argument 2 is invalid
PopGraph.h:120: error: template argument 3 is invalid
PopGraph.h:120: error: ‘Graph’ has not been declared
PopGraph.h:121: error: ‘Graph’ has not been declared
PopGraph.h:121: error: ISO C++ forbids declaration of ‘edge_descriptor’ 
with no type
PopGraph.h:121: error: expected ‘;’ before ‘get_out_mig_edge’
PopGraph.h:122: error: ‘Graph’ was not declared in this scope
PopGraph.h:122: error: wrong number of template arguments (1, should be 2)
/usr/include/c++/4.2.1/bits/stl_pair.h:68: error: provided for 
‘template<class _T1, class _T2> struct std::pair’
PopGraph.h:122: error: ‘Graph’ has not been declared
PopGraph.h:123: error: ‘Graph’ was not declared in this scope
PopGraph.h:123: error: wrong number of template arguments (1, should be 2)
/usr/include/c++/4.2.1/bits/stl_pair.h:68: error: provided for 
‘template<class _T1, class _T2> struct std::pair’
PopGraph.h:123: error: ‘Graph’ has not been declared
PopGraph.h:124: error: ‘Graph’ has not been declared
PopGraph.h:124: error: ISO C++ forbids declaration of ‘vertex_descriptor’ 
with no type
PopGraph.h:124: error: expected ‘;’ before ‘get_child_node_mig’
PopGraph.h:125: error: ‘Graph’ was not declared in this scope
PopGraph.h:125: error: wrong number of template arguments (1, should be 2)
/usr/include/c++/4.2.1/bits/stl_pair.h:68: error: provided for 
‘template<class _T1, class _T2> struct std::pair’
PopGraph.h:125: error: ‘Graph’ has not been declared
PopGraph.h:126: error: ‘Graph’ was not declared in this scope
PopGraph.h:126: error: wrong number of template arguments (1, should be 2)
/usr/include/c++/4.2.1/bits/stl_pair.h:68: error: provided for 
‘template<class _T1, class _T2> struct std::pair’
PopGraph.h:126: error: ‘Graph’ has not been declared
PopGraph.h:127: error: ‘Graph’ has not been declared
PopGraph.h:127: error: ‘Graph’ has not been declared
PopGraph.h:128: error: ‘Graph’ has not been declared
PopGraph.h:128: error: ‘Graph’ has not been declared
PopGraph.h:129: error: ‘Graph’ has not been declared
PopGraph.h:131: error: ‘Graph’ has not been declared
In file included from TreeMix.cpp:10:
GraphState2.h:91: error: ‘Graph’ was not declared in this scope
GraphState2.h:91: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:91: error: ‘Graph’ was not declared in this scope
GraphState2.h:91: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:92: error: ‘Graph’ was not declared in this scope
GraphState2.h:92: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:92: error: ‘Graph’ was not declared in this scope
GraphState2.h:92: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:93: error: ‘Graph’ was not declared in this scope
GraphState2.h:93: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:93: error: ‘Graph’ was not declared in this scope
GraphState2.h:93: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:94: error: ‘Graph’ was not declared in this scope
GraphState2.h:94: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:94: error: ‘Graph’ was not declared in this scope
GraphState2.h:94: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:96: error: ‘Graph’ was not declared in this scope
GraphState2.h:96: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:104: error: ‘Graph’ has not been declared
GraphState2.h:105: error: ‘Graph’ has not been declared
GraphState2.h:106: error: ‘Graph’ has not been declared
GraphState2.h:107: error: ‘Graph’ has not been declared
GraphState2.h:108: error: ‘Graph’ has not been declared
GraphState2.h:109: error: ‘Graph’ has not been declared
GraphState2.h:110: error: ‘Graph’ has not been declared
GraphState2.h:111: error: ‘Graph’ has not been declared
GraphState2.h:112: error: ‘Graph’ has not been declared
GraphState2.h:113: error: ‘Graph’ has not been declared
GraphState2.h:115: error: ‘Graph’ has not been declared
GraphState2.h:117: error: ‘Graph’ has not been declared
GraphState2.h:118: error: ‘Graph’ has not been declared
GraphState2.h:119: error: ‘Graph’ has not been declared
GraphState2.h:120: error: ‘Graph’ has not been declared
GraphState2.h:121: error: ‘Graph’ has not been declared
GraphState2.h:124: error: ‘Graph’ has not been declared
GraphState2.h:134: error: ‘Graph’ has not been declared
GraphState2.h:134: error: ‘Graph’ has not been declared
GraphState2.h:143: error: ‘Graph’ has not been declared
GraphState2.h:154: error: ‘Graph’ has not been declared
GraphState2.h:167: error: ‘Graph’ has not been declared
GraphState2.h:168: error: ‘Graph’ has not been declared
GraphState2.h:169: error: ‘Graph’ has not been declared
GraphState2.h:171: error: ‘Graph’ was not declared in this scope
GraphState2.h:171: error: template argument 2 is invalid
GraphState2.h:172: error: ‘Graph’ has not been declared
GraphState2.h:172: error: ISO C++ forbids declaration of ‘edge_descriptor’ 
with no type
GraphState2.h:172: error: expected ‘;’ before ‘add_mig_noopt’
GraphState2.h:180: error: ‘Graph’ was not declared in this scope
GraphState2.h:180: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:181: error: ‘Graph’ was not declared in this scope
GraphState2.h:181: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:182: error: ‘Graph’ was not declared in this scope
GraphState2.h:182: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
GraphState2.h:183: error: ‘Graph’ was not declared in this scope
GraphState2.h:183: error: template argument 1 is invalid
GraphState2.h:183: error: template argument 2 is invalid
GraphState2.h:183: error: template argument 3 is invalid
GraphState2.h:183: error: template argument 2 is invalid
GraphState2.h:183: error: template argument 1 is invalid
GraphState2.h:183: error: template argument 2 is invalid
GraphState2.h:183: error: template argument 3 is invalid
GraphState2.h:183: error: template argument 2 is invalid
GraphState2.h:183: error: template argument 4 is invalid
GraphState2.h:185: error: ‘Graph’ has not been declared
GraphState2.h:196: error: ‘Graph’ was not declared in this scope
GraphState2.h:196: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
TreeMix.cpp: In function ‘int main(int, char**)’:
TreeMix.cpp:111: error: ‘boost’ has not been declared
TreeMix.cpp:111: error: ‘boost’ has not been declared
TreeMix.cpp:236: error: ‘Graph’ was not declared in this scope
TreeMix.cpp:236: error: wrong number of template arguments (1, should be 2)
/usr/include/c++/4.2.1/bits/stl_pair.h:68: error: provided for 
‘template<class _T1, class _T2> struct std::pair’
TreeMix.cpp:236: error: invalid type in declaration before ‘=’ token
TreeMix.cpp:236: error: ‘class PopGraph’ has no member named ‘g’
TreeMix.cpp:236: error: ‘edges’ was not declared in this scope
TreeMix.cpp:237: error: ‘Graph’ is not a class or namespace
TreeMix.cpp:237: error: expected `;' before ‘it’
TreeMix.cpp:239: error: ‘it’ was not declared in this scope
TreeMix.cpp:239: error: request for member ‘second’ in ‘eds’, which is 
of non-class type ‘int’
TreeMix.cpp:240: error: ‘class PopGraph’ has no member named ‘g’
TreeMix.cpp:241: error: ‘class PopGraph’ has no member named ‘g’
TreeMix.cpp:243: error: ‘class PopGraph’ has no member named ‘g’
TreeMix.cpp:245: error: ‘Graph’ is not a class or namespace
TreeMix.cpp:245: error: expected `;' before ‘p1’
TreeMix.cpp:246: error: ‘p1’ was not declared in this scope
TreeMix.cpp:246: error: ‘class PopGraph’ has no member named 
‘get_child_node_mig’
TreeMix.cpp:247: error: ‘Graph’ is not a class or namespace
TreeMix.cpp:247: error: expected `;' before ‘p2’
TreeMix.cpp:249: error: ‘p2’ was not declared in this scope
TreeMix.cpp:265: error: ‘class PopGraph’ has no member named ‘g’
TreeMix.cpp:269: error: ‘Graph’ is not a class or namespace
TreeMix.cpp:269: error: expected `;' before ‘p1’
TreeMix.cpp:270: error: ‘p1’ was not declared in this scope
TreeMix.cpp:270: error: ‘class PopGraph’ has no member named 
‘get_child_node_mig’
TreeMix.cpp:271: error: ‘Graph’ is not a class or namespace
TreeMix.cpp:271: error: expected `;' before ‘p2’
TreeMix.cpp:273: error: ‘p2’ was not declared in this scope
TreeMix.cpp:277: error: ‘Graph’ cannot appear in a constant-expression
TreeMix.cpp:277: error: wrong number of template arguments (1, should be 4)
/usr/include/c++/4.2.1/bits/stl_map.h:93: error: provided for ‘template<class 
_Key, class _Tp, class _Compare, class _Alloc> class std::map’
TreeMix.cpp:277: error: invalid type in declaration before ‘=’ token
make[2]: *** [TreeMix.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Thanks in advance for your assistance.

Laura Feinstein
UC Davis

Original issue reported on code.google.com by laurafei...@gmail.com on 12 Oct 2012 at 9:17

GoogleCodeExporter commented 9 years ago
I seem to have solved the problem and wanted to document it in case someone 
else find it useful. Given that the first error was "boost/tokenizer.hpp: No 
such file or directory" I guessed that the installation was looking for the 
boost folder in the current directory than in the home directory. I moved the 
bost folder inside the treemix folder and then did "sudo make" and "sudo make 
install" and it worked.
In retrospect, I probably could have left the bost folder in the home 
directory. Then I could have make my working directory the home directory. Then 
I *think* I could have done 

treemix-1.1/configure
sudo make
sudo make install

and I think that would have worked as well, and been preferable because it's a 
little strange to have the boost folder located in the treemix folder. 
Nonetheless I am happy that things seem to be working for now.

All advice I give should be taken with a grain of salt... I am hardly an adept 
programmer.

Original comment by laurafei...@gmail.com on 15 Oct 2012 at 9:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I seem to have solved the problem and wanted to document it in case someone 
else finds it useful. Given that the first error was "boost/tokenizer.hpp: No 
such file or directory" I guessed that the installation was looking for the 
boost folder in the current directory rather than where it was actually 
located, in the home directory. I moved the boost folder inside the treemix 
folder and then did "sudo make" and "sudo make install" and it worked.

In retrospect, I probably could have left the bost folder in the home 
directory. Then I could have make my working directory the home directory. Then 
I *think* I could have done 

treemix-1.1/configure
sudo make
sudo make install

and I think that would have worked as well, and been preferable because it's a 
little strange to have the boost folder located in the treemix folder. 
Nonetheless I am happy that things seem to be working for now.

All advice I give should be taken with a grain of salt... I am hardly an adept 
programmer.

Original comment by laurafei...@gmail.com on 15 Oct 2012 at 9:38

GoogleCodeExporter commented 9 years ago
Hi Laura, 

Sorry for the late response, I'd not configured this site properly and so 
wasn't getting emails about issues. I'll be more active here from now on. 

As you've seen, the issue is that the configure script was finding the boost 
libraries but not telling make where to find this. This bug is fixed in the 
latest version (1.12), though your workaround also works. 

Cheers, 

Joe

Original comment by joepickrell on 5 Jun 2013 at 5:46

GoogleCodeExporter commented 9 years ago

Original comment by joepickrell on 13 Dec 2013 at 7:43