gchen98 / macs

Automatically exported from code.google.com/p/macs
16 stars 6 forks source link

macs install problem - because of Boost? #7

Closed GoogleCodeExporter closed 9 years ago

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

What is the expected output? What do you see instead?
macs doesn't 'make'
Get huge error message:

make allg++ -Wall -g -I /Users/garychen/software/boost_1_36_0 -c simulator.cpp
In file included from simulator.cpp:7:
simulator.h:8:29: error: boost/weak_ptr.hpp: No such file or directory
simulator.h:9:31: error: boost/shared_ptr.hpp: No such file or directory
simulator.h:10:34: error: boost/intrusive_ptr.hpp: No such file or directory
simulator.h:11:44: error: boost/random/mersenne_twister.hpp: No such file or 
directory
simulator.h:12:38: error: boost/random/uniform_01.hpp: No such file or directory
In file included from simulator.cpp:7:
simulator.h:42: error: ‘boost’ has not been declared
simulator.h:42: error: expected initializer before ‘<’ token
simulator.h:43: error: ‘NodePtr’ was not declared in this scope
simulator.h:43: error: template argument 1 is invalid
simulator.h:43: error: template argument 2 is invalid
simulator.h:43: error: invalid type in declaration before ‘;’ token
simulator.h:44: error: ‘NodePtr’ was not declared in this scope
simulator.h:44: error: template argument 1 is invalid
simulator.h:44: error: template argument 2 is invalid
simulator.h:44: error: invalid type in declaration before ‘;’ token
simulator.h:45: error: ‘NodePtr’ was not declared in this scope
simulator.h:45: error: template argument 1 is invalid
simulator.h:45: error: template argument 3 is invalid
simulator.h:45: error: invalid type in declaration before ‘;’ token
simulator.h:49: error: ‘boost’ has not been declared
simulator.h:49: error: expected initializer before ‘<’ token
simulator.h:52: error: ‘boost’ has not been declared
simulator.h:52: error: expected initializer before ‘<’ token
simulator.h:54: error: ‘EdgePtr’ was not declared in this scope
simulator.h:54: error: template argument 1 is invalid
simulator.h:54: error: template argument 2 is invalid
simulator.h:54: error: invalid type in declaration before ‘;’ token
simulator.h:57: error: ‘EdgePtr’ was not declared in this scope
simulator.h:57: error: template argument 1 is invalid
simulator.h:57: error: template argument 2 is invalid
simulator.h:57: error: invalid type in declaration before ‘;’ token
simulator.h:64: error: ‘boost’ has not been declared
simulator.h:64: error: expected initializer before ‘<’ token
simulator.h:65: error: ‘EventPtr’ was not declared in this scope
simulator.h:65: error: template argument 1 is invalid
simulator.h:65: error: template argument 2 is invalid
simulator.h:65: error: invalid type in declaration before ‘;’ token
simulator.h:165: error: expected `)' before ‘&’ token
simulator.h:168: error: ISO C++ forbids declaration of ‘NodePtr’ with no 
type
simulator.h:168: error: expected ‘;’ before ‘&’ token
simulator.h:169: error: ISO C++ forbids declaration of ‘NodePtr’ with no 
type
simulator.h:169: error: expected ‘;’ before ‘&’ token
simulator.h:176: error: ‘NodePtr’ has not been declared
simulator.h:186: error: ‘NodePtr’ does not name a type
simulator.h:221: error: ‘EdgePtr’ does not name a type
simulator.h:222: error: ‘EdgePtr’ does not name a type
simulator.h:226: error: ‘EdgePtr’ has not been declared
simulator.h:226: error: ‘EdgePtr’ has not been declared
simulator.h:228: error: ‘EdgePtr’ has not been declared
simulator.h:234: error: ‘EventPtr’ has not been declared
simulator.h:243: error: ‘EventPtr’ does not name a type
simulator.h:244: error: ‘WeakEdgePtr’ does not name a type
simulator.h:412: error: ‘NodePtr’ does not name a type
simulator.h:509: error: ‘boost’ has not been declared
simulator.h:509: error: ISO C++ forbids declaration of ‘uniform_01’ with no 
type
simulator.h:509: error: expected ‘;’ before ‘<’ token
simulator.h:554: error: ‘NodePtr’ does not name a type
simulator.h:565: error: ‘EdgePtr’ does not name a type
simulator.h:568: error: ‘EdgePtr’ does not name a type
simulator.h:588: error: ISO C++ forbids declaration of ‘EdgePtr’ with no 
type
simulator.h:588: error: expected ‘;’ before ‘*’ token
simulator.h:590: error: ISO C++ forbids declaration of ‘NodePtr’ with no 
type
simulator.h:590: error: expected ‘;’ before ‘*’ token
simulator.h:612: error: ‘EdgePtr’ does not name a type
simulator.h:633: error: ‘NodePtr’ has not been declared
simulator.h:633: error: ‘EventPtr’ has not been declared
simulator.h:648: error: ‘EdgePtr’ does not name a type
simulator.h:651: error: ‘EdgePtr’ does not name a type
simulator.h:674: error: ‘EdgePtr’ has not been declared
simulator.h:682: error: ‘EdgePtr’ has not been declared
simulator.h:687: error: ‘EdgePtr’ has not been declared
simulator.h:690: error: ‘EdgePtr’ has not been declared
simulator.h:693: error: ‘EdgePtr’ has not been declared
simulator.h:698: error: ‘EdgePtr’ has not been declared
simulator.h:700: error: ‘EdgePtr’ has not been declared
simulator.h:702: error: ‘EdgePtr’ has not been declared
simulator.h:704: error: ‘EdgePtr’ has not been declared
simulator.h:704: error: ‘EdgePtr’ has not been declared
simulator.h:706: error: ‘NodePtr’ has not been declared
simulator.h:706: error: ‘EdgePtr’ has not been declared
simulator.h:709: error: ‘NodePtr’ has not been declared
simulator.h:709: error: ‘EdgePtr’ has not been declared
simulator.h:717: error: ‘NodePtr’ has not been declared
simulator.h:749: error: expected ‘,’ or ‘...’ before ‘&’ token
simulator.h:749: error: ISO C++ forbids declaration of ‘NodePtr’ with no 
type
simulator.h: In member function ‘bool byNodePtr::operator()(int) const’:
simulator.h:750: error: ‘node1’ was not declared in this scope
simulator.h:750: error: ‘node2’ was not declared in this scope
simulator.h: At global scope:
simulator.h:756: error: expected ‘,’ or ‘...’ before ‘&’ token
simulator.h:756: error: ISO C++ forbids declaration of ‘EventPtr’ with no 
type
simulator.h: In member function ‘bool byEventTime::operator()(int) const’:
simulator.h:757: error: ‘event1’ was not declared in this scope
simulator.h:757: error: ‘event2’ was not declared in this scope
simulator.h: At global scope:
simulator.h:763: error: expected ‘,’ or ‘...’ before ‘&’ token
simulator.h:763: error: ISO C++ forbids declaration of ‘EdgePtr’ with no 
type
simulator.h: In member function ‘bool byBottomNode::operator()(int) const’:
simulator.h:764: error: ‘edge1’ was not declared in this scope
simulator.h:764: error: ‘edge2’ was not declared in this scope
simulator.h: At global scope:
simulator.h:800: error: expected initializer before ‘&’ token
simulator.h:804: error: expected initializer before ‘&’ token
simulator.h:838: error: ‘EdgePtr’ does not name a type
simulator.h:848: error: ‘EdgePtr’ does not name a type
simulator.h: In member function ‘void Node::removeEvent()’:
simulator.h:860: error: ‘class Node’ has no member named ‘event’
simulator.h: At global scope:
simulator.h:864: error: variable or field ‘setEvent’ declared void
simulator.h:864: error: ‘EventPtr’ was not declared in this scope
simulator.h:864: error: ‘event’ was not declared in this scope
simulator.h: In member function ‘double RandNumGenerator::expRV(double)’:
simulator.h:894: error: ‘unif’ was not declared in this scope
simulator.h: In member function ‘double RandNumGenerator::unifRV()’:
simulator.h:898: error: ‘unif’ was not declared in this scope
simulator.cpp: In constructor ‘RandNumGenerator::RandNumGenerator(long 
unsigned int)’:
simulator.cpp:14: error: ‘boost’ has not been declared
simulator.cpp:14: error: expected `;' before ‘mt’
simulator.cpp:15: error: ‘unif’ was not declared in this scope
simulator.cpp:15: error: expected type-specifier before ‘boost’
simulator.cpp:15: error: expected `;' before ‘boost’
simulator.cpp: In destructor ‘RandNumGenerator::~RandNumGenerator()’:
simulator.cpp:19: error: ‘unif’ was not declared in this scope
simulator.cpp: In member function ‘void 
Simulator::readInputParameters(CommandArguments)’:
simulator.cpp:169: error: ‘EventPtr’ was not declared in this scope
simulator.cpp:169: error: expected `;' before ‘wrapper’
simulator.cpp:501: error: ‘wrapper’ was not declared in this scope
simulator.cpp:515: error: ‘wrapper’ was not declared in this scope
simulator.cpp:530: error: ‘wrapper’ was not declared in this scope
simulator.cpp:544: error: ‘wrapper’ was not declared in this scope
simulator.cpp:558: error: ‘wrapper’ was not declared in this scope
simulator.cpp:580: error: ‘wrapper’ was not declared in this scope
simulator.cpp:604: error: ‘wrapper’ was not declared in this scope
simulator.cpp:650: error: ‘wrapper’ was not declared in this scope
simulator.cpp:664: error: ‘wrapper’ was not declared in this scope
simulator.cpp:675: error: request for member ‘push_back’ in ‘* 
pEventList’, which is of non-class type ‘int’
simulator.cpp:675: error: ‘wrapper’ was not declared in this scope
simulator.cpp:698: error: request for member ‘sort’ in ‘* pEventList’, 
which is of non-class type ‘int’
make: *** [simulator.o] Error 1

