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 warning in db/undo_database.hpp:69:22: throw will always call terminate() #1237

Closed
3 tasks
cogutvalera opened this issue Aug 7, 2018 · 11 comments
Closed
3 tasks
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2a Discussion Needed Prompt for team to discuss at next stand up. 3c Enhancement Classification indicating a change to the functionality of the existing imlementation 4a Low Priority Priority indicating minimal impact to system/user -OR- an inexpensive workaround exists 6 Build Impact flag identifying the build process code cleanup

Comments

@cogutvalera
Copy link
Member

cogutvalera commented Aug 7, 2018

Build Error Description

[ 96%] Building CXX object tests/CMakeFiles/cli_test.dir/cli/main.cpp.o
In file included from /home/valera/Projects/Blockchain/Graphene/BitShares/bitshares-core/libraries/db/include/graphene/db/object_database.hpp:27:0,
                 from /home/valera/Projects/Blockchain/Graphene/BitShares/bitshares-core/libraries/chain/include/graphene/chain/database.hpp:34,
                 from /home/valera/Projects/Blockchain/Graphene/BitShares/bitshares-core/libraries/app/include/graphene/app/application.hpp:28,
                 from /home/valera/Projects/Blockchain/Graphene/BitShares/bitshares-core/tests/cli/main.cpp:24:
/home/valera/Projects/Blockchain/Graphene/BitShares/bitshares-core/libraries/db/include/graphene/db/undo_database.hpp: In destructor ‘graphene::db::undo_database::session::~session()’:
/home/valera/Projects/Blockchain/Graphene/BitShares/bitshares-core/libraries/db/include/graphene/db/undo_database.hpp:69:22: warning: throw will always call terminate() [-Wterminate]
                      throw; // maybe crash..
                      ^~~~~
/home/valera/Projects/Blockchain/Graphene/BitShares/bitshares-core/libraries/db/include/graphene/db/undo_database.hpp:69:22: note: in C++11 destructors default to noexcept

Build Environment

 - Host OS:             [Ubuntu 18.04 LTS]
 - Host Physical RAM    [16GB]
 - Source Branch/Tag:   [develop]
 - OpenSSL Version:     [1.1.0g 2 Nov 2017]
 - Boost Version:       [1.65.1]
 - C++ Compiler:        [gcc version (Ubuntu 7.3.0-16ubuntu3) 7.3.0]

~/Projects/Blockchain/Graphene/BitShares/bitshares-core$ ./programs/witness_node/witness_node -v
Version: 2.0.171025-minor-fix-1-1124-g0b353e0a
SHA: 0b353e0a70431f49c30bfc13469e666d0bea6da3
Timestamp: 4 days ago
SSL: OpenSSL 1.1.0g  2 Nov 2017
Boost: 1.65.1
Websocket++: 0.7.0

Steps To Reproduce
Steps to reproduce the behavior (example outlined below):

1. Using installation guide from this https://github.com/bitshares/bitshares-core/blob/master/README.md
2. sudo apt-get update
3. sudo apt-get install autoconf cmake make automake libtool git libboost-all-dev libssl-dev g++ libcurl4-openssl-dev
4. git clone https://github.com/bitshares/bitshares-core.git
5. cd bitshares-core
6. git checkout develop
7. git submodule update --init --recursive
8. cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .
9. make

CORE TEAM TASK LIST

  • Evaluate Build Error
  • Provide build guidance
  • Create Bug Report

@jmjatlanta
Copy link
Contributor

The portion of the log you show contains only a warning, and should not stop the compilation from completing.

Please provide the entire compilation log. As it is probably large, I recommend posting it to a site like http://pastebin.com and then posting the link to it here in this issue.

cogutvalera added a commit to cogutvalera/bitshares-logs that referenced this issue Aug 7, 2018
@cogutvalera
Copy link
Member Author

@jmjatlanta
Copy link
Contributor

Thank you. Can you capture all of the output of the make command? Something like:

make > compile.log 2>&1

and then provide a link to compile.log here?

@cogutvalera
Copy link
Member Author

cogutvalera commented Aug 7, 2018

https://github.com/cogutvalera/bitshares-logs/blob/master/compile.log

now I don't see the warning I've told about, do you know why ? or maybe should I cleanup and reset everything and after that re-compile the whole project again ?

@pmconrad
Copy link
Contributor

pmconrad commented Aug 7, 2018

The problem is that the destructor of undo_db can throw under certain circumstances. This is bad practice - destructors shouldn't ever throw. It's not really a problem for us, because undo_db has the same lifetime as the application itself.
Wouldn't mind a proper cleanup though.

@ryanRfox
Copy link
Contributor

ryanRfox commented Aug 8, 2018

I see that #1194 was closed already. Does that fix this? I see @cogutvalera build from develop so perhaps not. As needed, @pmconrad shall we mark this as code clean up?

@pmconrad pmconrad added code cleanup 4a Low Priority Priority indicating minimal impact to system/user -OR- an inexpensive workaround exists labels Aug 9, 2018
@pmconrad
Copy link
Contributor

pmconrad commented Aug 9, 2018

No, #1194 is unrelated

@jmjatlanta
Copy link
Contributor

@cogutvalera were you able to find the error that prevented you from compiling? Please post it here. If you reset your project and the problem went away, please let us know and close this ticket. Thanks.

@cogutvalera
Copy link
Member Author

@jmjatlanta that wasn't error, that was warning, I think we don't need even compile warnings, right ?

here is my compile.log file, I still see that warning
https://github.com/cogutvalera/bitshares-logs/blob/master/compile.log

@ryanRfox ryanRfox added 1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2a Discussion Needed Prompt for team to discuss at next stand up. 3c Enhancement Classification indicating a change to the functionality of the existing imlementation 6 Build Impact flag identifying the build process labels Aug 10, 2018
@jmjatlanta
Copy link
Contributor

jmjatlanta commented Aug 13, 2018

I'm sorry. I misinterpreted the original post. I thought the compilation was failing. There is another similar (albeit harder to fix) warning in FC. I created #1246 to fix those warnings before I realized this ticket could be used.

Note to self: Get more organized!

@jmjatlanta
Copy link
Contributor

#1246 is somewhat a duplicate of this issue, albeit broader in scope.

@abitmore abitmore removed this from the Future Feature Release milestone Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2a Discussion Needed Prompt for team to discuss at next stand up. 3c Enhancement Classification indicating a change to the functionality of the existing imlementation 4a Low Priority Priority indicating minimal impact to system/user -OR- an inexpensive workaround exists 6 Build Impact flag identifying the build process code cleanup
Projects
None yet
Development

No branches or pull requests

5 participants