-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPP - Ubuntu-16.04 Support #24
Comments
@LokeshBonta : Can you fix this? It doesn't build on Ubuntu16.04 |
|
@kiritigowda Looks like RPP uses some c++14 features as well. We need to set that and also set --std=c++14 for linking. Do you know if that fixes the errors for 16.04 assuming all prereq are installed? |
@LokeshBonta any updates on this bug? |
@kiritigowda |
Builds successfully with: Closing this issue |
@LakshmiKumar23 can you add the min version in the readme so there is no confusion about failure. |
@kiritigowda Updated and created a PR #31 |
Build fails on Ubuntu-16.04:
`
[ 2%] Building CXX object addkernels/CMakeFiles/addkernels.dir/include_inliner.cpp.o
[ 4%] Building CXX object addkernels/CMakeFiles/addkernels.dir/addkernels.cpp.o
In file included from /root/mivisionx-deps/rpp/addkernels/addkernels.cpp:26:
In file included from /root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:29:
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:37:10: error: no type named 'shared_ptr' in namespace 'std'
std::shared_ptr included_from;
~~~~~^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:37:20: error: expected member name or ';' after declaration specifiers
std::shared_ptr included_from;
~~~~~~~~~~~~~~~^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:39:51: error: no type named 'shared_ptr' in namespace 'std'
SourceFileDesc(const std::string& path_, std::shared_ptr from, int line)
~~~~~^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:39:61: error: expected ')'
SourceFileDesc(const std::string& path_, std::shared_ptr from, int line)
^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:39:19: note: to match this '('
SourceFileDesc(const std::string& path_, std::shared_ptr from, int line)
^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:40:38: error: use of undeclared identifier 'line'
: path(path_), included_line(line), included_from(from)
^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:40:59: error: use of undeclared identifier 'from'
: path(path_), included_line(line), included_from(from)
^
In file included from /root/mivisionx-deps/rpp/addkernels/addkernels.cpp:26:
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:34:7: error: exception specification of overriding function is more lax than base version
class InlineException : public std::exception
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/exception:64:13: note: overridden virtual function is here
virtual ~exception() GLIBCXX_USE_NOEXCEPT;
^
In file included from /root/mivisionx-deps/rpp/addkernels/addkernels.cpp:26:
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:51:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string What() const override
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:62:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string What() const override { return "Include directive expected"; }
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:70:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string What() const override { return "Include directive has wrong format"; }
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:81:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string What() const override;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:96:36: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string GetMessage() const override
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:111:36: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string GetMessage() const override { return "Can not open include file"; }
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:117:29: warning: in-class initialization of non-static data member is a C++11 extension
[-Wc++11-extensions]
int include_depth_limit = 256;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:129:58: warning: in-class initialization of non-static data member is a C++11 extension
[-Wc++11-extensions]
int include_depth = 0;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:130:10: error: no type named 'shared_ptr' in namespace 'std'
std::shared_ptr included_stack_head = nullptr;
~~~~~^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:130:20: error: expected member name or ';' after declaration specifiers
std::shared_ptr included_stack_head = nullptr;
~~~~~~~~~~~~~~~^
In file included from /root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:39:
In file included from /root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:29:
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:37:10: error: no type named 'shared_ptr' in namespace 'std'
std::shared_ptr included_from;
~~~~~^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:37:20: error: expected member name or ';' after declaration specifiers
std::shared_ptr included_from;
~~~~~~~~~~~~~~~^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:39:51: error: no type named 'shared_ptr' in namespace 'std'
SourceFileDesc(const std::string& path, std::shared_ptr from, int line)
~~~~~^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:39:61: error: expected ')'
SourceFileDesc(const std::string& path, std::shared_ptr from, int line)
^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:39:19: note: to match this '('
SourceFileDesc(const std::string& path, std::shared_ptr from, int line)
^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:40:38: error: use of undeclared identifier 'line'
: path(path), included_line(line), included_from(from)
^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:40:59: error: use of undeclared identifier 'from'
: path(path_), included_line(line), included_from(from)
^
In file included from /root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:39:
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:34:7: error: exception specification of overriding function is more lax than base version
class InlineException : public std::exception
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/exception:64:13: note: overridden virtual function is here
virtual ~exception() _GLIBCXX_USE_NOEXCEPT;
^
In file included from /root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:39:
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:51:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string What() const override
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:62:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string What() const override { return "Include directive expected"; }
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:70:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string What() const override { return "Include directive has wrong format"; }
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:81:30: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string What() const override;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:96:36: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string GetMessage() const override
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:111:36: warning: 'override' keyword is a C++11 extension [-Wc++11-extensions]
std::string GetMessage() const override { return "Can not open include file"; }
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:117:29: warning: in-class initialization of non-static data member is a C++11 extension
[-Wc++11-extensions]
int include_depth_limit = 256;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:129:58: warning: in-class initialization of non-static data member is a C++11 extension
[-Wc++11-extensions]
int _include_depth = 0;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:130:10: error: no type named 'shared_ptr' in namespace 'std'
std::shared_ptr _included_stack_head = nullptr;
~~~~~^
/root/mivisionx-deps/rpp/addkernels/include_inliner.hpp:130:20: error: expected member name or ';' after declaration specifiers
std::shared_ptr _included_stack_head = nullptr;
~~~~~~~~~~~~~~~^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:60:11: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
const auto retval = realpath(path.c_str(), &result[0]);
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:43:10: error: no member named 'unique_ptr' in namespace 'std'
std::unique_ptr<unsigned char[]> buffer(new unsigned char[bufferSize]);
~~~~~^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:43:30: error: expected '(' for function-style cast or type construction
std::unique_ptr<unsigned char[]> buffer(new unsigned char[bufferSize]);
~~~~~~~~ ^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:62:18: error: use of undeclared identifier 'nullptr'
if(retval == nullptr)
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:59:45: error: use of undeclared identifier 'buffer'
source.read(reinterpret_cast<char*>(buffer.get()), bufferSize);
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:71:73: error: use of undeclared identifier 'buffer'
target << "0x" << std::setw(2) << static_cast(buffer[j]) << ",";
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:101:5: error: use of undeclared identifier '_included_stack_head'
_included_stack_head =
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:106:2: error: expected expression
[[gnu::noreturn]] void WrongUsage(const std::string& error)
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:106:19: error: expected unqualified-id
[[gnu::noreturn]] void WrongUsage(const std::string& error)
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:114:2: error: expected expression
[[gnu::noreturn]] void UnknownArgument(const std::string& arg)
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:114:19: error: expected unqualified-id
[[gnu::noreturn]] void UnknownArgument(const std::string& arg)
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:102:14: error: no member named 'make_shared' in namespace 'std'
std::make_shared(file_name, _included_stack_head, line_number);
~~~~~^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:102:26: error: 'SourceFileDesc' does not refer to /root/mivisionx-deps/rpp/addkernels/addkernels.cppa :value130:
5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto extPos = fileName.rfind('.');
^
std::make_shared(file_name, _included_stack_head, line_number);
^
/root/mivisionx-deps/rpp/addkernels/source_file_desc.hpp:32:7: note: declared here
class SourceFileDesc
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:131:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto slashPos = fileName.rfind('/');
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:146:19: error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream')
std::ifstream sourceFile(sourcePath, std::ios::in | std::ios::binary);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/fstream:495:7: note: candidate constructor not viable: no known conversion from
'const std::string' (aka 'const basic_string') to 'const char ' for 1st argument
basic_ifstream(const char __s, ios_base::openmode __mode = ios_base::in)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/fstream.tcc:1054:25: note: candidate constructor (the implicit copy constructor)
not viable: requires 1 argument, but 2 were provided
extern template class basic_ifstream;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/fstream:481:7: note: candidate constructor not viable: requires 0 arguments, but 2 were
provided
basic_ifstream() : __istream_type(), _M_filebuf()
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:155:11: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
const auto is_asm = extension == "s";
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:156:11: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
const auto is_cl = extension == "cl";
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:157:11: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
const auto is_hip = extension == "cpp";
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:158:11: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
const auto is_header = extension == "hpp";
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:102:53: error: use of undeclared identifier '_included_stack_head'
std::make_shared(file_name, _included_stack_head, line_number);
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:103:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto current_line = 0;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:104:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto next_include_optional = false;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:116:15: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
const auto include_optional = next_include_optional;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:129:13: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto first_quote_pos = line.find('"', static_cast(line_parser.tellg()) + 1);
^
/root/mivisionx-deps/rpp/addkernels/addkernels.cpp:239:29: error/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp: :164:27no: member namederror : 'stol' inno namespacematching 'std';constructor didfor youinitialization meanof 'atol'?'std::ifstream'
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/cstdlib:131:11: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/fstream:495:note7: : 'atol' declarednote : herecandidate
constructor using ::atol;not
viable: ^
no known conversion from
'const std::string' (aka 'const basic_string') to 'const char ' for 1st argument
basic_ifstream(const char __s, ios_base::openmode __mode = ios_base::in)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/fstream.tcc:1054:25: note: candidate constructor (the implicit copy constructor)
not viable: requires 1 argument, but 2 were provided
extern template class basic_ifstream;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/fstream:481:7: note: candidate constructor not viable: requires 0 arguments, but 2 were
provided
basic_ifstream() : __istream_type(), _M_filebuf()
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:191:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto prev_file = _included_stack_head->included_from;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
14 warnings and 20 errors generated.
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:191:28: error: use of undeclared identifier '_included_stack_head'
auto prev_file = _included_stack_head->included_from;
^
addkernels/CMakeFiles/addkernels.dir/build.make:86: recipe for target 'addkernels/CMakeFiles/addkernels.dir/addkernels.cpp.o' failed
make[2]: *** [addkernels/CMakeFiles/addkernels.dir/addkernels.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:192:5: error: use of undeclared identifier '_included_stack_head'
_included_stack_head = prev_file;
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:200:8: error: use of undeclared identifier '_included_stack_head'
if(_included_stack_head == nullptr)
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:200:32: error: use of undeclared identifier 'nullptr'
if(_included_stack_head == nullptr)
^
/root/mivisionx-deps/rpp/addkernels/include_inliner.cpp:203:5: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto item = _included_stack_head;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
15 warnings and 20 errors generated.
addkernels/CMakeFiles/addkernels.dir/build.make:62: recipe for target 'addkernels/CMakeFiles/addkernels.dir/include_inliner.cpp.o' failed
make[2]: *** [addkernels/CMakeFiles/addkernels.dir/include_inliner.cpp.o] Error 1
CMakeFiles/Makefile2:403: recipe for target 'addkernels/CMakeFiles/addkernels.dir/all' failed
make[1]: *** [addkernels/CMakeFiles/addkernels.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
`
The text was updated successfully, but these errors were encountered: