IoTone / TheShellProject

The Shell Project aims to build a viable general purpose blockchain written in Dlang, with attributes of security, ease of deployment, clear specification, ease of use for DAPPs, and multiple implementation interop
1 stars 1 forks source link

After a pull running dub test fails #41

Closed pedroalvesbatista closed 6 years ago

pedroalvesbatista commented 6 years ago

The same error as before keeps going after I gave a push to update the changes

No package file found in /home/devtroll/blockchain-sandbox/iotone.co/TheShellProject/shell-d/prototype/external/rocksdb-master/, expected one of dub.json/dub.sdl/package.json

truedat101 commented 6 years ago

Can you tell me what are the contents of your external directory?

truedat101 commented 6 years ago

I think the problem is, you had previously checked in rocksdb-master into external. I removed it. When you pulled the latest, it removed rocksdb-master. You should re-run setup-deps.sh.

pedroalvesbatista commented 6 years ago

$ dub test Generating test runner configuration 'shell-d-test-library' for 'library' (library). Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847 Performing "unittest" build using dmd for x86_64. rocksdb ~master: target for configuration "library" is up to date.shell-d ~master: building configuration "shell-d-test-library"... Running pre-build commands... Building the project Linking... /usr/bin/ld: cannot find -lrocksdb/usr/bin/ld: cannot find -lrocksdb /usr/bin/ld: cannot find -lsodium collect2: error: ld returned 1 exit status Error: linker exited with status 1 dmd failed with exit code 1.

pedroalvesbatista commented 6 years ago

dub build --compiler=gdc Performing "debug" build using gdc for x86_64. rocksdb ~master: target for configuration "library" is up to date. shell-d ~master: building configuration "application"... Running pre-build commands... Building the project source/persistence.d:40:44: error: function std.json.toJSON (const(JSONValue*) root, const(bool) pretty = false, const(JSONOptions) options = cast(JSONOptions)0) is not callable using argument types (JSONValue) std.file.write(SHELL_DB, toJSON(jsondata)); // XXX Add exception handling ^ gdc failed with exit code 1.

truedat101 commented 6 years ago

This looks a like a dub issue. I'll try reproduce on linux.

truedat101 commented 6 years ago

I'll comment out that error.

truedat101 commented 6 years ago

Recreated error with gdc.

Performing "debug" build using gdc for x86_64. rocksdb ~master: building configuration "library"... shell-d ~master: building configuration "application"... Running pre-build commands... Building the project /usr/bin/ld: cannot find -lsodium /usr/bin/ld: cannot find -lrocksdb /usr/bin/ld: cannot find -lrocksdb collect2: error: ld returned 1 exit status gdc failed with exit code 1.

truedat101 commented 6 years ago

These are all only found on linux. Wondering if ldc has the same issue.

truedat101 commented 6 years ago

The libsodium magically works on windows because demios bundles the windows libraries. For strange reason unknown, it isn't bundled for linux.

truedat101 commented 6 years ago

Answer on linux: We have to build libsodium. I think I can build it once and package the libs. As for rocksdb, still having some issues. Need probably another day on this.

truedat101 commented 6 years ago

I've added a library set prebuilts for libsodium. We might need to recompile this on 16.04 ubuntu if this doesn't work for you @pedroalvesbatista . https://s3-us-west-2.amazonaws.com/shellproject/libsodium-1.0.16-linux-ia64.tar.gz

truedat101 commented 6 years ago

Copy the .so files and .a into the root of your project. I'm testing this again to see if this works.

truedat101 commented 6 years ago

@pedroalvesbatista does "dub test" work for you now?

pedroalvesbatista commented 6 years ago

Building the project still works, but dub test fails to libsodium.so.23. Is that normal because we've switched to dddb ?

truedat101 commented 6 years ago

@pedroalvesbatista can you print out the contents of the LD_LIBRARY_PATH and post here?

truedat101 commented 6 years ago

Please post the error too.