status-im / nim-eth

Common utilities for Ethereum
https://nimbus.status.im
Apache License 2.0
83 stars 31 forks source link

Error when running tests #196

Closed decanus closed 4 years ago

decanus commented 4 years ago

I ran the scripts as stated in the readme:

nimble install
nimble test

when running the tests I get the following error, any suggestions?

Running: tests/trie/test_storage_backends
could not load: librocksdb(|_lite).dylib
compile with -d:nimDebugDlOpen for more information
Error: execution of an external program failed: '/Users/deaneigenmann/Documents/status/nim-eth/tests/trie/test_storage_backends '
stack trace: (most recent call last)
/private/var/folders/p_/z6yknx4j1rz2vsfwpq1mq2wr0000gn/T/nimblecache/nimscriptapi.nim(165, 16)
/Users/deaneigenmann/Documents/status/nim-eth/eth_1952.nims(114, 15) testTask
/Users/deaneigenmann/Documents/status/nim-eth/eth_1952.nims(98, 12) runTrieTests
/Users/deaneigenmann/Documents/status/nim-eth/eth_1952.nims(25, 8) runTest
/usr/local/Cellar/nim/1.0.6/nim/lib/system/nimscript.nim(252, 7) exec
/usr/local/Cellar/nim/1.0.6/nim/lib/system/nimscript.nim(252, 7) Error: unhandled exception: FAILED: nim c -r -d:release -d:chronicles_log_level=ERROR --verbosity:0 --hints:off --warnings:off tests/trie/test_storage_backends [OSError]
       Tip: 1 messages have been suppressed, use --verbose to show them.
     Error: Exception raised during nimble script execution
arnetheduck commented 4 years ago

Prerequisites in instructions out of date, need to be the same as here: https://github.com/status-im/nimbus#building--testing

kdeme commented 4 years ago

And that will not even be enough, next to rocksdb, the test suite also needs lmdb and sqlite as we test for those 3 storage backends... See https://github.com/status-im/nim-eth/blob/master/tests/trie/test_storage_backends.nim#L61 Or see also what gets installed for https://github.com/status-im/nim-eth/blob/master/.appveyor.yml

arnetheduck commented 4 years ago

we could also drop some of the backends - ie we removed lmdb from nbc because it's bad on 32-bit and sqlite is now part of the build there so no dep required.. it almost makes sense to intro the build system here also, if only for the tests - but that'll make it tricky to include in repos that are already using the build system...

the backends in here are unmaintained and buggy anyway - it's not like it's extremely valuable code - I'd perhaps put a comment in one of the "common interface" files that they existed before with a link to the PR that removed them, so they're not forgotten.

arnetheduck commented 4 years ago

ping @stefantalpalaru for thoughts on how to do the build system / vendor for libraries?

kdeme commented 4 years ago

I've updated the readme for now.

@jangko cc regarding backends as he uses one of them for testing I believe?

corpetty commented 4 years ago

@decanus @arnetheduck @kdeme on ubuntu 19.10 I got past this with installing the following libraries:

kdeme commented 4 years ago

Thanks @corpetty, added to readme. Closing this.