What version of the product are you using? On what operating system?
Mac OS Lion

Please provide any additional information below.
I have tried getting boost, which is now unzipped with the root directory in my 
include path, but I don't know if I need to do anything else to build or 
install it; I am not a programmer so only have an 'enduser' level of knowledge. 
Boost documentation is no help, maybe you have an easy fix? Also, is there 
anything else in the error message unrelated to boost?
Thanks
Sam

Original issue reported on code.google.com by DrSamm...@gmail.com on 2 Nov 2012 at 12:17

GoogleCodeExporter commented 9 years ago
Hi Sam,

macs is usually run on Linux environments which these days include boost out of 
the box.  For a Mac OS, we have run macs too, but you'll need to follow 
installation steps in the Boost documentation.  I'll summarize on the Wiki 
shortly.

Gary

Original comment by gche...@gmail.com on 2 Nov 2012 at 1:32

GoogleCodeExporter commented 9 years ago
Hi Gary

Thanks for getting back to me so quickly. I'm afraid I don't understand the 
Boost documentation; it says that boost doesn't need building then goes on to 
give a list of libraries that must be built separately and doesn't seem to tell 
you how to build them� As I said, I am not a programmer and don't know how 
boost fits in with macs, so I don't know which bits are relevant to me. I 
really need a line-by-line list of commands. I will have a go at getting boost 
from another source (I have seen macports recommended); hopefully that will be 
easier.

Thanks again

Sam

On 2 Nov 2012, at 13:33, <macs@googlecode.com>
 wrote:

Original comment by DrSamm...@gmail.com on 2 Nov 2012 at 2:38

GoogleCodeExporter commented 9 years ago
Hi Gary

I've used macports to install boost and it's dependencies:

The following ports are currently installed:
  boost @1.51.0_1+no_single+no_static (active)
  boost-build @2.0-m12_2 (active)
  boost-jam @3.1.18_0 (active)
  bzip2 @1.0.6_0 (active)
  expat @2.1.0_0 (active)
  icu @49.1.2_0 (active)
  libiconv @1.14_0 (active)
  zlib @1.2.7_0 (active)

I can see the boost folder and all the .hpp files (in /opt/local/include/boost)
But I'm still getting the same error message when I make all in macs.

Any suggestions? I am very keen to get simulating!

Thanks!

Sam

On 2 Nov 2012, at 13:33, <macs@googlecode.com>
 wrote:

Original comment by DrSamm...@gmail.com on 2 Nov 2012 at 3:24

GoogleCodeExporter commented 9 years ago
Sam, 

I don't know how macports works, but please follow the new Wiki I put up and 
let me know if something fails.

Gary

Original comment by gche...@gmail.com on 2 Nov 2012 at 4:23

GoogleCodeExporter commented 9 years ago
Thanks Gary, I followed your instructions and it seems to have worked, but I 
still get this error:

make all
g++ -Wall -g -I /Users/samanthaoloughlin/boost_1_51_0/include -c simulator.cpp
g++ -Wall -g -I /Users/samanthaoloughlin/boost_1_51_0/include -c algorithm.cpp
algorithm.cpp: In member function �void GraphBuilder::build()�:
algorithm.cpp:1275: error: �uint� was not declared in this scope
algorithm.cpp:1275: error: expected `;' before �iSegLength�
algorithm.cpp:1276: error: �iSegLength� was not declared in this scope
make: *** [algorithm.o] Error 1

Do think this matters, or can I ignore it?

Thanks again

Sam

On 2 Nov 2012, at 16:23, <macs@googlecode.com>
 wrote:

Original comment by DrSamm...@gmail.com on 2 Nov 2012 at 5:21

GoogleCodeExporter commented 9 years ago
Please check the last version I uploaded.  I added a single line to the header 
file.

Original comment by gche...@gmail.com on 2 Nov 2012 at 5:45

GoogleCodeExporter commented 9 years ago
Fantastic!

Many thanks

Sam

On 2 Nov 2012, at 17:45, <macs@googlecode.com>
 wrote:

Original comment by DrSamm...@gmail.com on 2 Nov 2012 at 5:55

GoogleCodeExporter commented 9 years ago
OK good.  I'm closing the issue now.

Original comment by gche...@gmail.com on 2 Nov 2012 at 7:12