navcoin-core icon indicating copy to clipboard operation
navcoin-core copied to clipboard

Unable to build from master on Ubuntu 18.04

Open skironDotNet opened this issue 3 years ago • 15 comments

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 avatar Mar 08 '22 20:03 skironDotNet

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

skironDotNet avatar Mar 08 '22 21:03 skironDotNet

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

aguycalled avatar Mar 08 '22 21:03 aguycalled

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

mxaddict avatar Mar 08 '22 21:03 mxaddict

@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 avatar Mar 09 '22 16:03 skironDotNet

@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?

skironDotNet avatar Mar 09 '22 19:03 skironDotNet

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

aguycalled avatar Mar 09 '22 19:03 aguycalled

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

skironDotNet avatar Mar 09 '22 20:03 skironDotNet

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

aguycalled avatar Mar 09 '22 20:03 aguycalled

This looks like the build worked fine.

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

mxaddict avatar Mar 09 '22 21:03 mxaddict

@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 avatar Mar 09 '22 21:03 mxaddict

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

mxaddict avatar Mar 09 '22 21:03 mxaddict

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 avatar Mar 10 '22 01:03 skironDotNet

@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

skironDotNet avatar Mar 10 '22 02:03 skironDotNet

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

mxaddict avatar Mar 10 '22 02:03 mxaddict

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.

mxaddict avatar Mar 10 '22 02:03 mxaddict

@aguycalled, looks closable

stenolog avatar May 04 '24 08:05 stenolog

Nobody uses 18.04 anymore, just close it

skironDotNet avatar May 05 '24 02:05 skironDotNet

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

stenolog avatar May 06 '24 08:05 stenolog

somehow there were no option to close from github mobile app

skironDotNet avatar May 06 '24 20:05 skironDotNet