-
Notifications
You must be signed in to change notification settings - Fork 37.8k
[Docs] Create NetBSD build instructions and fix compilation #12294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added "db4_cxx" as this is the name used in NetBSD for the Berkeley DB library. Without this additional base filename alternative, the "configure" script will fail to find this library and compilation will not succeed.
@fanquake Thank you for your help with this. I appreciate it. |
Thanks @fanquake :) |
doc/build-netbsd.md
Outdated
With wallet: | ||
``` | ||
./autogen.sh | ||
./configure CPPFLAGS="-I/usr/pkg/include -DOS_NETBSD" LDFLAGS="-L/usr/pkg/lib" BOOST_CPPFLAGS="-I/usr/pkg/include" BOOST_LDFLAGS="-L/usr/pkg/lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add this: #12125 (comment)
Then -DOS_NETBSD shouldn't be needed, which I suspect is enough to fix the upstream package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theuni As I recall, the -DOS_NETBSD flag is needed because the Makefiles and various other scripts seem to have problems detecting the OS reliably, and sometimes the issue is with case-sensitivity. The inclusion of this flag results in a successful build/compile, but if it's possible to update the needed files to eliminate this then I think that would be excellent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's needed for leveldb. We detect it for other OSs, there's no need to tream netbsd differently in this regard.
doc/build-netbsd.md
Outdated
With wallet: | ||
``` | ||
./autogen.sh | ||
./configure CPPFLAGS="-I/usr/pkg/include -DOS_NETBSD" LDFLAGS="-L/usr/pkg/lib" BOOST_CPPFLAGS="-I/usr/pkg/include" BOOST_LDFLAGS="-L/usr/pkg/lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the BOOST_CPPFLAGS really needed in addition to CPPFLAGS ? If so, that'd be a bug imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theuni Unfortunately, these flags are needed, I suspect due to the way Boost is installed on NetBSD via the "pkgin" system (as I understand it, the Boost project has a few peculiarities that add complexity). Without these flags, the Bitcoin software won't build/compile successfully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please paste the error when trying to build without BOOST_CPPFLAGS / BOOST_LDFLAGS set?
It sounds like some of the checks are clobbering the usual flags. If that's the case, I'd rather fix it than work around it.
4506e42
to
11c5827
Compare
@theuni Added the leveldb target to configure.ac, and dropped |
@fanquake I would like to test your changes on my system, but the various instructions I found for merging in an open pull request are all failing for me. What "git" command should I use after/with/instead-of "git clone?" Thanks. |
@randolf Try using the github-merge.py script. You can pass it the PR number, |
@fanquake That looks like it could be useful, but I couldn't get it working (error text indicates that I need to run "git config githubmerge.repository <owner>/<repo>" and the few things I guessed at did not work), so due to limited time I simply downloaded the two modified files (plus the new document) and merged them manually. I'll post results here after attempting to run with the instructions that include your updates. |
@fanquake The build/compile process was successful on NetBSD 7.0 (amd64). This is what I did: I cloned bitcoin/bitcoin, then I manually downloaded the three files from this Pull Request and merged them in manually. After that, I followed the build/compile instructions in doc/build-netbsd.md (which came from this Pull Request). The end result was that bitcoind and various other binaries had been created, as expected, without the process ending abnormally, and so I consider this to be a successful build/compile. Thank you for your help. |
…tion 11c5827 [build] Add NETBSD leveldb target to configure.ac (fanquake) 1944fa3 [doc] Create build-netbsd.md (Randolf Richardson) 336685e [build] Add db4_cxx to bitcoin_find_bdb48.m4 (Randolf Richardson) Pull request description: Replaces #12125. Tree-SHA512: 411d082ffff7198bcc1b2b6fcdf86c378baf228d8f4fee0e6c9f0688efe9c6b6dcfd5c1ab9c1dfd0c4637723b8584dbbb614634ace0e1a417b59e88a6c736dc0
ee5e896 Organise Linux build instructions to be categorised by distro (Alex Vear) 4c85517 Add NetBSD build instruction links (Alex Vear) Pull request description: * Added references to the newly created [`doc/build-netbsd.md`] (#12294) instructions in the [`doc/README.md`] and the [`doc/build-unix.md`] files. * Organise [`doc/build-unix.md`] dependency build instructions by Linux distribution. This will help discoverability of dependency build instructions for specific distros. Future instructions will also be able to be added easier. I am not quite sure about the FreeBSD instructions being in the [`doc/build-unix.md`], while both the OpenBSD and NetBSD instructions are contained within separate files ([`doc/build-openbsd.md`] and [`doc/build-netbsd.md`] respectively). Feedback is greatly appreciated. 😄 [`doc/build-netbsd.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-netbsd.md [`doc/build-unix.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md [`doc/build-openbsd.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-openbsd.md [`doc/README.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/README.md Tree-SHA512: ebe2604d1802795851bbfce2335f159b53ea696bc9afb309be7825c697b992cc3963270fe945ca3e449b18522046e227fde3fae1b9c01bd49c3a7a513b5bd40c
Prepare for LevelDB 1.22 update Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#7944 - bitcoin/bitcoin#8604 - Only the first commit (we removed the upstream build documentation). - bitcoin/bitcoin#12294 - Only the third commit. - bitcoin/bitcoin#13659 - bitcoin/bitcoin#16110
…compilation 11c5827 [build] Add NETBSD leveldb target to configure.ac (fanquake) 1944fa3 [doc] Create build-netbsd.md (Randolf Richardson) 336685e [build] Add db4_cxx to bitcoin_find_bdb48.m4 (Randolf Richardson) Pull request description: Replaces bitcoin#12125. Tree-SHA512: 411d082ffff7198bcc1b2b6fcdf86c378baf228d8f4fee0e6c9f0688efe9c6b6dcfd5c1ab9c1dfd0c4637723b8584dbbb614634ace0e1a417b59e88a6c736dc0
ee5e896 Organise Linux build instructions to be categorised by distro (Alex Vear) 4c85517 Add NetBSD build instruction links (Alex Vear) Pull request description: * Added references to the newly created [`doc/build-netbsd.md`] (bitcoin#12294) instructions in the [`doc/README.md`] and the [`doc/build-unix.md`] files. * Organise [`doc/build-unix.md`] dependency build instructions by Linux distribution. This will help discoverability of dependency build instructions for specific distros. Future instructions will also be able to be added easier. I am not quite sure about the FreeBSD instructions being in the [`doc/build-unix.md`], while both the OpenBSD and NetBSD instructions are contained within separate files ([`doc/build-openbsd.md`] and [`doc/build-netbsd.md`] respectively). Feedback is greatly appreciated. 😄 [`doc/build-netbsd.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-netbsd.md [`doc/build-unix.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md [`doc/build-openbsd.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/build-openbsd.md [`doc/README.md`]:https://github.com/bitcoin/bitcoin/blob/master/doc/README.md Tree-SHA512: ebe2604d1802795851bbfce2335f159b53ea696bc9afb309be7825c697b992cc3963270fe945ca3e449b18522046e227fde3fae1b9c01bd49c3a7a513b5bd40c
Replaces #12125.