Skip to content
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

Arm cross compilation c++ compilation failed #257

Open
pioneerAlone opened this issue Sep 23, 2019 · 3 comments
Open

Arm cross compilation c++ compilation failed #257

pioneerAlone opened this issue Sep 23, 2019 · 3 comments

Comments

@pioneerAlone
Copy link

Hi
At the ti arm tool chain arm-arago-linux-gnueabi-gcc/g++ try to compile error

[ 25%] Building C object src/onion/CMakeFiles/onion.dir/handlers/opack.c.o
[ 26%] Building C object src/onion/CMakeFiles/onion.dir/handlers/path.c.o
[ 26%] Building C object src/onion/CMakeFiles/onion.dir/handlers/internal_status.c.o
[ 27%] Building C object src/onion/CMakeFiles/onion.dir/version.c.o
[ 27%] Building C object src/onion/CMakeFiles/onion.dir/poller.c.o
[ 28%] Building C object src/onion/CMakeFiles/onion.dir/random-default.c.o
[ 28%] Linking C shared library libonion.so
[ 28%] Built target onion
[ 28%] Building CXX object src/bindings/cpp/CMakeFiles/onioncpp_static.dir/dict.cpp.o
In file included from /home/work/onion/src/bindings/cpp/dict.cpp:23:0:
/home/work/onion/src/bindings/cpp/dict.hpp:48:11: error: expected nested-name-specifier before 'internal_pointer'
/home/work/onion/src/bindings/cpp/dict.hpp:48:11: error: using-declaration for non-member at class scope
/home/work/onion/src/bindings/cpp/dict.hpp:48:28: error: expected ';' before '=' token
/home/work/onion/src/bindings/cpp/dict.hpp:48:28: error: expected unqualified-id before '=' token
/home/work/onion/src/bindings/cpp/dict.hpp:50:5: error: 'internal_pointer' does not name a type
/home/work/onion/src/bindings/cpp/dict.hpp:59:33: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:60:32: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:56:48: error: looser throw specifier for 'virtual Onion::Dict::key_not_found::~key_not_found()'
/opt/arm-arago-linux-gnueabi/bin/../lib/gcc/arm-arago-linux-gnueabi/4.5.3/../../../../arm-arago-linux-gnueabi/include/c++/4.5.3/exception:65:13: error: overriding 'virtual std::exception::~exception() throw ()'
/home/work/onion/src/bindings/cpp/dict.hpp:159:43: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:166:47: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:175:31: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:185:9: error: expected ';' before 'Dict'
/home/work/onion/src/bindings/cpp/dict.hpp:186:47: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:192:28: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:197:42: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:202:26: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:207:7: error: expected ';' before 'std'
/home/work/onion/src/bindings/cpp/dict.hpp:207:34: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:214:56: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:221:46: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.hpp:244:27: error: expected ';' before 'noexcept'
/home/work/onion/src/bindings/cpp/dict.cpp:157:2: error: expected ';' at end of input
/home/work/onion/src/bindings/cpp/dict.cpp:157:2: error: expected '}' at end of input
In file included from /home/work/onion/src/bindings/cpp/dict.cpp:23:0:
/home/work/onion/src/bindings/cpp/dict.hpp: In constructor 'Onion::Dict::lock::lock(Onion::Dict::lock&&)':
/home/work/onion/src/bindings/cpp/dict.hpp:75:18: error: 'nullptr' was not declared in this scope
/home/work/onion/src/bindings/cpp/dict.hpp: In constructor 'Onion::Dict::Dict()':
/home/work/onion/src/bindings/cpp/dict.hpp:104:9: error: class 'Onion::Dict' does not have any field named 'ptr'
/home/work/onion/src/bindings/cpp/dict.hpp: In member function 'std::string Onion::Dict::operator[](const std::string&) const':
/home/work/onion/src/bindings/cpp/dict.hpp:132:38: error: 'ptr' was not declared in this scope
/home/work/onion/src/bindings/cpp/dict.hpp: At global scope:
/home/work/onion/src/bindings/cpp/dict.hpp:137:5: error: expected unqualified-id at end of input
/home/work/onion/src/bindings/cpp/dict.hpp:137:5: error: expected '}' at end of input
src/bindings/cpp/CMakeFiles/onioncpp_static.dir/build.make:62: recipe for target 'src/bindings/cpp/CMakeFiles/onioncpp_static.dir/dict.cpp.o' failed
make[2]: *** [src/bindings/cpp/CMakeFiles/onioncpp_static.dir/dict.cpp.o] Error 1
CMakeFiles/Makefile2:277: recipe for target 'src/bindings/cpp/CMakeFiles/onioncpp_static.dir/all' failed
make[1]: *** [src/bindings/cpp/CMakeFiles/onioncpp_static.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

@davidmoreno
Copy link
Owner

davidmoreno commented Sep 23, 2019 via email

@pioneerAlone
Copy link
Author

pioneerAlone commented Sep 23, 2019

Hi,David
Yes, only compile the c file to complete the compilation process; whether you can add the compile option (-std=c++11/14), complete the compilation of cpp, if so, where to set it.

@zacharygrafton
Copy link
Contributor

What version of gcc are you using? You may be able to pass the -std=c++14 option through the CFLAGS environment variable to cmake, but it's a moot point if you c++ compiler doesn't support enough of C++11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants