compile problem

10 views
Skip to first unread message

Michael Levenhagen

unread,
Jun 24, 2013, 11:32:42 AM6/24/13
to sst-si...@googlegroups.com
I'm trying to compile a component header file stand alone and I get compile errors.


This is my header file.

#ifndef COMPONENTS_FIREFLY_NIC_H
#define COMPONENTS_FIREFLY_NIC_H

#include <sst/core/sst_types.h>
#include <sst/core/component.h>

namespace SST {
namespace Firefly {

class Nic : public SST::Component {
public:
Nic(SST::ComponentId_t id, SST::Params_t &params);
~Nic();
void setup(void) { }
void init(unsigned int phase) { }
private:
};

} // namesapce Firefly
} // namespace SST

#endif

This is the file that includes the header file.

[mjleven@sst-devel genericNic]$ cat test.cc
#include "sst_config.h"

#include "nic.h"
[mjleven@sst-devel genericNic]$


The results.

make[3]: Entering directory `/home/mjleven/sstSVN/clean/build/sst/elements/firefly'
depbase=`echo test.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../sst/elements/firefly -I../../../sst -pthread -I/usr/local/include -I/usr/local/include -I../../.. -I../../../.. -g -O2 -finline-functions -MT test.lo -MD -MP -MF $depbase.Tpo -c -o test.lo ../../../../sst/elements/firefly/test.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../../sst/elements/firefly -I../../../sst -pthread -I/usr/local/include -I/usr/local/include -I../../.. -I../../../.. -g -O2 -finline-functions -MT test.lo -MD -MP -MF .deps/test.Tpo -c ../../../../sst/elements/firefly/test.cc -fPIC -DPIC -o .libs/test.o
In file included from ../../../../sst/core/action.h:16,
from ../../../../sst/core/clock.h:20,
from ../../../../sst/core/component.h:19,
from ../../../../sst/elements/firefly/nic.h:17,
from ../../../../sst/elements/firefly/test.cc:5:
../../../../sst/core/activity.h:80: error: ‘boost’ has not been declared
../../../../sst/core/activity.h:80: error: friend declaration does not name a class or function
../../../../sst/core/activity.h: In member function ‘void SST::Activity::serialize(Archive&, unsigned int)’:
../../../../sst/core/activity.h:85: error: there are no arguments to ‘BOOST_SERIALIZATION_NVP’ that depend on a template parameter, so a declaration of ‘BOOST_SERIALIZATION_NVP’ must be available
../../../../sst/core/activity.h:85: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../../../../sst/core/activity.h:86: error: there are no arguments to ‘BOOST_SERIALIZATION_NVP’ that depend on a template parameter, so a declaration of ‘BOOST_SERIALIZATION_NVP’ must be available
In file included from ../../../../sst/core/clock.h:20,
from ../../../../sst/core/component.h:19,
from ../../../../sst/elements/firefly/nic.h:17,
from ../../../../sst/elements/firefly/test.cc:5:
../../../../sst/core/action.h: At global scope:
../../../../sst/core/action.h:18: error: expected constructor, destructor, or type conversion before ‘namespace’
In file included from /usr/local/include/boost/throw_exception.hpp:37,
from /usr/local/include/boost/array.hpp:48,
from /usr/local/include/boost/serialization/array.hpp:26,
from /usr/local/include/boost/serialization/vector.hpp:29,
from ../../../../sst/core/debug.h:18,
from ../../../../sst/core/event.h:18,
from ../../../../sst/core/link.h:18,
from ../../../../sst/core/component.h:22,
from ../../../../sst/elements/firefly/nic.h:17,
from ../../../../sst/elements/firefly/test.cc:5:
/usr/local/include/boost/exception/exception.hpp:137: error: expected declaration before end of line
make[3]: *** [test.lo] Error 1
make[3]: Leaving directory `/home/mjleven/sstSVN/clean/build/sst/elements/firefly'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/mjleven/sstSVN/clean/build/sst/elements'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/mjleven/sstSVN/clean/build/sst'
make: *** [install-recursive] Error 1
[mjleven@sst-devel build]$


Barrett, Brian W

unread,
Jun 24, 2013, 11:40:46 AM6/24/13
to SST-si...@googlegroups.com
For now, include sst/core/serialization/element.h after sst_config.h in
your test.cc file. This is something on the todo list to fix.

Brian
>../../../../sst/core/activity.h:80: error: Œboost¹ has not been declared
>../../../../sst/core/activity.h:80: error: friend declaration does not
>name a class or function
>../../../../sst/core/activity.h: In member function Œvoid
>SST::Activity::serialize(Archive&, unsigned int)¹:
>../../../../sst/core/activity.h:85: error: there are no arguments to
>ŒBOOST_SERIALIZATION_NVP¹ that depend on a template parameter, so a
>declaration of ŒBOOST_SERIALIZATION_NVP¹ must be available
>../../../../sst/core/activity.h:85: note: (if you use Œ-fpermissive¹, G++
>will accept your code, but allowing the use of an undeclared name is
>deprecated)
>../../../../sst/core/activity.h:86: error: there are no arguments to
>ŒBOOST_SERIALIZATION_NVP¹ that depend on a template parameter, so a
>declaration of ŒBOOST_SERIALIZATION_NVP¹ must be available
>In file included from ../../../../sst/core/clock.h:20,
> from ../../../../sst/core/component.h:19,
> from ../../../../sst/elements/firefly/nic.h:17,
> from ../../../../sst/elements/firefly/test.cc:5:
>../../../../sst/core/action.h: At global scope:
>../../../../sst/core/action.h:18: error: expected constructor,
>destructor, or type conversion before Œnamespace¹
>In file included from /usr/local/include/boost/throw_exception.hpp:37,
> from /usr/local/include/boost/array.hpp:48,
> from /usr/local/include/boost/serialization/array.hpp:26,
> from
>/usr/local/include/boost/serialization/vector.hpp:29,
> from ../../../../sst/core/debug.h:18,
> from ../../../../sst/core/event.h:18,
> from ../../../../sst/core/link.h:18,
> from ../../../../sst/core/component.h:22,
> from ../../../../sst/elements/firefly/nic.h:17,
> from ../../../../sst/elements/firefly/test.cc:5:
>/usr/local/include/boost/exception/exception.hpp:137: error: expected
>declaration before end of line
>make[3]: *** [test.lo] Error 1
>make[3]: Leaving directory
>`/home/mjleven/sstSVN/clean/build/sst/elements/firefly'
>make[2]: *** [install-recursive] Error 1
>make[2]: Leaving directory `/home/mjleven/sstSVN/clean/build/sst/elements'
>make[1]: *** [install-recursive] Error 1
>make[1]: Leaving directory `/home/mjleven/sstSVN/clean/build/sst'
>make: *** [install-recursive] Error 1
>[mjleven@sst-devel build]$
>
>
>--
>You received this message because you are subscribed to the Google Groups
>"Structural Simulation Toolkit" group.
>To unsubscribe from this group and stop receiving emails from it, send an
>email to SST-simulato...@googlegroups.com.
>For more options, visit https://groups.google.com/groups/opt_out.
>
>
>


--
Brian W. Barrett
Scalable System Software Group
Sandia National Laboratories



Reply all
Reply to author
Forward
0 new messages