projectpai / paicoin

Official repo of PAI Coin
https://projectpai.com
MIT License
63 stars 35 forks source link

No errors during the installation, but no build appeared. #204

Closed vladikus10 closed 5 years ago

vladikus10 commented 5 years ago

Describe the issue

I never built a blockchain from source so I might be missing something here. However I followed one of the comments from an another issue:

        cd depends
        make
        cd ..
        ./autogen.sh
        CONFIG_SITE=`pwd`/depends/`build-aux/config.guess`/share/config.site ./configure --with-gui=qt5
        make deploy

Everything went fine expect make deploy, I would receive : make: Nothing to be done for 'deploy', so instead I tried make and them make install. Everything went fine without any errors, but no build appeared in the project folder.

Expected behavior

I was expecting a build folder to appear, that would contain the daemon and the qt GUI version.

Actual behavior

Nothing appeared or I'm just missing something.

What version of paicoin-core are you using?

Cloned when the latest commit was: 860eca64ac7ccde79e0c1765ea33211abae6e7e2

Machine specs:

bambache commented 5 years ago

Hi @vladikus10 ,

It seems there is no deploy target in the Makefile, but make install should work.

It defaults to installing in the /usr/bin, but if you want to change it, just specify the new location using ./configure --prefix=/somewhere/else/than/usr/local

Also running make in the depends folder takes lots of time since it downloads and builds every dependency. You should be able to install those binaries directly from your Linux distro's repositories, here is the list for Ubuntu, names should be alike. Deepin seems to also have apt package manager.

#sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3
#sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
#sudo apt-get install software-properties-common
#sudo add-apt-repository ppa:bitcoin/bitcoin
#sudo apt-get update
#sudo apt-get install libdb4.8-dev libdb4.8++-dev
#sudo apt-get install libminiupnpc-dev
#sudo apt-get install libzmq3-dev
#sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
#sudo apt-get install libqrencode-dev

then in the paicoin dir

cd ~/paicoin
./autogen.sh
./configure --with-gui=yes --prefix=`pwd`/my_build/
make install

Hope this helps!

vladikus10 commented 5 years ago

Hi @bambache , thanks for the reply.

Ah I see, I think the package versions slightly mismatch, but the wait was not an issue.

So I tried to rebuild it and now I'm getting this error (I did had to disable the wallet, due to the db mismatch, but I don't need it, as I only want to broadcast a raw transaction):

make install
Making install in src
make[1]: Entering directory '/home/vlad/Wallets/paicoin/src'
make[2]: Entering directory '/home/vlad/Wallets/paicoin/src'
make[3]: Entering directory '/home/vlad/Wallets/paicoin'
make[3]: Leaving directory '/home/vlad/Wallets/paicoin'
make[3]: Entering directory '/home/vlad/Wallets/paicoin/src/secp256k1'
make[3]: Leaving directory '/home/vlad/Wallets/paicoin/src/secp256k1'
  CXXLD    paicoind
libpaicoin_util.a(libpaicoin_util_a-util.o): In function `CInit::~CInit()':
/home/vlad/Wallets/paicoin/src/util.cpp:145: undefined reference to `RAND_cleanup'
/home/vlad/Wallets/paicoin/src/util.cpp:147: undefined reference to `CRYPTO_set_locking_callback'
libpaicoin_util.a(libpaicoin_util_a-util.o): In function `CInit::CInit()':
/home/vlad/Wallets/paicoin/src/util.cpp:124: undefined reference to `CRYPTO_num_locks'
/home/vlad/Wallets/paicoin/src/util.cpp:125: undefined reference to `CRYPTO_set_locking_callback'
/home/vlad/Wallets/paicoin/src/util.cpp:132: undefined reference to `OPENSSL_no_config'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3676: paicoind] Error 1
make[2]: Leaving directory '/home/vlad/Wallets/paicoin/src'
make[1]: *** [Makefile:9408: install-recursive] Error 1
make[1]: Leaving directory '/home/vlad/Wallets/paicoin/src'
make: *** [Makefile:737: install-recursive] Error 1
ghost commented 5 years ago

Hi @vladikus10 ,

I am not sure if you're aware of this, for testing you can also add the incompatible bdb flag (during the configuration step): ./configure --with-incompatible-bdb

After this, you can also compile the wallet part.

bambache commented 5 years ago

Hi @vladikus10,

I am not able to reproduce your ld error. (I tried on the same code https://github.com/projectpai/paicoin/commit/860eca64ac7ccde79e0c1765ea33211abae6e7e2 )

It might be that some artifacts from previous tries are the cause for the error. You could try using clean:

cd ~/paicoin
make clean
make
make install
vladikus10 commented 5 years ago

@jupiterneptune I know, but like I said, I did not needed, so skipping was not an issue.

@bambache make clean helped!