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

database_tests.cpp:74:49: error: use of overloaded operator '==' is ambiguous #439

Closed
Arthur111 opened this issue Oct 25, 2017 · 16 comments
Closed
Labels
build About build process

Comments

@Arthur111
Copy link

bitshares-core/tests/tests/database_tests.cpp:74:49: error:
use of overloaded operator '==' is ambiguous (with operand types
'const fc::unsigned_int' and 'int')
FC_ASSERT( bitusd.bitasset_data_id->instance == 0 );
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~

if i comment // FC_ASSERT( bitusd.bitasset_data_id->instance == 0 );
compile is ok.

@oxarbitrage
Copy link
Member

you are probably under an old version. please try current develop branch or last pre-release at https://github.com/bitshares/bitshares-core/releases.

database tests are all passing:

alfredo@alfredo-Inspiron-5559 ~/CLionProjects/elasticsearch-plugin2 $ ./tests/chain_test -t database_tests
Random number generator seeded to 1508931468
GRAPHENE_TESTING_GENESIS_TIMESTAMP is 1431700000
Running 3 test cases...
2268977ms th_a       db_management.cpp:151         open                 ] Wiping object_database due to missing or wrong version
2268977ms th_a       object_database.cpp:93        wipe                 ] Wiping object database...
2268977ms th_a       object_database.cpp:95        wipe                 ] Done wiping object databse.
2268977ms th_a       object_database.cpp:106       open                 ] Opening object database from /tmp/graphene-tmp/57c9-ec04-0edb-c0b0 ...
2268977ms th_a       object_database.cpp:111       open                 ] Done opening object database.
2268984ms th_a       db_management.cpp:191         close                ] Rewinding from 1 to 0
2268984ms th_a       db_management.cpp:201         close                ] Database close unexpected exception: {"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"fork_database.cpp","line":41,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"2017-10-25T11:37:48"},"format":"_head: no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":430,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"2017-10-25T11:37:48"},"format":"","data":{}}]}
2269001ms th_a       db_management.cpp:151         open                 ] Wiping object_database due to missing or wrong version
2269001ms th_a       object_database.cpp:93        wipe                 ] Wiping object database...
2269001ms th_a       object_database.cpp:95        wipe                 ] Done wiping object databse.
2269001ms th_a       object_database.cpp:106       open                 ] Opening object database from /tmp/graphene-tmp/475b-9629-e502-3a41 ...
2269002ms th_a       object_database.cpp:111       open                 ] Done opening object database.
2269009ms th_a       db_management.cpp:191         close                ] Rewinding from 3 to 0
2269009ms th_a       db_management.cpp:201         close                ] Database close unexpected exception: {"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"fork_database.cpp","line":41,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"2017-10-25T11:37:49"},"format":"_head: no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":430,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"2017-10-25T11:37:49"},"format":"","data":{}}]}
2269025ms th_a       db_management.cpp:151         open                 ] Wiping object_database due to missing or wrong version
2269025ms th_a       object_database.cpp:93        wipe                 ] Wiping object database...
2269025ms th_a       object_database.cpp:95        wipe                 ] Done wiping object databse.
2269025ms th_a       object_database.cpp:106       open                 ] Opening object database from /tmp/graphene-tmp/097f-f116-614e-cc55 ...
2269025ms th_a       object_database.cpp:111       open                 ] Done opening object database.
2269029ms th_a       db_management.cpp:191         close                ] Rewinding from 1 to 0
2269029ms th_a       db_management.cpp:201         close                ] Database close unexpected exception: {"code":10,"name":"assert_exception","message":"Assert Exception","stack":[{"context":{"level":"error","file":"fork_database.cpp","line":41,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"2017-10-25T11:37:49"},"format":"_head: no blocks to pop","data":{}},{"context":{"level":"warn","file":"db_block.cpp","line":430,"method":"pop_block","hostname":"","thread_name":"th_a","timestamp":"2017-10-25T11:37:49"},"format":"","data":{}}]}

*** No errors detected
alfredo@alfredo-Inspiron-5559 ~/CLionProjects/elasticsearch-plugin2 $ 

@Arthur111
Copy link
Author

Its during the build (a compilation error), not the execution tests, since the last commit ( on Oct 24, 2017 , 6d6f5dd)

@oxarbitrage
Copy link
Member

ok, hold on, trying.

@oxarbitrage
Copy link
Member

just finished compilation:

root@NC-PH-1346-07:~/bitshares/bitshares-core#make
...
[100%] Building CXX object tests/generate_empty_blocks/CMakeFiles/generate_empty_blocks.dir/main.cpp.o
Linking CXX executable generate_empty_blocks
[100%] Built target generate_empty_blocks****
root@NC-PH-1346-07:~/bitshares/bitshares-core#

git log shows i am at mentioned commit:

root@NC-PH-1346-07:~/bitshares/bitshares-core#git log
commit 6d6f5dd66589ae09730f3dddecccb0adaddeb033
Merge: 416f058 8a24d33
Author: oxarbitrage <oxarbitrage@gmail.com>
Date:   Tue Oct 24 10:23:40 2017 -0300

    Merge pull request #427 from pmconrad/testnet_release
    
    Release Candidate

commit 8a24d3371827c983d8038cc8f2379f7fa3b25ede
...

@Arthur111
Copy link
Author

Arthur111 commented Oct 25, 2017

Seems we don't build on the same platform, i m using clang on osx.
And my compiler say no, nada, niet, nicht, non.
The only way to build successfully is to comment the line mentioned above.

@oxarbitrage
Copy link
Member

got it. will you mind instead of remove the line to try:

 FC_ASSERT( bitusd.bitasset_data_id->instance < 1 );

or:

 FC_ASSERT( (int)bitusd.bitasset_data_id->instance == 0 );

if that compiles for you we may change it.

@Arthur111
Copy link
Author

Yes the second is ok (the cast), the first is not.
wait for the commit to close it.
Thank you.

@oxarbitrage oxarbitrage added the build About build process label Oct 25, 2017
oxarbitrage added a commit that referenced this issue Oct 25, 2017
@oxarbitrage
Copy link
Member

thank you very much for testing. sent pull(#440). 1 more of the core devs need to approve it before i can merge.

oxarbitrage added a commit that referenced this issue Oct 25, 2017
@oxarbitrage
Copy link
Member

closing as fix was merged.

@Arthur111
Copy link
Author

Sorry but the commit on Oct 25 ( 504e63e and a605c5f ) does not include the fix 03c3743.
fix is not merged

@oxarbitrage
Copy link
Member

the fix is merged in the develop branch. for us the issue is fixed. the develop branch is merged to master at release time. a release just went out and we do not know when we will be sending a new one so you should use the develop branch until then.

@Arthur111
Copy link
Author

Why when i type git pull i got ( 504e63e and a605c5f ) (commit on Oct 25) and not 03c3743 ?

@oxarbitrage
Copy link
Member

switch to the develop branch as:

git checkout -t origin/develop

@Arthur111
Copy link
Author

no because i have already fix the bug.( as i said i my comment above ).

@abitmore
Copy link
Member

@Arthur111 yes, the fix has been merged into develop branch, but we're not going to merge it (and another fix for #399) to master right now, because they're relatively minor issues and we don't want to postpone the release or create a new major release due to them.

I'll create a "minor-fix" tag for them, so people who need them can checkout the tag. For example, for docker scripts, it's better to use a tag but not the develop branch.

@abitmore
Copy link
Member

Pushed a new tag 2.0.171025-minor-fix-1. Use it with commands:

git fetch origin
git checkout 2.0.171025-minor-fix-1

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

No branches or pull requests

3 participants