Compile sdhash 4.0 on Ubuntu 18.04 LTS and post instructions including how to build+install completely
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

sdhash 4.0 is located here: https://github.com/sdhash/sdhash

It has older Ubuntu 12.04 compile/installation instructions which are no longer valid. sdhash-gpu is out of scope unless you feel ambitious.

Determine which dependencies are required to fully install sdhash on a stock Ubuntu 18.04 LTS box, successfully compile, ensure that it executes normally. Afterwards post the following deliverables here:

apt-get install or similar commands to install any dependencies,
any commands required to build,
any commands required to install,
any commands required to run,
Ubuntu 18.04 LTS compatible binary executable.

Tips will be paid for fast, clear, work-the-first-time solutions.

Crowdsource coding tasks.

1 Solution

Winning solution

Solution

Hi @KMbountify. I've successfully compiled your program - sdhash.

Here is the proof from my terminal: https://ibb.co/yQfLQ05

Compiled sdhash binary can be found here: https://filebin.net/k9yw9uzr9urcdytb

Steps

Install dependencies

sudo apt install libssl-dev libevent-pthreads-2.1-6 libomp-dev g++

Head over to https://github.com/protocolbuffers/protobuf/releases/tag/v2.5.0 and download protobuf-2.5.0.zip file. Extract the file and enter the folder - protobuf-2.5.0**

Install protobuf's dependencies:

sudo apt-get install autoconf automake libtool curl make g++ unzip

Once these have been installed, you can install protobuf.

  1. Make sure that you are still in the protobuf folder
  2. ./configure
  3. make
  4. sudo make install
  5. sudo ldconfig

Excellent! Now you have protobuf set up and you are ready to install sdhash.

  1. Exit the protobuf-2.5.0 folder cd ../
  2. Clone sdhash repo: `git clone https://github.com/sdhash/sdhash.git
  3. Enter sdhash folder: cd sdhash
  4. Compile: make
  5. Install: make install

That's it. Now, you can use sdhash!

Thank you,
Vladimir

Hello Vladimir! Thank you for taking this on. The apt-get installs are fine. The build/install of protobuf seems to be successful -- a ton of warnings, but no hard errors. The error happens on step 4 of your sdhash compile...the 'make.' It's a series of undefined reference errors from blooms.pb.cc to google::protobuf:: like so blooms.pb.cc:(.text+0x77): undefined reference to `google::protobuf::internal::kEmptyString[abi:cxx11]' I'm seeing the same error on two different boxes: a well-established Ubuntu 18.04.4 box, and a brand new digital ocean droplet running 18.04.3. Error log can be found here: https://pastebin.com/eNc2KUKZ Happy to provide other details if necessary. Thanks again.
KMbountify 1 month ago
Hey, I think I've found the fix. The version of libprotobuf-dev that's installed via "apt-get install" is somehow conflicting with the 2.5.0 version that we're building. The presence of it is causing a problem. "apt-get remove libprotobuf-dev" and then rebuilding/installing protobuf seems to do the trick. I got the idea from here: https://github.com/OP-TEE/optee_os/issues/2960 I'm going to create a new droplet in the morning, try again, and then award the solution. Thanks
KMbountify 1 month ago
Hi @KMbountify. Thank you for your review. As you suggested, I've removed libprotobuf-dev and compiled protobuf 2.5.0 successfully as well as sdhash. On my machine there wasn't conflict between the 2 different protobuf libraries, but, it's Linux so everything is possible. Let me know if this worked for you. Thanks.
VladimirMikulic 1 month ago
After my testing with excluding libprotobuf-dev from the dependency install, I was seeing an "sdhash: error while loading shared libraries: libprotobuf.so.8: cannot open shared object file: No such file or directory" on the protobuf library. I executed an "ldconfig", and that seemed to fix it, which also survived a reboot. Can you edit your solution above to remove the apt-install of libprotobuf-dev, and add a final "ldconfig" step? Just so it's all in one place. Thanks
KMbountify 1 month ago
Hi! Sorry about ldconfig step. I've executed it on my machine but didn't think that it was necessary to mention since I first installed latest protobuf version and then, after realising that it is not compatible, I've installed protobuf-2.5.0.. I've updated the solution accordingly. Thank you.
VladimirMikulic 1 month ago