0

I am forced to install Ubuntu in order to install https://github.com/znort987/blockparser

However, when running make I am encountering this:

lnk -- parser
/usr/bin/ld: cannot find -lcrypto
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/i686-linux-gnu/4.6/libstdc++.a when 
searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** [parser] Error 1

I did one or two laps around the internet and the typical suggestion is to apt-get install libssl-dev, but I have already done this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libssl-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

I am running 12.04.3 (precise).

When I try to compile it with g++, as suggested (for example) by https://stackoverflow.com/questions/5329638/usr-bin-ld-cannot-find I get other errors:

parser.cpp:2:18: fatal error: util.h: No such file or directory

(util.h is there in the folder)

So I'm hoping that the make error is easier to solve than the compile errors.

Thank you guys for your help so far (was having issues with the GRUB loader last night; you guys did help with that), but I could use some more help. I am still new to Ubuntu I guess.

  • The GitHub page for this project says "You need an x86-84 ubuntu box and a recent version of GCC(>=4.4), recent versions of boost and openssl-dev. The whole thing is very unlikely to work or even compile on anything else." [I presume x86-84 is a typo for x86-64] - you appear to be trying to build on a 32-bit platform. FYI I tried to build it on x86-64 and that didn't work either (with g++-4.4 it failed with a parse error in cb/dumpTX.cpp, and with g++-4.6 it crashed the compiler!) – steeldriver Dec 29 '13 at 15:43
  • Hm, you are right.... I just assumed I was running 64 bit because the windows on the same machine is 64 bit buzzer sound indicating incorrectness ... More in a few – user426364 Dec 29 '13 at 16:40
  • Steeldriver... you were right. I wasn't able to install 64 bit over 32 bit, so I put it on another machine -- worked out of the box on 64 bit. Resubmit your comment as an answer and it will be accepted. Thx again. – user426364 Dec 29 '13 at 20:47
0

/usr/bin/ld is provided by the package binutils

So try after installing this:

sudo apt-get install binutils libc6 libgcc1 libstdc++6 zlib1g gcc-4.6-base multiarch-support
  • It couldn't find libc6-udeb, but seemed to find libc6, but no updates were made: 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. – user426364 Dec 29 '13 at 15:08
  • Sorry. remove it and add libc6. It was the one in the repository. I made a mistake. – user224082 Dec 29 '13 at 15:13
  • Yes, I did... no updates were made tho' ... I'm looking presently at: stackoverflow.com/questions/5329638/usr-bin-ld-cannot-find – user426364 Dec 29 '13 at 15:14
  • Can you look at the make file at github.com/znort987/blockparser/blob/master/Makefile ? I changed the make file to -lcrypt instead of -lcrypto ... Did I do right? – user426364 Dec 29 '13 at 15:41
  • After sudo apt-get install g++-multilib: .objs/util.o: In function `addrToHash160(unsigned char*, unsigned char const*, bool, bool) [clone .constprop.50]': – user426364 Dec 29 '13 at 15:58
0

For what it's worth to OP (user426364), I've made a little bit of progress with:

  • Changing LIBS -lcrypto to -lcrypt (line 38)

  • sudo apt-get install libssl-dev build-essential g++-4.4 libboost-all-dev libsparsehash-dev git-core perl

  • sudo apt-get install libc6-dev-i386

  • sudo apt-get install gcc-multilib

  • sudo apt-get install libstdc++6-4.4-dev apt-get install libstdc++6-4.6-dev

  • sudo apt-get install binutils libc6 libgcc1 libstdc++6 zlib1g gcc-4.6-base multiarch-support

  • sudo apt-get install g++-multilib g++-4.4-multilib (4.2-multilib was mentioned elsewhere on Internet)

And got it all the way up to the point of problems with undefined references in encryption (addrToHash160, compressPublicKey, decompressPublicKey, addrToHash160, hash160ToAddr, showFullAddr, rmd160, sha256) which drop A LOT of error messages about undefined reference.

0

blockparser.py is provided by the python-markdown and python3-markdown packages in all currently supported versions of Ubuntu.

Can be installed with:

sudo apt-get install python-markdown python-pygments python-markdown-doc python-utidyliby
0

On modern Ubuntu 14.04 LTS and 16.04 LTS the following steps allow to compile and run blockparser:

sudo apt-get install git

git clone https://github.com/znort987/blockparser.git
cd blockparser
sudo apt-get install build-essential libsparsehash-dev libssl-dev libboost-dev
./make
./tst # to test it
./parser --help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.