Hi Greg,
I thought it would be useful to share this information to compile
ocelot using gcc-4.5.
The caveat is the boost compatibility with gcc-4.5 with "-std=c++0x"
flag.
One will get the compiler error:
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../gpuocelot/ocelot -I/
usr/include -D_GNU_SOURCE -fPIC -D__STDC_LIMIT_MACROS -
D__STDC_CONSTANT_MACROS -Wall -W -Wno-unused-parameter -Wwrite-strings
-pedantic -Wno-long-long -Werror -I ../gpuocelot/ocelot/ocelot/cuda/
include -Wall -ansi -Werror -std=c++0x -g -O1 -march=native -pipe -MT
libocelot_la-KernelEntry.lo -MD -MP -MF .deps/libocelot_la-
KernelEntry.Tpo -c ocelot/trace/implementation/KernelEntry.cpp -fPIC -
DPIC -o .libs/libocelot_la-KernelEntry.o
In file included from /usr/include/boost/interprocess/sync/
file_lock.hpp:24:0,
from ocelot/trace/implementation/KernelEntry.cpp:26:
/usr/include/boost/interprocess/detail/move.hpp: In function ‘typename
boost::remove_reference<T>::type&& boost::interprocess::move(T&&)
[with T = boost::interprocess::file_lock&, typename
boost::remove_reference<T>::type = boost::interprocess::file_lock]’:
/usr/include/boost/interprocess/sync/file_lock.hpp:68:52:
instantiated from here
/usr/include/boost/interprocess/detail/move.hpp:342:11: error: invalid
initialization of reference of type
‘boost::remove_reference<boost::interprocess::file_lock&>::type&&’
from expression of type ‘boost::interprocess::file_lock’
The relevant boost library can be compiled by gcc-4.5 once we get rid
of "-std=c++0x".
The fix is either to remove "-std=c++0x" in Makefile only for
KernelEntry.cpp or
to add the macro to disable c++0x feature in KernelEntry.cpp:
#ifndef KERNEL_ENTRY_CPP_INCLUDED
#define KERNEL_ENTRY_CPP_INCLUDED
#if (__GNUC__ == 4 && __GNUC_MINOR__ == 5)
#undef __GXX_EXPERIMENTAL_CXX0X__
#endif
#include <boost/archive/text_oarchive.hpp>
...
As far as I can see KernelyEntry.cpp does not use c++0x feature
so I guess disabling it could be a viable option.
Regards,
-Ryuta
--
You received this message because you are subscribed to the Google Groups "gpuocelot" group.
To post to this group, send email to
gpuo...@googlegroups.com.
To unsubscribe from this group, send email to
gpuocelot+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gpuocelot?hl=en.