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

Compilation error #13

Open
yolihavim opened this issue Dec 9, 2018 · 2 comments
Open

Compilation error #13

yolihavim opened this issue Dec 9, 2018 · 2 comments

Comments

@yolihavim
Copy link

I had been struggling with compiling this.

[ 12%] Building CXX object CMakeFiles/test_all.dir/src/monero_send_routine.cpp.o
[ 14%] Building CXX object CMakeFiles/test_all.dir/src/monero_fork_rules.cpp.o
[ 16%] Building CXX object CMakeFiles/test_all.dir/src/monero_wallet_utils.cpp.o
[ 17%] Building CXX object CMakeFiles/test_all.dir/src/serial_bridge_index.cpp.o
In file included from /path/other/mymonero-core-cpp/src/serial_bridge_index.cpp:33:
In file included from /path/other/mymonero-core-cpp/src/serial_bridge_index.hpp:37:
/path/other/mymonero-core-cpp/contrib/monero-core-custom/cryptonote_config.h:265:27: error: no
      member named 'runtime_error' in namespace 'std'
      default: throw std::runtime_error("Invalid network type");

clang -v

lang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/7.2.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/7.2.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.2.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.5.0
Candidate multilib: .;@m64
Selected multilib: .;@m64

ubuntu 16

@gutenye
Copy link
Contributor

gutenye commented Dec 12, 2018

@yolihavim You need to upgrade gcc or use the correct version in Ubuntu.

I use macOS though and it works.

$ clang -v
clang version 6.0.1  (emscripten 1.38.21 : 1.38.21)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Users/guten/bin/binary/emsdk/clang/e1.38.21_64bit

@ndorf
Copy link
Contributor

ndorf commented Jan 17, 2019

I had the same problem on Debian 9 (g++ 6.3.0) as well as Ubuntu 16 (g++ 5.4.0).

I ended up just patching the contrib/monero-core-custom submodule to include the appropriate headers. @yolihavim if you're still stuck on this, you can use those patches as a workaround. They are here: https://github.com/ndorf/monero-core-custom/tree/fix_missing_headers

The same exact two files compile with no problems as part of the Monero project itself, so I'm not sure why the includes are suddenly needed here.

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