Closed pedroalvesbatista closed 6 years ago
Can you tell me what are the contents of your external directory?
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.
$ 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.
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.
This looks a like a dub issue. I'll try reproduce on linux.
I'll comment out that error.
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.
These are all only found on linux. Wondering if ldc has the same issue.
The libsodium magically works on windows because demios bundles the windows libraries. For strange reason unknown, it isn't bundled for linux.
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.
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
Copy the .so files and .a into the root of your project. I'm testing this again to see if this works.
@pedroalvesbatista does "dub test" work for you now?
Building the project still works, but dub test fails to libsodium.so.23. Is that normal because we've switched to dddb ?
@pedroalvesbatista can you print out the contents of the LD_LIBRARY_PATH and post here?
Please post the error too.
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