Skip to content

Conversation

fanquake
Copy link
Member

Replaces #12125.

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.
@randolf
Copy link
Contributor

randolf commented Jan 29, 2018

@fanquake Thank you for your help with this. I appreciate it.

@theuni
Copy link
Member

theuni commented Jan 29, 2018

Thanks @fanquake :)

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"
Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member

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.

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"
Copy link
Member

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.

Copy link
Contributor

@randolf randolf Jan 29, 2018

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.

Copy link
Member

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.

@fanquake
Copy link
Member Author

@theuni Added the leveldb target to configure.ac, and dropped -DOS_NETBSD from the install instructions.

@randolf
Copy link
Contributor

randolf commented Jan 30, 2018

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

@fanquake
Copy link
Member Author

fanquake commented Jan 30, 2018

@randolf Try using the github-merge.py script. You can pass it the PR number, 12294 in this case, and it will merge the changes for you.

@randolf
Copy link
Contributor

randolf commented Jan 30, 2018

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

@randolf
Copy link
Contributor

randolf commented Jan 30, 2018

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

@laanwj
Copy link
Member

laanwj commented Jan 30, 2018

utACK 11c5827, thanks for porting this @fanquake and for testing @randolf

@laanwj laanwj merged commit 11c5827 into bitcoin:master Jan 30, 2018
laanwj added a commit that referenced this pull request Jan 30, 2018
…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
@randolf
Copy link
Contributor

randolf commented Jan 30, 2018

@laanwj I appreciate the help from @fanquake to get my original PR "squashed" because I'm still learning how to use this GitHub system. I'm delighted to have had this chance to contribute to Bitcoin, and I'm interested in contributing more in the future.

@fanquake fanquake deleted the netbsd-build-docs branch January 31, 2018 01:41
laanwj added a commit that referenced this pull request Jan 31, 2018
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
zkbot added a commit to zcash/zcash that referenced this pull request Jan 25, 2021
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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 26, 2021
…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
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 26, 2021
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants