navcoin / navcoin-core

bitcoin-core 0.13 fork ported for NavCoin
MIT License
123 stars 92 forks source link

Unable to build from master on Ubuntu 18.04 #940

Closed skironDotNet closed 4 months ago

skironDotNet commented 2 years ago

used your script to build navcoin on Ubuntu 18.04 All runs ok... well had to add 1 lib by hand https://github.com/navcoin/navcoin-dev-tools/issues/6

install unbound ok

autogen, configure all ok, but fails on make

  cd navcoin-core
  git checkout master
  cd depends
  make
  cd ..
  ./autogen.sh
  ./configure --enable-debug --enable-tests --prefix=`pwd`/depends/`uname -m`-pc-linux-gnu 
  make -j$(nproc)

image

Any idea? Should I build from release tag? or something is broken? Can your test your script with fresh Ubuntu VM? https://github.com/navcoin/navcoin-dev-tools/blob/master/ubuntu-18.04-navcoin-core-dev-setup.sh

skironDotNet commented 2 years ago

Same error when build from Tag 7.0.1 which is your release code. How to build?

aguycalled commented 2 years ago

https://doc.nav.community/get.html

mxaddict commented 2 years ago

I think you need to run this: sudo apt -y install build-essential libtool autotools-dev automake pkg-config git cmake libattr1-dev python3-dev

skironDotNet commented 2 years ago

@mxaddict I have all those libs installed, it's not about that.

I'll ping you back once I test the guide from @aguycalled

skironDotNet commented 2 years ago

@aguycalled your guide helped. The key part for Ubuntu 18 is image

This note could be presented as warning, because without it can't really build. Also would be good idea to update in git documentation with that. And maybe the script https://github.com/navcoin/navcoin-dev-tools/blob/master/ubuntu-18.04-navcoin-core-dev-setup.sh

Should update CMAKE automatically on 18?

aguycalled commented 2 years ago

would you like to take this task and update https://github.com/navcoin/navcoin-dev-tools? @mxaddict

skironDotNet commented 2 years ago

Seems like I spoke too early... So it was building and building but ended same way as start with older CMAKE

image

Are you sure there are no errors in Makefile? but then it makes no sense because you wouldn't be able to make either. I could try Ubuntu 20... but before I do I'll make one more build form 0, because here already used depends from older CMAKE

aguycalled commented 2 years ago

I see no error in the screenshot. you should have the binaries in src/navcoin-cli and src/qt/navcoin-qt

mxaddict commented 2 years ago

This looks like the build worked fine.

try running the gui wallet with ./src/qt/navcoin-qt -devnet

mxaddict commented 2 years ago

@aguycalled @skironDotNet could you test this PR and see if it's working as I expected: https://github.com/navcoin/navcoin-dev-tools/pull/7

mxaddict commented 2 years ago

This PR changes the build script to work with both 18.04 and 20.04

skironDotNet commented 2 years ago

Ok, sorry, I thought this is an error https://github.com/navcoin/navcoin-core/issues/940#issuecomment-1063354190 didn't check the src/qt folder. The QT client got build.

Thank you for your support, and sorry for unnecessary confusion.

skironDotNet commented 2 years ago

@mxaddict regarding https://github.com/navcoin/navcoin-dev-tools/pull/7 I don't enable debug and disable tests to make build faster for me. Tests are good for you to test after new changes I'm assuming

My core part of build script is this (after having all needed libs installed and pulled git repo)

cd depends
sudo make -j$(nproc)
cd ..
sudo ./autogen.sh
sudo ./configure --disable-tests --prefix=`pwd`/depends/`uname -m`-pc-linux-gnu 
sudo make -j$(nproc)

So needed updated CMAKE version on 18.04 as I mentioned here https://github.com/navcoin/navcoin-core/issues/940#issuecomment-1063293977 and needed exec all core commands as sudo

Also to minimize binary size at the end I call

strip navcoind
strip navcoin-qt

and so on

mxaddict commented 2 years ago

You should not need sudo unless the files in the repo are not owned by the current user running the commands

mxaddict commented 2 years ago

I've updated the script in dev-tools repo to use newer cmake. https://github.com/navcoin/navcoin-dev-tools/pull/7

If you have a fresh ubuntu 18.04 vm, maybe give it a try.

stenolog commented 4 months ago

@aguycalled, looks closable

skironDotNet commented 4 months ago

Nobody uses 18.04 anymore, just close it

stenolog commented 4 months ago

@skironDotNet , you (as the author) should be able to close the issue

skironDotNet commented 4 months ago

somehow there were no option to close from github mobile app