Error when using TensorFlow C++ API - c++

Here are what I've Done:
(1)build tensorflow from source(with bazel)
(2)build eigen from source
(3)build protobuf from souce
(4)copy bazel-genfiles, tensorflow, third_party to workdir/include/tf
(5)copy eigen3 to workdir/include
(6)compile my cpp file in workdir with:g++ -std=c++11 -o -I./include/tf -I./include/eigen3 -I./include/tf/bazel-genfiles DeepLearningModel.cpp
And here are what I got:
In file included from ./include/tf/tensorflow/core/framework/allocator.h:25:0,
from ./include/tf/tensorflow/core/framework/tensor.h:20,
from ./include/tf/tensorflow/core/public/session.h:24,
from DeepLearningModel.h:5,
from DeepLearningModel.cpp:1:
./include/tf/tensorflow/core/framework/type_traits.h:69:52: error: ‘half’ is not a member of ‘Eigen’
std::is_trivial<T>::value || std::is_same<T, Eigen::half>::value ||
^
./include/tf/tensorflow/core/framework/type_traits.h:69:52: error: ‘half’ is not a member of ‘Eigen’
./include/tf/tensorflow/core/framework/type_traits.h:69:63: error: template argument 2 is invalid
std::is_trivial<T>::value || std::is_same<T, Eigen::half>::value ||
^
DeepLearningModel.cpp: In member function ‘int DNNModel::decode_from_hex(char*, InputFeature&)’:
DeepLearningModel.cpp:58:34: error: ‘Tensorhape’ is not a member of ‘tensorflow’
Tensor x(tensorflow::DT_DOUBLE, tensorflow::Tensorhape({input.batch_size, input.timestep, input.feature_len}));
^
DeepLearningModel.cpp:61:22: error: ‘InputFeature {aka struct sInputFeature}’ has no member named ‘batch’
for(int i=0;i<input.batch;i++){
^
DeepLearningModel.cpp: In member function ‘int DNNModel::predict(const char*, int&)’:
DeepLearningModel.cpp:101:55: error: no matching function for call to ‘DNNModel::decode_from_hex(const char*&, InputFeature*)’
int status_decode = decode_from_hex(input_hex, &input);
^
DeepLearningModel.cpp:42:5: note: candidate: int DNNModel::decode_from_hex(char*, InputFeature&)
int DNNModel::decode_from_hex(char *input_hex, InputFeature &input){
^
DeepLearningModel.cpp:42:5: note: no known conversion for argument 2 from ‘InputFeature* {aka sInputFeature*}’ to ‘InputFeature& {aka sInputFeature&}’
DeepLearningModel.cpp:106:7: error: expected unqualified-id before ‘<’ token
std::<vector<std::pair<std::string, tensorflow:Tensor> > input_vec;
^
DeepLearningModel.cpp:106:8: error: ‘vector’ was not declared in this scope
std::<vector<std::pair<std::string, tensorflow:Tensor> > input_vec;
^
DeepLearningModel.cpp:106:8: note: suggested alternatives:
In file included from /usr/include/c++/5/vector:64:0,
from ./include/tf/tensorflow/core/public/session.h:20,
from DeepLearningModel.h:5,
from DeepLearningModel.cpp:1:
/usr/include/c++/5/bits/stl_vector.h:214:11: note: ‘std::vector’
class vector : protected _Vector_base<_Tp, _Alloc>
^
/usr/include/c++/5/bits/stl_vector.h:214:11: note: ‘std::vector’
DeepLearningModel.cpp:106:55: error: template argument 2 is invalid
std::<vector<std::pair<std::string, tensorflow:Tensor> > input_vec;
^
DeepLearningModel.cpp:106:59: error: ‘input_vec’ was not declared in this scope
std::<vector<std::pair<std::string, tensorflow:Tensor> > input_vec;
^
DeepLearningModel.cpp:107:31: error: missing template arguments before ‘,’ token
input_vec.push_back(std::pair,std::string, tensorflow::Tensor> >(&input_node, input.data));
^
DeepLearningModel.cpp:107:43: error: expected primary-expression before ‘,’ token
input_vec.push_back(std::pair,std::string, tensorflow::Tensor> >(&input_node, input.data));
^
DeepLearningModel.cpp:107:63: error: expected primary-expression before ‘>’ token
input_vec.push_back(std::pair,std::string, tensorflow::Tensor> >(&input_node, input.data));
^
DeepLearningModel.cpp:107:65: error: expected primary-expression before ‘>’ token
input_vec.push_back(std::pair,std::string, tensorflow::Tensor> >(&input_node, input.data));
^
In file included from ./include/eigen3/unsupported/Eigen/CXX11/Tensor:113:0,
from ./include/tf/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
from ./include/tf/tensorflow/core/framework/tensor.h:19,
from ./include/tf/tensorflow/core/public/session.h:24,
from DeepLearningModel.h:5,
from DeepLearningModel.cpp:1:
./include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h: In instantiation of ‘Eigen::TensorMap<PlainObjectType, Options_>::Scalar& Eigen::TensorMap<PlainObjectType, Options_>::operator()(Eigen::TensorMap<PlainObjectType, Options_>::Index, IndexTypes ...) [with IndexTypes = {int}; PlainObjectType = Eigen::Tensor<double, 1, 1, long int>; int Options_ = 16; Eigen::TensorMap<PlainObjectType, Options_>::Scalar = double; Eigen::TensorMap<PlainObjectType, Options_>::Index = long int]’:
DeepLearningModel.cpp:120:15: required from here
./include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h:227:7: error: static assertion failed: Number of indices used to access a tensor coefficient must be equal to the rank of the tensor.
static_assert(sizeof...(otherIndices) + 1 == NumIndices || NumIndices == Dynamic, "Number of indices used to access a tensor coefficient must be equal to the rank of the tensor.");
^
./include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h:230:110: error: no matching function for call to ‘Eigen::DSizes<long int, 1>::IndexOfRowMajor(Eigen::array<long int, 2ul>)’
const Index index = m_dimensions.IndexOfRowMajor(array<Index, NumDims>{{firstIndex, otherIndices...}});
^
In file included from ./include/eigen3/unsupported/Eigen/CXX11/Tensor:68:0,
from ./include/tf/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
from ./include/tf/tensorflow/core/framework/tensor.h:19,
from ./include/tf/tensorflow/core/public/session.h:24,
from DeepLearningModel.h:5,
from DeepLearningModel.cpp:1:
./include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:336:52: note: candidate: DenseIndex Eigen::DSizes<DenseIndex, NumDims>::IndexOfRowMajor(Eigen::array<DenseIndex, NumDims>&) const [with DenseIndex = long int; int NumDims = 1; Eigen::array<DenseIndex, NumDims> = std::array<long int, 1ul>]
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfRowMajor(const array<DenseIndex, NumDims>& indices) const {
^
./include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:336:52: note: no known conversion for argument 1 from ‘Eigen::array<long int, 2ul> {aka std::array<long int, 2ul>}’ to ‘Eigen::array<long int, 1ul>& {aka const std::array<long int, 1ul>&}’
In file included from ./include/eigen3/unsupported/Eigen/CXX11/Tensor:113:0,
from ./include/tf/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
from ./include/tf/tensorflow/core/framework/tensor.h:19,
from ./include/tf/tensorflow/core/public/session.h:24,
from DeepLearningModel.h:5,
from DeepLearningModel.cpp:1:
./include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorMap.h:233:110: error: no matching function for call to ‘Eigen::DSizes<long int, 1>::IndexOfColMajor(Eigen::array<long int, 2ul>)’
const Index index = m_dimensions.IndexOfColMajor(array<Index, NumDims>{{firstIndex, otherIndices...}});
^
In file included from ./include/eigen3/unsupported/Eigen/CXX11/Tensor:68:0,
from ./include/tf/third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
from ./include/tf/tensorflow/core/framework/tensor.h:19,
from ./include/tf/tensorflow/core/public/session.h:24,
from DeepLearningModel.h:5,
from DeepLearningModel.cpp:1:
./include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:333:52: note: candidate: DenseIndex Eigen::DSizes<DenseIndex, NumDims>::IndexOfColMajor(Eigen::array<DenseIndex, NumDims>&) const [with DenseIndex = long int; int NumDims = 1; Eigen::array<DenseIndex, NumDims> = std::array<long int, 1ul>]
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex IndexOfColMajor(const array<DenseIndex, NumDims>& indices) const {
^
./include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDimensions.h:333:52: note: no known conversion for argument 1 from ‘Eigen::array<long int, 2ul> {aka std::array<long int, 2ul>}’ to ‘Eigen::array<long int, 1ul>& {aka const std::array<long int, 1ul>&}’
What's wrong with Eigen and how can I fix it?
Help please...

Related

C++ Arduino Vector issues with mismatched types?

I've been trying to write some effects for a strip of RGB LEDs to be controlled via an Arduino Uno R3. For context, I'm working on the animation of a ball (a set of 5 LEDs) moving backwards and forward along the strip, bouncing from time to time.
The vector causing issue is the Colour object, which I want to be a vector of CRGB colours which, when fewer than the number of colours available are passed to the function, it simply uses the first x amount but if there are more balls than there are colours then it should simply re-use them.
Apologies if there are any errors in my formatting and such.
The issue is when I try to pass the vectors as constructors to BouncingBallEffect it gives the following error:
[File-Path]\sketch_jul20b\sketch_jul20b.ino: In constructor 'BouncingBallEffect::BouncingBallEffect(size_t, size_t, byte, bool)':
sketch_jul20b:44:28: error: no matching function for call to 'Vector<double>::Vector(size_t&)'
Colours(ballCount)
^
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: candidate: template<unsigned int MAX_SIZE> Vector<T>::Vector(T (&)[MAX_SIZE], size_t)
Vector(T (&values)[MAX_SIZE],
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: template argument deduction/substitution failed:
[File-Path]\sketch_jul20b\sketch_jul20b.ino:44:28: note: mismatched types 'double [MAX_SIZE]' and 'size_t {aka unsigned int}'
Colours(ballCount)
^
In file included from [File-Path]\Vector-1.2.1\src/Vector.h:95:0,
from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate: Vector<T>::Vector() [with T = double]
Vector<T>::Vector()
^~~~~~~~~
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate expects 0 arguments, 1 provided
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<double>::Vector(const Vector<double>&)
class Vector
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'const Vector<double>&'
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<double>::Vector(Vector<double>&&)
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'Vector<double>&&'
sketch_jul20b:44:28: error: no matching function for call to 'Vector<double>::Vector(size_t&)'
Colours(ballCount)
^
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: candidate: template<unsigned int MAX_SIZE> Vector<T>::Vector(T (&)[MAX_SIZE], size_t)
Vector(T (&values)[MAX_SIZE],
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: template argument deduction/substitution failed:
[File-Path]\sketch_jul20b\sketch_jul20b.ino:44:28: note: mismatched types 'double [MAX_SIZE]' and 'size_t {aka unsigned int}'
Colours(ballCount)
^
In file included from [File-Path]\Vector-1.2.1\src/Vector.h:95:0,
from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate: Vector<T>::Vector() [with T = double]
Vector<T>::Vector()
^~~~~~~~~
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate expects 0 arguments, 1 provided
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<double>::Vector(const Vector<double>&)
class Vector
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'const Vector<double>&'
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<double>::Vector(Vector<double>&&)
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'Vector<double>&&'
sketch_jul20b:44:28: error: no matching function for call to 'Vector<double>::Vector(size_t&)'
Colours(ballCount)
^
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: candidate: template<unsigned int MAX_SIZE> Vector<T>::Vector(T (&)[MAX_SIZE], size_t)
Vector(T (&values)[MAX_SIZE],
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: template argument deduction/substitution failed:
[File-Path]\sketch_jul20b\sketch_jul20b.ino:44:28: note: mismatched types 'double [MAX_SIZE]' and 'size_t {aka unsigned int}'
Colours(ballCount)
^
In file included from [File-Path]\Vector-1.2.1\src/Vector.h:95:0,
from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate: Vector<T>::Vector() [with T = double]
Vector<T>::Vector()
^~~~~~~~~
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate expects 0 arguments, 1 provided
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<double>::Vector(const Vector<double>&)
class Vector
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'const Vector<double>&'
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<double>::Vector(Vector<double>&&)
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'Vector<double>&&'
sketch_jul20b:44:28: error: no matching function for call to 'Vector<double>::Vector(size_t&)'
Colours(ballCount)
^
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: candidate: template<unsigned int MAX_SIZE> Vector<T>::Vector(T (&)[MAX_SIZE], size_t)
Vector(T (&values)[MAX_SIZE],
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: template argument deduction/substitution failed:
[File-Path]\sketch_jul20b\sketch_jul20b.ino:44:28: note: mismatched types 'double [MAX_SIZE]' and 'size_t {aka unsigned int}'
Colours(ballCount)
^
In file included from [File-Path]\Vector-1.2.1\src/Vector.h:95:0,
from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate: Vector<T>::Vector() [with T = double]
Vector<T>::Vector()
^~~~~~~~~
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate expects 0 arguments, 1 provided
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<double>::Vector(const Vector<double>&)
class Vector
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'const Vector<double>&'
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<double>::Vector(Vector<double>&&)
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'Vector<double>&&'
sketch_jul20b:44:28: error: no matching function for call to 'Vector<CRGB>::Vector(size_t&)'
Colours(ballCount)
^
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: candidate: template<unsigned int MAX_SIZE> Vector<T>::Vector(T (&)[MAX_SIZE], size_t)
Vector(T (&values)[MAX_SIZE],
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:24:3: note: template argument deduction/substitution failed:
[File-Path]\sketch_jul20b\sketch_jul20b.ino:44:28: note: mismatched types 'CRGB [MAX_SIZE]' and 'size_t {aka unsigned int}'
Colours(ballCount)
^
In file included from [File-Path]\Vector-1.2.1\src/Vector.h:95:0,
from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate: Vector<T>::Vector() [with T = CRGB]
Vector<T>::Vector()
^~~~~~~~~
[File-Path]\Vector-1.2.1\src/Vector/VectorDefinitions.h:16:1: note: candidate expects 0 arguments, 1 provided
In file included from [File-Path]\sketch_jul20b\sketch_jul20b.ino:6:0:
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<CRGB>::Vector(const Vector<CRGB>&)
class Vector
^~~~~~
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'const Vector<CRGB>&'
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: candidate: constexpr Vector<CRGB>::Vector(Vector<CRGB>&&)
[File-Path]\Vector-1.2.1\src/Vector.h:19:7: note: no known conversion for argument 1 from 'size_t {aka unsigned int}' to 'Vector<CRGB>&&'
My code is here:
#include <Arduino.h>
#define FASTLED_INTERNAL
#include <FastLED.h>
using namespace std;
#include <Vector.h>
static const CRGB ballColours [] = {
CRGB::Green,
CRGB::Red,
CRGB::Blue,
CRGB::Orange,
CRGB::Indigo
};
class BouncingBallEffect {
private:
double InitialBallSpeed(double height) const {
return sqrt(-2 * Gravity * height); // Because MATH!
}
size_t _cLength;
size_t _cBalls;
byte _fadeRate;
bool _bMirrored;
const double Gravity = -9.81; // Because PHYSICS!
const double StartHeight = 1; // Drop balls from max height initially
Vector<double> ClockTimeAtLastBounce, Height, BallSpeed, Dampening;
Vector<CRGB> Colours;
public:
// BouncingBallEffect
//
// Caller specs strip length, number of balls, persistence level (255 is least), and whether the
// balls should be drawn mirrored from each side.
BouncingBallEffect(size_t cLength, size_t ballCount = 3, byte fade = 0, bool bMirrored = false)
: _cLength(cLength - 1),
_cBalls(ballCount),
_fadeRate(fade),
_bMirrored(bMirrored),
ClockTimeAtLastBounce(ballCount),
Height(ballCount),
BallSpeed(ballCount),
Dampening(ballCount),
Colours(ballCount)
{
for (size_t i = 0; i < ballCount; i++) {
Height[i] = StartHeight; // Current Ball Height
Dampening[i] = 0.90 - i / pow(_cBalls, 2); // Bounciness of this ball
BallSpeed[i] = InitialBallSpeed(Height[i]); // Don't dampen initial launch
}
}
};
Any help anyone can offer would be much appreciated, thank you.
Arduino's Vector library (https://github.com/janelia-arduino/Vector) accepts a statically allocated array at construction time, unlike std::vector which you can pass a size_t into.
template <typename T>
class Vector
{
public:
Vector();
template <size_t MAX_SIZE>
Vector(T (&values)[MAX_SIZE],
size_t size=0);
// ...
};
You will need to pass an array instead of a size_t, or use a different data structure during these member initializers:
// ...
ClockTimeAtLastBounce(ballCount),
Height(ballCount),
BallSpeed(ballCount),
Dampening(ballCount),
Colours(ballCount)

Eigen ref with child matrix class

I've got the following code:
#include <iostream>
#include <eigen3/Eigen/Dense>
class MyVectorType: public Eigen::Matrix<double, 3, 1> {
public:
MyVectorType(void) :
Eigen::Matrix<double, 3, 1>() {
}
typedef Eigen::Matrix<double, 3, 1> Base;
// This constructor allows you to construct MyVectorType from Eigen expressions
template<typename OtherDerived>
MyVectorType(const Eigen::MatrixBase<OtherDerived>& other) :
Eigen::Matrix<double, 3, 1>(other) {
}
// This method allows you to assign Eigen expressions to MyVectorType
template<typename OtherDerived>
MyVectorType & operator=(const Eigen::MatrixBase<OtherDerived>& other) {
this->Base::operator=(other);
return *this;
}
//other custom methods here
};
void init(Eigen::Ref<MyVectorType>& m) {
for (int i = 0; i < 3; i++)
for (int j = 0; j < 1; j++)
m(i, j) = 1;
}
int main() {
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign, 12,
12> mm(3, 1);
Eigen::Ref<MyVectorType> rr(mm);
init(rr);
std::cout << mm << std::endl;
return 0;
}
I defined my own class but when I try to the Ref class I have the following error from gcc:
make all
Building file: ../main.cpp
Invoking: GCC C++ Compiler
g++ -std=c++98 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.cpp"
In file included from /usr/include/eigen3/Eigen/Core:449:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Map.h: In instantiation of ‘struct Eigen::internal::traits<Eigen::Map<MyVectorType, 0, Eigen::OuterStride<> > >’:
/usr/include/eigen3/Eigen/src/Core/Ref.h:18:8: required from ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:32:54: required from ‘struct Eigen::internal::accessors_level<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:113:75: required from ‘class Eigen::RefBase<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/Ref.h:190:76: required from ‘class Eigen::Ref<MyVectorType>’
../main.cpp:26:10: required from here
/usr/include/eigen3/Eigen/src/Core/Map.h:18:8: error: invalid use of incomplete type ‘struct Eigen::internal::traits<MyVectorType>’
struct traits<Map<PlainObjectType, MapOptions, StrideType> >
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:346:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:17:29: note: declaration of ‘struct Eigen::internal::traits<MyVectorType>’
template<typename T> struct traits;
^~~~~~
In file included from /usr/include/eigen3/Eigen/Core:449:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Map.h:30:32: error: incomplete type ‘Eigen::internal::traits<Eigen::Map<MyVectorType, 0, Eigen::OuterStride<> > >::TraitsBase {aka Eigen::internal::traits<MyVectorType>}’ used in nested name specifier
Flags0 = TraitsBase::Flags & (~NestByRefBit),
~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:348:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/util/XprHelper.h: In instantiation of ‘struct Eigen::internal::is_lvalue<MyVectorType>’:
/usr/include/eigen3/Eigen/src/Core/Map.h:31:47: required from ‘struct Eigen::internal::traits<Eigen::Map<MyVectorType, 0, Eigen::OuterStride<> > >’
/usr/include/eigen3/Eigen/src/Core/Ref.h:18:8: required from ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:32:54: required from ‘struct Eigen::internal::accessors_level<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/util/ForwardDeclarations.h:113:75: required from ‘class Eigen::RefBase<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/Ref.h:190:76: required from ‘class Eigen::Ref<MyVectorType>’
../main.cpp:26:10: required from here
/usr/include/eigen3/Eigen/src/Core/util/XprHelper.h:642:53: error: incomplete type ‘Eigen::internal::traits<MyVectorType>’ used in nested name specifier
bool(traits<ExpressionType>::Flags & LvalueBit) };
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:448:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/MapBase.h: In instantiation of ‘class Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>’:
/usr/include/eigen3/Eigen/src/Core/Ref.h:58:34: required from ‘class Eigen::RefBase<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/Ref.h:190:76: required from ‘class Eigen::Ref<MyVectorType>’
../main.cpp:26:10: required from here
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: error: no type named ‘XprKind’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:42:62: error: no type named ‘XprKind’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
typedef typename internal::dense_xpr_base<Derived>::type Base;
^~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:43:10: error: ‘RowsAtCompileTime’ is not a member of ‘Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
enum {
^
/usr/include/eigen3/Eigen/src/Core/MapBase.h:43:10: error: ‘ColsAtCompileTime’ is not a member of ‘Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/MapBase.h:49:61: error: no type named ‘StorageKind’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
typedef typename internal::traits<Derived>::StorageKind StorageKind;
^~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:50:56: error: no type named ‘Scalar’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
typedef typename internal::traits<Derived>::Scalar Scalar;
^~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:51:60: error: no type named ‘Scalar’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
typedef typename internal::packet_traits<Scalar>::type PacketScalar;
^~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:52:46: error: no type named ‘Scalar’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
typedef typename NumTraits<Scalar>::Real RealScalar;
^~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:57:22: error: no type named ‘Scalar’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
PointerType;
^~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:59:17: error: using-declaration for non-member at class scope
using Base::derived;
^~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:63:17: error: using-declaration for non-member at class scope
using Base::MaxRowsAtCompileTime;
^~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:64:17: error: using-declaration for non-member at class scope
using Base::MaxColsAtCompileTime;
^~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:65:17: error: using-declaration for non-member at class scope
using Base::MaxSizeAtCompileTime;
^~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:66:17: error: using-declaration for non-member at class scope
using Base::IsVectorAtCompileTime;
^~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:67:17: error: using-declaration for non-member at class scope
using Base::Flags;
^~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:68:17: error: using-declaration for non-member at class scope
using Base::IsRowMajor;
^~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:70:17: error: using-declaration for non-member at class scope
using Base::rows;
^~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:71:17: error: using-declaration for non-member at class scope
using Base::cols;
^~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:72:17: error: using-declaration for non-member at class scope
using Base::size;
^~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:73:17: error: using-declaration for non-member at class scope
using Base::coeff;
^~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:74:17: error: using-declaration for non-member at class scope
using Base::coeffRef;
^~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:75:17: error: using-declaration for non-member at class scope
using Base::lazyAssign;
^~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:76:17: error: using-declaration for non-member at class scope
using Base::eval;
^~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:78:17: error: using-declaration for non-member at class scope
using Base::innerStride;
^~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:79:17: error: using-declaration for non-member at class scope
using Base::outerStride;
^~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:80:17: error: using-declaration for non-member at class scope
using Base::rowStride;
^~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:81:17: error: using-declaration for non-member at class scope
using Base::colStride;
^~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:84:25: error: using-declaration for non-member at class scope
using Base::operator=;
^
In file included from /usr/include/eigen3/Eigen/Core:72:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h: In instantiation of ‘class Eigen::RefBase<Eigen::Ref<MyVectorType> >’:
/usr/include/eigen3/Eigen/src/Core/Ref.h:190:76: required from ‘class Eigen::Ref<MyVectorType>’
../main.cpp:26:10: required from here
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: no type named ‘Scalar’ in ‘struct Eigen::internal::traits<Eigen::RefBase<Eigen::Ref<MyVectorType> > >’
EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: no type named ‘Scalar’ in ‘struct Eigen::internal::traits<Eigen::RefBase<Eigen::Ref<MyVectorType> > >’
EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)
^
In file included from /usr/include/eigen3/Eigen/Core:72:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: no type named ‘StorageKind’ in ‘struct Eigen::internal::traits<Eigen::RefBase<Eigen::Ref<MyVectorType> > >’
EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: no type named ‘StorageIndex’ in ‘struct Eigen::internal::traits<Eigen::RefBase<Eigen::Ref<MyVectorType> > >’
EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: ‘RowsAtCompileTime’ is not a member of ‘Eigen::internal::traits<Eigen::RefBase<Eigen::Ref<MyVectorType> > >’
EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: ‘ColsAtCompileTime’ is not a member of ‘Eigen::internal::traits<Eigen::RefBase<Eigen::Ref<MyVectorType> > >’
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: ‘MaxSizeAtCompileTime’ is not a member of ‘Eigen::RefBase<Eigen::Ref<MyVectorType> >::Base {aka Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>}’
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: ‘IsVectorAtCompileTime’ is not a member of ‘Eigen::RefBase<Eigen::Ref<MyVectorType> >::Base {aka Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>}’
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: no members matching ‘Eigen::RefBase<Eigen::Ref<MyVectorType> >::Base {aka Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>}::derived’ in ‘Eigen::RefBase<Eigen::Ref<MyVectorType> >::Base {aka class Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>}’
EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:67:3: error: no members matching ‘Eigen::RefBase<Eigen::Ref<MyVectorType> >::Base {aka Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>}::const_cast_derived’ in ‘Eigen::RefBase<Eigen::Ref<MyVectorType> >::Base {aka class Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>}’
EIGEN_DENSE_PUBLIC_INTERFACE(RefBase)
^
In file included from /usr/include/eigen3/Eigen/Core:72:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h: In instantiation of ‘class Eigen::Ref<MyVectorType>’:
../main.cpp:26:10: required from here
/usr/include/eigen3/Eigen/src/Core/Ref.h:201:5: error: no type named ‘Scalar’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:201:5: error: no type named ‘Scalar’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
^
In file included from /usr/include/eigen3/Eigen/Core:72:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h:201:5: error: no type named ‘StorageKind’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:201:5: error: no type named ‘StorageIndex’ in ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:201:5: error: ‘RowsAtCompileTime’ is not a member of ‘Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:201:5: error: ‘ColsAtCompileTime’ is not a member of ‘Eigen::internal::traits<Eigen::Ref<MyVectorType> >’
/usr/include/eigen3/Eigen/src/Core/Ref.h:201:5: error: no members matching ‘Eigen::Ref<MyVectorType>::Base {aka Eigen::RefBase<Eigen::Ref<MyVectorType> >}::derived’ in ‘Eigen::Ref<MyVectorType>::Base {aka class Eigen::RefBase<Eigen::Ref<MyVectorType> >}’
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
^
/usr/include/eigen3/Eigen/src/Core/Ref.h:201:5: error: no members matching ‘Eigen::Ref<MyVectorType>::Base {aka Eigen::RefBase<Eigen::Ref<MyVectorType> >}::const_cast_derived’ in ‘Eigen::Ref<MyVectorType>::Base {aka class Eigen::RefBase<Eigen::Ref<MyVectorType> >}’
EIGEN_DENSE_PUBLIC_INTERFACE(Ref)
^
../main.cpp: In function ‘void init(Eigen::Ref<MyVectorType>&)’:
../main.cpp:26:10: error: no match for call to ‘(Eigen::Ref<MyVectorType>) (int&, int&)’
m(i, j) = 1;
^
In file included from /usr/include/eigen3/Eigen/Core:450:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h: In instantiation of ‘struct Eigen::internal::traits<Eigen::Ref<MyVectorType> >::match<Eigen::Matrix<double, -1, -1, 0, 12, 12> >’:
/usr/include/eigen3/Eigen/src/Core/Ref.h:197:63: required by substitution of ‘template<class Derived> Eigen::Ref<MyVectorType>::Ref(const Eigen::PlainObjectBase<Derived>&, typename Eigen::internal::enable_if<(bool)(Eigen::internal::traits<Eigen::Ref<MyVectorType> >::match<Derived>::MatchAtCompileTime), Derived>::type*) [with Derived = Eigen::Matrix<double, -1, -1, 0, 12, 12>]’
../main.cpp:32:32: required from here
/usr/include/eigen3/Eigen/src/Core/Ref.h:44:25: error: incomplete type ‘Eigen::internal::traits<MyVectorType>’ used in nested name specifier
AlignmentMatch = (int(traits<PlainObjectType>::Alignment)==int(Unaligned)) || (DerivedAlignment >= int(Alignment)), // FIXME the first condition is not very clear, it should be replaced by the required alignment
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:347:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In instantiation of ‘static void Eigen::PlainObjectBase<Derived>::_check_template_params() [with Derived = Eigen::Matrix<double, 3, 1, 0, 12, 12>]’:
/usr/include/eigen3/Eigen/src/Core/Matrix.h:261:35: required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix() [with _Scalar = double; int _Rows = 3; int _Cols = 1; int _Options = 0; int _MaxRows = 12; int _MaxCols = 12]’
../main.cpp:7:58: required from here
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:899:7: error: ‘INVALID_MATRIX_TEMPLATE_PARAMETERS’ is not a member of ‘Eigen::internal::static_assertion<false>’
EIGEN_STATIC_ASSERT((EIGEN_IMPLIES(MaxRowsAtCompileTime==1 && MaxColsAtCompileTime!=1, (Options&RowMajor)==RowMajor)
^
In file included from /usr/include/eigen3/Eigen/Core:450:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h: In instantiation of ‘Eigen::RefBase<Derived>::RefBase() [with Derived = Eigen::Ref<MyVectorType>]’:
/usr/include/eigen3/Eigen/src/Core/Ref.h:208:5: required from ‘Eigen::Ref<PlainObjectType, Options, StrideType>::Ref(Eigen::PlainObjectBase<OtherDerived>&, typename Eigen::internal::enable_if<(bool)(typename Eigen::internal::traits<Eigen::Ref<PlainObjectType, RefOptions, StrideType> >::match<Derived>::MatchAtCompileTime), Derived>::type*) [with Derived = Eigen::Matrix<double, -1, -1, 0, 12, 12>; PlainObjectType = MyVectorType; int Options = 0; StrideType = Eigen::OuterStride<>; typename Eigen::internal::enable_if<(bool)(typename Eigen::internal::traits<Eigen::Ref<PlainObjectType, RefOptions, StrideType> >::match<Derived>::MatchAtCompileTime), Derived>::type = Eigen::Matrix<double, -1, -1, 0, 12, 12>]’
../main.cpp:32:32: required from here
/usr/include/eigen3/Eigen/src/Core/Ref.h:86:100: error: no matching function for call to ‘Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase(int, int, int)’
StrideType::InnerStrideAtCompileTime==Dynamic?0:StrideType::InnerStrideAtCompileTime)
^
In file included from /usr/include/eigen3/Eigen/Core:448:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate: Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase()
template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate expects 0 arguments, 3 provided
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate: Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase(const Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>&)
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate expects 1 argument, 3 provided
In file included from /usr/include/eigen3/Eigen/Core:450:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h: In instantiation of ‘void Eigen::RefBase<Derived>::construct(Expression&) [with Expression = Eigen::Matrix<double, -1, -1, 0, 12, 12>; Derived = Eigen::Ref<MyVectorType>]’:
/usr/include/eigen3/Eigen/src/Core/Ref.h:210:22: required from ‘Eigen::Ref<PlainObjectType, Options, StrideType>::Ref(Eigen::PlainObjectBase<OtherDerived>&, typename Eigen::internal::enable_if<(bool)(typename Eigen::internal::traits<Eigen::Ref<PlainObjectType, RefOptions, StrideType> >::match<Derived>::MatchAtCompileTime), Derived>::type*) [with Derived = Eigen::Matrix<double, -1, -1, 0, 12, 12>; PlainObjectType = MyVectorType; int Options = 0; StrideType = Eigen::OuterStride<>; typename Eigen::internal::enable_if<(bool)(typename Eigen::internal::traits<Eigen::Ref<PlainObjectType, RefOptions, StrideType> >::match<Derived>::MatchAtCompileTime), Derived>::type = Eigen::Matrix<double, -1, -1, 0, 12, 12>]’
../main.cpp:32:32: required from here
/usr/include/eigen3/Eigen/src/Core/Ref.h:101:7: error: no matching function for call to ‘Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, 12, 12> >::Scalar*, int, Eigen::EigenBase<Eigen::Matrix<double, -1, -1, 0, 12, 12> >::Index)’
::new (static_cast<Base*>(this)) Base(expr.data(), 1, expr.size());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:448:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate: Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase()
template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate expects 0 arguments, 3 provided
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate: Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase(const Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>&)
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate expects 1 argument, 3 provided
In file included from /usr/include/eigen3/Eigen/Core:450:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h:106:7: error: no matching function for call to ‘Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, 12, 12> >::Scalar*, Eigen::EigenBase<Eigen::Matrix<double, -1, -1, 0, 12, 12> >::Index, int)’
::new (static_cast<Base*>(this)) Base(expr.data(), expr.size(), 1);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:448:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate: Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase()
template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate expects 0 arguments, 3 provided
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate: Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase(const Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>&)
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate expects 1 argument, 3 provided
In file included from /usr/include/eigen3/Eigen/Core:450:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/Ref.h:109:7: error: no matching function for call to ‘Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, 12, 12> >::Scalar*, Eigen::Index, Eigen::Index)’
::new (static_cast<Base*>(this)) Base(expr.data(), expr.rows(), expr.cols());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:448:0,
from /usr/include/eigen3/Eigen/Dense:1,
from ../main.cpp:2:
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate: Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase()
template<typename Derived> class MapBase<Derived, ReadOnlyAccessors>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate expects 0 arguments, 3 provided
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate: Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>::MapBase(const Eigen::MapBase<Eigen::Ref<MyVectorType>, 0>&)
/usr/include/eigen3/Eigen/src/Core/MapBase.h:37:34: note: candidate expects 1 argument, 3 provided
Is possible to pass by reference a dynamic matrix to a fixed one using a custom child class?
Eigen::Ref is not intended to work with own custom types (that would be possible, but is way to complicated for this purpose). Simply use Eigen::Ref<MyVectorType::Base>. Also if a Ref is intended to be an L-value (i.e., writable), you should pass it by-value, like so
void init(Eigen::Ref<MyVectorType::Base> m) {
// ...
That way you don't need to manually generate a temporary when calling init:
int main() {
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::AutoAlign, 12,
12> mm(3, 1);
// Eigen::Ref<MyVectorType> rr(mm); // not necessary!
init(mm); // implicitly generates a temporary `Ref` object
// ...
For more details, see the online documentation of Ref: https://eigen.tuxfamily.org/dox/classEigen_1_1Ref.html

Unable to Build OpenCV project in eclipse CDT C++

Hello I am having issues getting my opencv setup and working with Eclipse and C++. I have my paths linked correctly and included libraries set up correctly, I have it working on my laptop so I am sure of this. When I try and build a project with just having #include as the only OpenCV code I get these errors.
UMat(UMat&& m);
^
/usr/local/include/opencv2/core/mat.hpp:2531:27: error: expected ‘,’ or ‘...’ before ‘&&’ token
UMat& operator = (UMat&& m);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp: In member function ‘void cv::_InputArray::init(int, const void*, cv::Size)’:
/usr/local/include/opencv2/core/mat.inl.hpp:70:41: error: ambiguous overload for ‘operator=’ (operand types are ‘cv::Size {aka cv::Size_<int>}’ and ‘cv::Size {aka cv::Size_<int>}’)
{ flags = _flags; obj = (void*)_obj; sz = _sz; }
^
In file included from /usr/local/include/opencv2/core.hpp:58:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/types.hpp:1707:13: note: candidate: cv::Size_<_Tp>& cv::Size_<_Tp>::operator=(const cv::Size_<_Tp>&) [with _Tp = int]
Size_<_Tp>& Size_<_Tp>::operator = (const Size_<_Tp>& sz)
^
/usr/local/include/opencv2/core/types.hpp:1714:13: note: candidate: cv::Size_<_Tp>& cv::Size_<_Tp>::operator=(cv::Size_<_Tp>) [with _Tp = int]
Size_<_Tp>& Size_<_Tp>::operator = (Size_<_Tp>&& sz) CV_NOEXCEPT
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:88:37: error: ‘array’ in namespace ‘std’ does not name a template type
_InputArray::_InputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:88:42: error: expected ‘,’ or ‘...’ before ‘<’ token
_InputArray::_InputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_InputArray::_InputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:89:86: error: ‘arr’ was not declared in this scope
{ init(FIXED_TYPE + FIXED_SIZE + STD_ARRAY + traits::Type<_Tp>::value + ACCESS_READ, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:92:37: error: ‘array’ in namespace ‘std’ does not name a template type
_InputArray::_InputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:92:42: error: expected ‘,’ or ‘...’ before ‘<’ token
_InputArray::_InputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_InputArray::_InputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:93:37: error: ‘arr’ was not declared in this scope
{ init(STD_ARRAY_MAT + ACCESS_READ, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:175:33: error: ‘cv::_OutputArray::_OutputArray’ declared as an ‘inline’ variable
_OutputArray::_OutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:175:33: error: ‘int cv::_OutputArray::_OutputArray’ is not a static data member of ‘class cv::_OutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:175:33: error: template definition of non-template ‘int cv::_OutputArray::_OutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:175:28: error: ‘array’ is not a member of ‘std’
_OutputArray::_OutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:175:42: error: expected primary-expression before ‘,’ token
_OutputArray::_OutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:175:50: error: ‘arr’ was not declared in this scope
_OutputArray::_OutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:179:33: error: ‘cv::_OutputArray::_OutputArray’ declared as an ‘inline’ variable
_OutputArray::_OutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:179:33: error: ‘int cv::_OutputArray::_OutputArray’ is not a static data member of ‘class cv::_OutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:179:33: error: template definition of non-template ‘int cv::_OutputArray::_OutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:179:28: error: ‘array’ is not a member of ‘std’
_OutputArray::_OutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:179:42: error: expected primary-expression before ‘,’ token
_OutputArray::_OutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:179:50: error: ‘arr’ was not declared in this scope
_OutputArray::_OutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:215:39: error: ‘array’ in namespace ‘std’ does not name a template type
_OutputArray::_OutputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:215:44: error: expected ‘,’ or ‘...’ before ‘<’ token
_OutputArray::_OutputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_OutputArray::_OutputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:216:87: error: ‘arr’ was not declared in this scope
{ init(FIXED_TYPE + FIXED_SIZE + STD_ARRAY + traits::Type<_Tp>::value + ACCESS_WRITE, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:219:39: error: ‘array’ in namespace ‘std’ does not name a template type
_OutputArray::_OutputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:219:44: error: expected ‘,’ or ‘...’ before ‘<’ token
_OutputArray::_OutputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_OutputArray::_OutputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:220:51: error: ‘arr’ was not declared in this scope
{ init(FIXED_SIZE + STD_ARRAY_MAT + ACCESS_WRITE, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:290:43: error: ‘cv::_InputOutputArray::_InputOutputArray’ declared as an ‘inline’ variable
_InputOutputArray::_InputOutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:290:43: error: ‘int cv::_InputOutputArray::_InputOutputArray’ is not a static data member of ‘class cv::_InputOutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:290:43: error: template definition of non-template ‘int cv::_InputOutputArray::_InputOutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:290:38: error: ‘array’ is not a member of ‘std’
_InputOutputArray::_InputOutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:290:52: error: expected primary-expression before ‘,’ token
_InputOutputArray::_InputOutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:290:60: error: ‘arr’ was not declared in this scope
_InputOutputArray::_InputOutputArray(std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:294:43: error: ‘cv::_InputOutputArray::_InputOutputArray’ declared as an ‘inline’ variable
_InputOutputArray::_InputOutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:294:43: error: ‘int cv::_InputOutputArray::_InputOutputArray’ is not a static data member of ‘class cv::_InputOutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:294:43: error: template definition of non-template ‘int cv::_InputOutputArray::_InputOutputArray’
/usr/local/include/opencv2/core/mat.inl.hpp:294:38: error: ‘array’ is not a member of ‘std’
_InputOutputArray::_InputOutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:294:52: error: expected primary-expression before ‘,’ token
_InputOutputArray::_InputOutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:294:60: error: ‘arr’ was not declared in this scope
_InputOutputArray::_InputOutputArray(std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:325:49: error: ‘array’ in namespace ‘std’ does not name a template type
_InputOutputArray::_InputOutputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:325:54: error: expected ‘,’ or ‘...’ before ‘<’ token
_InputOutputArray::_InputOutputArray(const std::array<_Tp, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_InputOutputArray::_InputOutputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:326:84: error: ‘arr’ was not declared in this scope
{ init(FIXED_TYPE + FIXED_SIZE + STD_ARRAY + traits::Type<_Tp>::value + ACCESS_RW, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:329:49: error: ‘array’ in namespace ‘std’ does not name a template type
_InputOutputArray::_InputOutputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp:329:54: error: expected ‘,’ or ‘...’ before ‘<’ token
_InputOutputArray::_InputOutputArray(const std::array<Mat, _Nm>& arr)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::_InputOutputArray::_InputOutputArray(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:330:48: error: ‘arr’ was not declared in this scope
{ init(FIXED_SIZE + STD_ARRAY_MAT + ACCESS_RW, arr.data(), Size(1, _Nm)); }
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:562:21: error: ‘initializer_list’ in namespace ‘std’ does not name a template type
Mat::Mat(const std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:562:37: error: expected ‘,’ or ‘...’ before ‘<’ token
Mat::Mat(const std::initializer_list<_Tp> list)
^
In file included from /usr/local/include/opencv2/core.hpp:54:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::Mat::Mat(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:565:5: error: ‘list’ was not declared in this scope
CV_Assert(list.size() != 0);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp:566:14: error: ‘list’ was not declared in this scope
Mat((int)list.size(), 1, traits::Type<_Tp>::value, (uchar*)list.begin()).copyTo(*this);
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:570:21: error: ‘initializer_list’ in namespace ‘std’ does not name a template type
Mat::Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:570:37: error: expected ‘,’ or ‘...’ before ‘<’ token
Mat::Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::Mat::Mat(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:574:14: error: ‘s’ does not name a type
for(auto s : sizes)
^
In file included from /usr/local/include/opencv2/core.hpp:54:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected ‘;’ before ‘do’
CV_Assert(list.size() != 0);
^
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected primary-expression before ‘do’
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected ‘;’ before ‘do’
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected primary-expression before ‘do’
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: expected ‘)’ before ‘do’
/usr/local/include/opencv2/core/mat.inl.hpp:576:5: error: ‘list’ was not declared in this scope
CV_Assert(list.size() != 0);
^
/usr/local/include/opencv2/core/mat.inl.hpp:577:5: error: ‘list’ was not declared in this scope
CV_Assert(size_total == list.size());
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp:578:14: error: ‘sizes’ was not declared in this scope
Mat((int)sizes.size(), (int*)sizes.begin(), traits::Type<_Tp>::value, (uchar*)list.begin()).copyTo(*this);
^
/usr/local/include/opencv2/core/mat.inl.hpp:578:83: error: ‘list’ was not declared in this scope
Mat((int)sizes.size(), (int*)sizes.begin(), traits::Type<_Tp>::value, (uchar*)list.begin()).copyTo(*this);
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:582:21: error: ‘array’ in namespace ‘std’ does not name a template type
Mat::Mat(const std::array<_Tp, _Nm>& arr, bool copyData)
^
/usr/local/include/opencv2/core/mat.inl.hpp:582:26: error: expected ‘,’ or ‘...’ before ‘<’ token
Mat::Mat(const std::array<_Tp, _Nm>& arr, bool copyData)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In constructor ‘cv::Mat::Mat(int)’:
/usr/local/include/opencv2/core/mat.inl.hpp:583:90: error: ‘arr’ was not declared in this scope
: flags(MAGIC_VAL | traits::Type<_Tp>::value | CV_MAT_CONT_FLAG), dims(2), rows((int)arr.size()),
^
/usr/local/include/opencv2/core/mat.inl.hpp:588:10: error: ‘copyData’ was not declared in this scope
if( !copyData )
^
/usr/local/include/opencv2/core/mat.inl.hpp: In member function ‘void cv::Mat::assignTo(cv::Mat&, int) const’:
/usr/local/include/opencv2/core/mat.inl.hpp:762:11: error: ambiguous overload for ‘operator=’ (operand types are ‘cv::Mat’ and ‘const cv::Mat’)
m = *this;
^
/usr/local/include/opencv2/core/mat.inl.hpp:686:6: note: candidate: cv::Mat& cv::Mat::operator=(const cv::Mat&)
Mat& Mat::operator = (const Mat& m)
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.hpp:2060:10: note: candidate: cv::Mat& cv::Mat::operator=(cv::Mat)
Mat& operator = (Mat&& m);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:1249:20: error: ‘array’ in namespace ‘std’ does not name a template type
Mat::operator std::array<_Tp, _Nm>() const
^
/usr/local/include/opencv2/core/mat.inl.hpp:1323:13: error: expected ‘,’ or ‘...’ before ‘&&’ token
Mat::Mat(Mat&& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1323:1: error: prototype for ‘cv::Mat::Mat(cv::Mat)’ does not match any in class ‘cv::Mat’
Mat::Mat(Mat&& m)
^
In file included from /usr/local/include/opencv2/core.hpp:59:0,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.hpp:1021:14: error: candidates are: cv::Mat::Mat(const cv::cuda::GpuMat&)
explicit Mat(const cuda::GpuMat& m);
^
/usr/local/include/opencv2/core/mat.hpp:1018:37: error: template<class _Tp> cv::Mat::Mat(const cv::MatCommaInitializer_<_Tp>&)
template<typename _Tp> explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer);
^
/usr/local/include/opencv2/core/mat.hpp:1014:37: error: template<class _Tp> cv::Mat::Mat(const cv::Point3_<_Tp>&, bool)
template<typename _Tp> explicit Mat(const Point3_<_Tp>& pt, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:1010:37: error: template<class _Tp> cv::Mat::Mat(const cv::Point_<_Tp>&, bool)
template<typename _Tp> explicit Mat(const Point_<_Tp>& pt, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:1006:51: error: template<class _Tp, int m, int n> cv::Mat::Mat(const cv::Matx<_Tp, m, n>&, bool)
template<typename _Tp, int m, int n> explicit Mat(const Matx<_Tp, m, n>& mtx, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:1002:44: error: template<class _Tp, int n> cv::Mat::Mat(const cv::Vec<_Tp, m>&, bool)
template<typename _Tp, int n> explicit Mat(const Vec<_Tp, n>& vec, bool copyData=true);
^
/usr/local/include/opencv2/core/mat.hpp:997:49: error: template<class _Tp, long unsigned int _Nm> cv::Mat::Mat(int)
template<typename _Tp, size_t _Nm> explicit Mat(const std::array<_Tp, _Nm>& arr, bool copyData=false);
^
/usr/local/include/opencv2/core/mat.hpp:992:37: error: template<class _Tp> cv::Mat::Mat(int)
template<typename _Tp> explicit Mat(const std::initializer_list<int> sizes, const std::initializer_list<_Tp> list);
^
/usr/local/include/opencv2/core/mat.hpp:988:14: error: template<class _Tp, class> cv::Mat::Mat(int)
explicit Mat(const std::initializer_list<_Tp> list);
^
/usr/local/include/opencv2/core/mat.hpp:983:37: error: template<class _Tp> cv::Mat::Mat(const std::vector<_Tp>&, bool)
template<typename _Tp> explicit Mat(const std::vector<_Tp>& vec, bool copyData=false);
^
/usr/local/include/opencv2/core/mat.hpp:965:5: error: cv::Mat::Mat(const cv::Mat&, const std::vector<cv::Range>&)
Mat(const Mat& m, const std::vector<Range>& ranges);
^
/usr/local/include/opencv2/core/mat.hpp:955:5: error: cv::Mat::Mat(const cv::Mat&, const cv::Range*)
Mat(const Mat& m, const Range* ranges);
^
/usr/local/include/opencv2/core/mat.hpp:945:5: error: cv::Mat::Mat(const cv::Mat&, const Rect&)
Mat(const Mat& m, const Rect& roi);
^
/usr/local/include/opencv2/core/mat.hpp:935:5: error: cv::Mat::Mat(const cv::Mat&, const cv::Range&, const cv::Range&)
Mat(const Mat& m, const Range& rowRange, const Range& colRange=Range::all());
^
/usr/local/include/opencv2/core/mat.hpp:923:5: error: cv::Mat::Mat(const std::vector<int>&, int, void*, const size_t*)
Mat(const std::vector<int>& sizes, int type, void* data, const size_t* steps=0);
^
/usr/local/include/opencv2/core/mat.hpp:909:5: error: cv::Mat::Mat(int, const int*, int, void*, const size_t*)
Mat(int ndims, const int* sizes, int type, void* data, const size_t* steps=0);
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3657:0,
from /usr/local/include/opencv2/core.hpp:59,
from ../src/HomeworkTwo.cpp:10:
/usr/local/include/opencv2/core/mat.inl.hpp:515:1: error: cv::Mat::Mat(cv::Size, int, void*, size_t)
Mat::Mat(Size _sz, int _type, void* _data, size_t _step)
^
/usr/local/include/opencv2/core/mat.inl.hpp:486:1: error: cv::Mat::Mat(int, int, int, void*, size_t)
Mat::Mat(int _rows, int _cols, int _type, void* _data, size_t _step)
^
/usr/local/include/opencv2/core/mat.inl.hpp:467:1: error: cv::Mat::Mat(const cv::Mat&)
Mat::Mat(const Mat& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:458:1: error: cv::Mat::Mat(const std::vector<int>&, int, const Scalar&)
Mat::Mat(const std::vector<int>& _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:441:1: error: cv::Mat::Mat(int, const int*, int, const Scalar&)
Mat::Mat(int _dims, const int* _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:450:1: error: cv::Mat::Mat(const std::vector<int>&, int)
Mat::Mat(const std::vector<int>& _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:433:1: error: cv::Mat::Mat(int, const int*, int)
Mat::Mat(int _dims, const int* _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:424:1: error: cv::Mat::Mat(cv::Size, int, const Scalar&)
Mat::Mat(Size _sz, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:407:1: error: cv::Mat::Mat(int, int, int, const Scalar&)
Mat::Mat(int _rows, int _cols, int _type, const Scalar& _s)
^
/usr/local/include/opencv2/core/mat.inl.hpp:416:1: error: cv::Mat::Mat(cv::Size, int)
Mat::Mat(Size _sz, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:399:1: error: cv::Mat::Mat(int, int, int)
Mat::Mat(int _rows, int _cols, int _type)
^
/usr/local/include/opencv2/core/mat.inl.hpp:393:1: error: cv::Mat::Mat()
Mat::Mat()
^
/usr/local/include/opencv2/core/mat.inl.hpp:1348:26: error: expected ‘,’ or ‘...’ before ‘&&’ token
Mat& Mat::operator = (Mat&& m)
^
/usr/local/include/opencv2/core/mat.inl.hpp: In member function ‘cv::Mat& cv::Mat::operator=(cv::Mat)’:
/usr/local/include/opencv2/core/mat.inl.hpp:1350:18: error: ‘m’ was not declared in this scope
if (this == &m)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1354:13: error: ‘m’ was not declared in this scope
flags = m.flags; dims = m.dims; rows = m.rows; cols = m.cols; data = m.data;
^
/usr/local/include/opencv2/core/mat.inl.hpp: At global scope:
/usr/local/include/opencv2/core/mat.inl.hpp:1628:22: error: ‘cv::Mat_<_Tp>::Mat_’ declared as an ‘inline’ variable
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1628:22: error: ‘int cv::Mat_<_Tp>::Mat_’ is not a static data member of ‘class cv::Mat_<_Tp>’
/usr/local/include/opencv2/core/mat.inl.hpp:1628:22: error: template definition of non-template ‘int cv::Mat_<_Tp>::Mat_’
/usr/local/include/opencv2/core/mat.inl.hpp:1628:17: error: ‘initializer_list’ is not a member of ‘std’
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1628:42: error: expected primary-expression before ‘>’ token
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1628:44: error: ‘list’ was not declared in this scope
Mat_<_Tp>::Mat_(std::initializer_list<_Tp> list)
^
/usr/local/include/opencv2/core/mat.inl.hpp:1633:28: error: ‘initializer_list’ in namespace ‘std’ does not name a template type
Mat_<_Tp>::Mat_(const std::initializer_list<int> sizes, std::initializer_list<_Tp> list)

Tensorflow Serving bazel build Error: mnist_inference_2.cc - Signatures' has not been declared

I am trying to replicate tensorflow serving examples from https://tensorflow.github.io/serving/serving_advanced.html
But I get following error. It is possibly Tensorflow library error. Any help will be greatly appreciated.
:
~/serving$ bazel build //tensorflow_serving/example:mnist_inference_2
INFO: Found 1 target...
ERROR: /home/ubuntu/serving/tensorflow_serving/session_bundle/BUILD:125:1: C++ compilation of rule '//tensorflow_serving/session_bundle:session_bundle' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . ... (remaining 103 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from ./tensorflow_serving/session_bundle/session_bundle.h:30:0,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
./tensorflow_serving/session_bundle/signature.h:40:22: error: 'Signatures' has not been declared
Signatures* signatures);
^
./tensorflow_serving/session_bundle/signature.h:43:28: error: 'Signatures' does not name a type
Status SetSignatures(const Signatures& signatures,
^
./tensorflow_serving/session_bundle/signature.h:43:40: error: ISO C++ forbids declaration of 'signatures' with no type [-fpermissive]
Status SetSignatures(const Signatures& signatures,
^
./tensorflow_serving/session_bundle/signature.h:51:5: error: 'ClassificationSignature' has not been declared
ClassificationSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:58:5: error: 'ClassificationSignature' has not been declared
ClassificationSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:64:31: error: 'RegressionSignature' has not been declared
RegressionSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:73:32: error: 'ClassificationSignature' does not name a type
Status RunClassification(const ClassificationSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:73:57: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status RunClassification(const ClassificationSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:83:28: error: 'RegressionSignature' does not name a type
Status RunRegression(const RegressionSignature& signature, const Tensor& input,
^
./tensorflow_serving/session_bundle/signature.h:83:49: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status RunRegression(const RegressionSignature& signature, const Tensor& input,
^
./tensorflow_serving/session_bundle/signature.h:90:28: error: 'GenericSignature' has not been declared
GenericSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:94:28: error: 'Signature' has not been declared
Signature* default_signature);
^
./tensorflow_serving/session_bundle/signature.h:100:26: error: 'Signature' has not been declared
Signature* default_signature);
^
./tensorflow_serving/session_bundle/signature.h:106:32: error: 'GenericSignature' does not name a type
Status BindGenericInputs(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:106:50: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status BindGenericInputs(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:117:31: error: 'GenericSignature' does not name a type
Status BindGenericNames(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:117:49: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status BindGenericNames(const GenericSignature& signature,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:49: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:49: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:68:58: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:58: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc: In function 'void tensorflow::serving::{anonymous}::AddAssetsTensorsToInputs(tensorflow::StringPiece, const int&, std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >*)':
tensorflow_serving/session_bundle/session_bundle.cc:70:20: error: request for member 'empty' in 'asset_files', which is of non-class type 'const int'
if (!asset_files.empty()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: error: no matching function for call to 'begin(const int&)'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: candidates are:
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:87:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^
/usr/include/c++/4.8/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types '_Tp [_Nm]' and 'const int'
for (auto& asset : asset_files) {
^
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
begin(const _Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:58:5: error: request for member 'begin' in '__cont', which is of non-class type 'const int'
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = const int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:48:5: error: request for member 'begin' in '__cont', which is of non-class type 'const int'
In file included from /usr/include/c++/4.8/utility:74:0,
from /usr/include/c++/4.8/tuple:38,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/initializer_list:89:5: note: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/4.8/initializer_list:89:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: error: no matching function for call to 'end(const int&)'
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: candidates are:
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types '_Tp [_Nm]' and 'const int'
for (auto& asset : asset_files) {
^
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
end(const _Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:78:5: error: request for member 'end' in '__cont', which is of non-class type 'const int'
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template<class _Container> decltype (__cont.end()) std::end(_Container&)
end(_Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = const int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:68:5: error: request for member 'end' in '__cont', which is of non-class type 'const int'
In file included from /usr/include/c++/4.8/utility:74:0,
from /usr/include/c++/4.8/tuple:38,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/initializer_list:99:5: note: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
end(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/4.8/initializer_list:99:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:76:69: error: no matching function for call to 'std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >::push_back(<brace-enclosed initializer list>)'
{asset.tensor_binding().tensor_name(), assets_file_tensor});
^
tensorflow_serving/session_bundle/session_bundle.cc:76:69: note: candidates are:
In file included from /usr/include/c++/4.8/vector:64:0,
from external/protobuf/src/google/protobuf/unknown_field_set.h:43,
from external/protobuf/src/google/protobuf/metadata.h:43,
from bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:25,
from external/org_tensorflow/tensorflow/core/lib/core/status.h:22,
from ./tensorflow_serving/session_bundle/session_bundle.h:23,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::basic_string<char>, tensorflow::Tensor>; _Alloc = std::allocator<std::pair<std::basic_string<char>, tensorflow::Tensor> >; std::vector<_Tp, _Alloc>::value_type = std::pair<std::basic_string<char>, tensorflow::Tensor>]
push_back(const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::basic_string<char>, tensorflow::Tensor>&}'
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<std::basic_string<char>, tensorflow::Tensor>; _Alloc = std::allocator<std::pair<std::basic_string<char>, tensorflow::Tensor> >; std::vector<_Tp, _Alloc>::value_type = std::pair<std::basic_string<char>, tensorflow::Tensor>]
push_back(value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >::value_type&& {aka std::pair<std::basic_string<char>, tensorflow::Tensor>&&}'
tensorflow_serving/session_bundle/session_bundle.cc: At global scope:
tensorflow_serving/session_bundle/session_bundle.cc:103:39: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:103:39: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:103:48: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:103:48: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc:117:36: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:117:36: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:117:45: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:117:45: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc: In function 'tensorflow::Status tensorflow::serving::LoadSessionBundleFromPath(const tensorflow::SessionOptions&, tensorflow::StringPiece, tensorflow::serving::SessionBundle*)':
tensorflow_serving/session_bundle/session_bundle.cc:165:15: error: 'AssetFile' was not declared in this scope
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:165:15: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:165:24: error: template argument 1 is invalid
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:165:24: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc:165:37: error: invalid type in declaration before ';' token
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:170:17: error: expected ';' before 'asset_file'
AssetFile asset_file;
^
tensorflow_serving/session_bundle/session_bundle.cc:171:25: error: the value of 'AssetFile' is not usable in a constant expression
if (!any_asset.Is<AssetFile>()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:165:15: note: 'AssetFile' was not declared 'constexpr'
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:171:36: error: no matching function for call to 'google::protobuf::Any::Is() const'
if (!any_asset.Is<AssetFile>()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:171:36: note: candidate is:
In file included from bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/core/protobuf/meta_graph.pb.h:32:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:25,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
external/protobuf/src/google/protobuf/any.pb.h:66:29: note: template<class T> bool google::protobuf::Any::Is() const
template<typename T> bool Is() const {
^
external/protobuf/src/google/protobuf/any.pb.h:66:29: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:174:13: error: 'asset_file' was not declared in this scope
asset_file.descriptor()->full_name(), ". Got: ",
^
tensorflow_serving/session_bundle/session_bundle.cc:178:32: error: 'asset_file' was not declared in this scope
if (!any_asset.UnpackTo(&asset_file)) {
^
tensorflow_serving/session_bundle/session_bundle.cc:182:19: error: request for member 'push_back' in 'asset_files', which is of non-class type 'int'
asset_files.push_back(asset_file);
^
tensorflow_serving/session_bundle/session_bundle.cc:182:29: error: 'asset_file' was not declared in this scope
asset_files.push_back(asset_file);
^
Target //tensorflow_serving/example:mnist_inference_2 failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.822s, Critical Path: 4.54s
From the page you linked: "Before getting started, please complete the prerequisites."
The type Signatures is defined in a header generated by following said prereqs process, so you've either not followed those steps or not followed them correctly – there's no way to tell which just from the compiler errors.

Errors building STLPort

I'm trying to use STLPort in my project, and when I follow the directions in INSTALL.unixes I get compile errors.
I ran ./configure, then make, the output is below. I'm using make 3.81 and gcc 4.6.1 on Ubuntu.
Edit: I tried adding --with-extra-cxxflags="-std=c++ox" and I get a different and smaller set of errors, listed below.
In file included from ../stlport/memory:45:0,
from reachable.cc:16:
../stlport/stl/_shared_ptr.h:377:43: error: function definition does not declare parameters
../stlport/stl/_shared_ptr.h:421:39: error: declaration of ‘operator=’ as non-function
../stlport/stl/_shared_ptr.h:421:26: error: expected ‘;’ at end of member declaration
../stlport/stl/_shared_ptr.h:421:39: error: function definition does not declare parameters
../stlport/stl/_shared_ptr.h:463:17: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:536:43: error: function definition does not declare parameters
../stlport/stl/_shared_ptr.h:552:39: error: declaration of ‘operator=’ as non-function
../stlport/stl/_shared_ptr.h:552:26: error: expected ‘;’ at end of member declaration
../stlport/stl/_shared_ptr.h:552:39: error: function definition does not declare parameters
../stlport/stl/_shared_ptr.h:591:17: error: ‘nullptr_t’ has not been declared
In file included from ../stlport/memory:45:0,
from reachable.cc:16:
../stlport/stl/_shared_ptr.h:643:45: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:647:18: error: declaration of ‘operator==’ as non-function
../stlport/stl/_shared_ptr.h:647:18: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:647:18: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:647:29: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:647:50: error: expected primary-expression before ‘>’ token
../stlport/stl/_shared_ptr.h:647:53: error: ‘x’ was not declared in this scope
../stlport/stl/_shared_ptr.h:651:45: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:655:18: error: declaration of ‘operator!=’ as non-function
../stlport/stl/_shared_ptr.h:655:18: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:655:18: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:655:29: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:655:50: error: expected primary-expression before ‘>’ token
../stlport/stl/_shared_ptr.h:655:53: error: ‘x’ was not declared in this scope
../stlport/stl/_shared_ptr.h:660:44: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:665:17: error: declaration of ‘operator<’ as non-function
../stlport/stl/_shared_ptr.h:665:17: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:665:17: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:665:28: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:665:49: error: expected primary-expression before ‘>’ token
../stlport/stl/_shared_ptr.h:665:52: error: ‘x’ was not declared in this scope
../stlport/stl/_shared_ptr.h:669:44: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:673:17: error: declaration of ‘operator>’ as non-function
../stlport/stl/_shared_ptr.h:673:17: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:673:17: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:673:28: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:673:49: error: expected primary-expression before ‘>’ token
../stlport/stl/_shared_ptr.h:673:52: error: ‘x’ was not declared in this scope
../stlport/stl/_shared_ptr.h:677:45: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:681:18: error: declaration of ‘operator<=’ as non-function
../stlport/stl/_shared_ptr.h:681:18: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:681:18: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:681:29: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:681:50: error: expected primary-expression before ‘>’ token
../stlport/stl/_shared_ptr.h:681:53: error: ‘x’ was not declared in this scope
../stlport/stl/_shared_ptr.h:685:45: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:689:18: error: declaration of ‘operator>=’ as non-function
../stlport/stl/_shared_ptr.h:689:18: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:689:18: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:689:29: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:689:50: error: expected primary-expression before ‘>’ token
../stlport/stl/_shared_ptr.h:689:53: error: ‘x’ was not declared in this scope
../stlport/stl/_shared_ptr.h:775:26: error: expected ‘)’ before ‘,’ token
../stlport/stl/_shared_ptr.h:790:26: error: expected ‘)’ before ‘,’ token
../stlport/stl/_shared_ptr.h:917:43: error: function definition does not declare parameters
../stlport/stl/_shared_ptr.h:1160:26: error: expected ‘)’ before ‘,’ token
../stlport/stl/_shared_ptr.h:1175:26: error: expected ‘)’ before ‘,’ token
../stlport/stl/_shared_ptr.h:1296:43: error: function definition does not declare parameters
../stlport/stl/_shared_ptr.h:1553:42: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:1557:18: error: declaration of ‘operator==’ as non-function
../stlport/stl/_shared_ptr.h:1557:18: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:1557:18: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:1557:29: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:1561:42: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:1565:18: error: declaration of ‘operator!=’ as non-function
../stlport/stl/_shared_ptr.h:1565:18: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:1565:18: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:1565:29: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:1569:41: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:1573:17: error: declaration of ‘operator<’ as non-function
../stlport/stl/_shared_ptr.h:1573:17: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:1573:17: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:1573:28: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:1577:42: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:1581:18: error: declaration of ‘operator<=’ as non-function
../stlport/stl/_shared_ptr.h:1581:18: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:1581:18: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:1581:29: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:1585:41: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:1589:17: error: declaration of ‘operator>’ as non-function
../stlport/stl/_shared_ptr.h:1589:17: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:1589:17: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:1589:28: error: expected primary-expression before ‘const’
../stlport/stl/_shared_ptr.h:1593:42: error: ‘nullptr_t’ has not been declared
../stlport/stl/_shared_ptr.h:1597:18: error: declaration of ‘operator>=’ as non-function
../stlport/stl/_shared_ptr.h:1597:18: error: ‘nullptr_t’ was not declared in this scope
../stlport/stl/_shared_ptr.h:1597:18: note: suggested alternative:
/usr/include/c++/4.6/i686-linux-gnu/./bits/c++config.h:159:29: note: ‘std::nullptr_t’
../stlport/stl/_shared_ptr.h:1597:29: error: expected primary-expression before ‘const’
In file included from ../stlport/stl/_hashtable.h:541:0,
from ../stlport/stl/_unordered_map.h:24,
from ../stlport/unordered_map:28,
from reachable.cc:17:
../stlport/stl/_hashtable.c: In member function ‘stlp_std::pair<stlp_std::priv::_Ht_iterator<typename stlp_std::forward_list<_Val, _All>::iterator, typename _Traits::_NonConstTraits>, bool> stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::insert_unique_noresize(const value_type&) [with _Val = stlp_std::pair<void* const, long unsigned int>, _Key = void*, _HF = stlp_std::hash<void*>, _Traits = stlp_std::priv::_UnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> >, _ExK = stlp_std::priv::_Select1st<stlp_std::pair<void* const, long unsigned int> >, _EqK = stlp_std::equal_to<void*>, _All = stlp_std::allocator<stlp_std::pair<void* const, long unsigned int> >, typename _Traits::_NonConstTraits = stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> >, typename stlp_std::forward_list<_Val, _All>::iterator = stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::value_type = stlp_std::pair<void* const, long unsigned int>]’:
../stlport/stl/_hashtable.c:251:41: instantiated from ‘stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::reference stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::_M_insert(const value_type&) [with _Val = stlp_std::pair<void* const, long unsigned int>, _Key = void*, _HF = stlp_std::hash<void*>, _Traits = stlp_std::priv::_UnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> >, _ExK = stlp_std::priv::_Select1st<stlp_std::pair<void* const, long unsigned int> >, _EqK = stlp_std::equal_to<void*>, _All = stlp_std::allocator<stlp_std::pair<void* const, long unsigned int> >, stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::reference = stlp_std::pair<void* const, long unsigned int>&, stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::value_type = stlp_std::pair<void* const, long unsigned int>]’
../stlport/stl/_unordered_map.h:130:22: instantiated from ‘_Tp& stlp_std::unordered_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>::operator[](const _KT&) [with _KT = void*, _Key = void*, _Tp = long unsigned int, _HashFcn = stlp_std::hash<void*>, _EqualKey = stlp_std::equal_to<void*>, _Alloc = stlp_std::allocator<stlp_std::pair<void* const, long unsigned int> >]’
reachable.cc:45:27: instantiated from here
../stlport/stl/_hashtable.c:206:59: error: use of deleted function ‘stlp_std::pair<_T1, _T2>::pair(stlp_std::pair<_T1, _T2>&&) [with _T1 = stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, _T2 = bool, stlp_std::pair<_T1, _T2> = stlp_std::pair<stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, bool>]’
In file included from ../stlport/stl/_alloc.h:53:0,
from ../stlport/memory:30,
from reachable.cc:16:
../stlport/utility:140:3: error: ‘stlp_std::pair<_T1, _T2>::pair(stlp_std::pair<_T1, _T2>&&) [with _T1 = stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, _T2 = bool, stlp_std::pair<_T1, _T2> = stlp_std::pair<stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, bool>]’ is implicitly deleted because the default definition would be ill-formed:
../stlport/utility:140:3: error: non-static data member ‘stlp_std::pair<stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, bool>::first’ does not have a move constructor or trivial copy constructor
In file included from ../stlport/stl/_hashtable.h:541:0,
from ../stlport/stl/_unordered_map.h:24,
from ../stlport/unordered_map:28,
from reachable.cc:17:
../stlport/stl/_hashtable.c:251:41: instantiated from ‘stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::reference stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::_M_insert(const value_type&) [with _Val = stlp_std::pair<void* const, long unsigned int>, _Key = void*, _HF = stlp_std::hash<void*>, _Traits = stlp_std::priv::_UnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> >, _ExK = stlp_std::priv::_Select1st<stlp_std::pair<void* const, long unsigned int> >, _EqK = stlp_std::equal_to<void*>, _All = stlp_std::allocator<stlp_std::pair<void* const, long unsigned int> >, stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::reference = stlp_std::pair<void* const, long unsigned int>&, stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::value_type = stlp_std::pair<void* const, long unsigned int>]’
../stlport/stl/_unordered_map.h:130:22: instantiated from ‘_Tp& stlp_std::unordered_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>::operator[](const _KT&) [with _KT = void*, _Key = void*, _Tp = long unsigned int, _HashFcn = stlp_std::hash<void*>, _EqualKey = stlp_std::equal_to<void*>, _Alloc = stlp_std::allocator<stlp_std::pair<void* const, long unsigned int> >]’
reachable.cc:45:27: instantiated from here
../stlport/stl/_hashtable.c:216:54: error: use of deleted function ‘stlp_std::pair<_T1, _T2>::pair(stlp_std::pair<_T1, _T2>&&) [with _T1 = stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, _T2 = bool, stlp_std::pair<_T1, _T2> = stlp_std::pair<stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, bool>]’
../stlport/stl/_hashtable.c:251:41: instantiated from ‘stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::reference stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::_M_insert(const value_type&) [with _Val = stlp_std::pair<void* const, long unsigned int>, _Key = void*, _HF = stlp_std::hash<void*>, _Traits = stlp_std::priv::_UnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> >, _ExK = stlp_std::priv::_Select1st<stlp_std::pair<void* const, long unsigned int> >, _EqK = stlp_std::equal_to<void*>, _All = stlp_std::allocator<stlp_std::pair<void* const, long unsigned int> >, stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::reference = stlp_std::pair<void* const, long unsigned int>&, stlp_std::hashtable<_Val, _Key, _HF, _Traits, _ExK, _EqK, _All>::value_type = stlp_std::pair<void* const, long unsigned int>]’
../stlport/stl/_unordered_map.h:130:22: instantiated from ‘_Tp& stlp_std::unordered_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc>::operator[](const _KT&) [with _KT = void*, _Key = void*, _Tp = long unsigned int, _HashFcn = stlp_std::hash<void*>, _EqualKey = stlp_std::equal_to<void*>, _Alloc = stlp_std::allocator<stlp_std::pair<void* const, long unsigned int> >]’
reachable.cc:45:27: instantiated from here
../stlport/stl/_hashtable.c:219:67: error: use of deleted function ‘stlp_std::pair<_T1, _T2>::pair(stlp_std::pair<_T1, _T2>&&) [with _T1 = stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, _T2 = bool, stlp_std::pair<_T1, _T2> = stlp_std::pair<stlp_std::priv::_Ht_iterator<stlp_std::priv::_Slist_iterator<stlp_std::pair<void* const, long unsigned int>, stlp_std::_Nonconst_traits<stlp_std::pair<void* const, long unsigned int> > >, stlp_std::priv::_NonLocalUnorderedMapTraitsT<stlp_std::pair<void* const, long unsigned int> > >, bool>]’
make[1]: *** [obj/gcc/so/reachable.o] Error 1
make: *** [release-shared] Error 2
It turns out the source I got my copy of STLPort from, git://stlport.git.sourceforge.net/gitroot/stlport/stlport, is much more bleeding edge than I thought. If I grab the stable build from SourceForge it compiles fine.