Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Compilation issue on ubuntu 16.04 #651

Closed
vittvolt opened this issue May 2, 2017 · 4 comments
Closed

Compilation issue on ubuntu 16.04 #651

vittvolt opened this issue May 2, 2017 · 4 comments
Assignees

Comments

@vittvolt
Copy link
Contributor

vittvolt commented May 2, 2017

After pulling from the latest master, I am having issues with building some tests on my laptop (g++ 5.4, Ubuntu 16.04). I tried running package.sh and rebuilt everything and it did not work. (I could build the peloton executable and some other tests though).

The errors are from a #include statement in tcop.h:

[100%] Building CXX object test/CMakeFiles/constraints_test.dir/catalog/constraints_test.cpp.o
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/c++allocator.h:33:0,
from /usr/include/c++/5/bits/allocator.h:46,
from /usr/include/c++/5/string:41,
from /usr/include/c++/5/stdexcept:39,
from /usr/include/c++/5/array:38,
from /usr/include/c++/5/tuple:39,
from /usr/include/c++/5/mutex:38,
from /home/tianhe/Desktop/15721-project3/forked-peloton/peloton/src/include/tcop/tcop.h:17,
from /home/tianhe/Desktop/15721-project3/forked-peloton/peloton/test/catalog/constraints_test.cpp:14:

/usr/include/c++/5/bits/vector.tcc:96:30: required from ‘void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {unsigned int&, peloton::expression::AbstractExpression*&}; _Tp = std::pair<unsigned int, const peloton::planner::DerivedAttribute>; _Alloc = std::allocator<std::pair<unsigned int, const peloton::planner::DerivedAttribute> >]’
/home/tianhe/Desktop/15721-project3/forked-peloton/peloton/test/include/catalog/constraints_tests_util.h:184:50: required from here
/usr/include/c++/5/ext/new_allocator.h:120:4: error: no matching function for call to ‘std::pair<unsigned int, const peloton::planner::DerivedAttribute>::pair(unsigned int&, peloton::expression::AbstractExpression*&)’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^

and

/usr/include/c++/5/bits/stl_pair.h:144:12: note: template argument deduction/substitution failed:
/usr/include/c++/5/bits/stl_pair.h:141:38: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
template<class _U1, class _U2, class = typename
^
/usr/include/c++/5/bits/stl_pair.h:138:12: note: candidate: template<class _U2, class> constexpr std::pair<_T1, _T2>::pair(const _T1&, _U2&&)
constexpr pair(const _T1& __x, _U2&& __y)
^
/usr/include/c++/5/bits/stl_pair.h:138:12: note: template argument deduction/substitution failed:
/usr/include/c++/5/bits/stl_pair.h:136:27: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
template<class _U2, class = typename

@phisiart
Copy link
Contributor

phisiart commented May 3, 2017

We might have had the same problem before. I'm not sure, but you might want to have a try.

I see that the error is from /home/tianhe/Desktop/15721-project3/forked-peloton/peloton/test/include/catalog/constraints_tests_util.h:184:50, which is not in the master branch. I assume it is from your fork here.

You can try modifying this line:

target_list.emplace_back(col_id, expression);

into these lines:

planner::DerivedAttribute attribute;
attribute.expr = expression;
target_list.emplace_back(col_id, attribute);

@vittvolt
Copy link
Contributor Author

vittvolt commented May 3, 2017

@phisiart That solved the issue, thank you very much! I did not notice the change in type.

@apavlo
Copy link
Member

apavlo commented May 3, 2017

Can you guys submit a PR with just this fix?

@phisiart
Copy link
Contributor

phisiart commented May 3, 2017

@apavlo I don't think this issue is in the master branch.
They seem to have copied some code from the old codebase (which is changed by the codegen PR) to create their own test cases. @vittvolt Is that the case?

pmenon added a commit to pmenon/peloton-1 that referenced this issue May 5, 2017
tq5124 pushed a commit to tq5124/peloton-1 that referenced this issue May 16, 2017
apavlo added a commit that referenced this issue May 16, 2017
bitmybytes pushed a commit to bitmybytes/peloton that referenced this issue May 18, 2017
@apavlo apavlo closed this as completed May 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants