Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/4] bitcoin: new package
Date: Sat, 3 Aug 2019 19:19:19 +0200	[thread overview]
Message-ID: <20190803191919.683531bf@windsurf.home> (raw)
In-Reply-To: <1538143163-20596-3-git-send-email-fabiorush@gmail.com>

Hello,

Thanks for your contribution! I have applied your patch, but after
making a significant number of changes. See below.

First, all new packages need an entry in DEVELOPERS file, so that the
original submitter (you!) can receive notifications about build issues
with this package.

On Fri, 28 Sep 2018 10:59:21 -0300
Fabio Urquiza <fabiorush@gmail.com> wrote:

> diff --git a/package/Config.in b/package/Config.in
> index 2810d04..796383a 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1971,6 +1971,10 @@ endif
>  	source "package/xtables-addons/Config.in"
>  	source "package/znc/Config.in"
>  
> +menu "Blockchain Applications"
> +	source "package/bitcoin/Config.in"
> +endmenu

Since we're for now only applying this package, having a new category
for blockchain applications was not really useful, so I moved it to
Miscellaneous applications.

> diff --git a/package/bitcoin/Config.in b/package/bitcoin/Config.in
> new file mode 100644
> index 0000000..cef0e73
> --- /dev/null
> +++ b/package/bitcoin/Config.in
> @@ -0,0 +1,26 @@
> +config BR2_PACKAGE_BITCOIN
> +	bool "bitcoin"
> +	select BR2_TOOLCHAIN_BUILDROOT_USE_SSP

You can't select this option, as it is only valid for internal
toolchain with the uClibc C library. The proper solution here was to
pass --disable-hardening, so that the bitcoin configure script doesn't
add any hardening-related CFLAGS. Buildroot has system-wide support for
hardening features, and if such features are enabled, it will pass the
appropriate CFLAGS.

> +	select BR2_INSTALL_LIBSTDCPP

You cannot select this, you can only depend on it, and it needs a
Config.in comment. See other packages.

Also, other dependencies were missing:

 - BR2_TOOLCHAIN_HAS_GCC_BUG_64735 due to the use of std::future

 - BR2_TOOLCHAIN_HAS_ATOMIC due to the use of std::atomic

 - A weird dependency was also needed because 8-byte atomics are not
   provided on ARM Cortex-M.

All these issues were found by using ./utils/testpkg on your package.

> +	select BR2_PACKAGE_BOOST
> +	select BR2_PACKAGE_BOOST_SYSTEM
> +	select BR2_PACKAGE_BOOST_FILESYSTEM
> +	select BR2_PACKAGE_BOOST_THREAD
> +	select BR2_PACKAGE_BOOST_CHRONO
> +	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
> +	select BR2_PACKAGE_OPENSSL
> +	select BR2_PACKAGE_LIBEVENT
> +	help
> +	  Bitcoin Core is an open source project which maintains and
> +	  releases Bitcoin client software called ?Bitcoin Core?.
> +
> +	  It is a direct descendant of the original Bitcoin software
> +	  client released by Satoshi Nakamoto after he published the
> +	  famous Bitcoin whitepaper.
> +
> +	  Bitcoin Core consists of both ?full-node? software for fully

We try to use only ASCII characters, and to cut the lines at 72
characters. This is something that "make check-package" tells you.

> +BITCOIN_VERSION = v0.16.3
> +BITCOIN_SITE = $(call github,bitcoin,bitcoin,$(BITCOIN_VERSION))
> +BITCOIN_AUTORECONF = YES
> +BITCOIN_LICENSE = MIT
> +BITCOIN_LICENSE_FILES = COPYING
> +BITCOIN_CONF_OPTS = --disable-wallet --disable-tests
> +BITCOIN_CONF_OPTS += --with-sysroot=$(STAGING_DIR)

The --with-sysroot option is not necessary.

> +BITCOIN_CONF_OPTS += --with-boost-libdir=$(STAGING_DIR)/usr/lib/

I grouped all those CONF_OPTS statements in just one statement.

See the final commit at:

  https://git.buildroot.org/buildroot/commit/?id=656fc50b51c03891d34471fd39003355678f7fde

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2019-08-03 17:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28 13:59 [Buildroot] [PATCH 0/4] Initial support to blockchain clients Fabio Urquiza
2018-09-28 13:59 ` [Buildroot] [PATCH 1/4] host-go-glide: new package Fabio Urquiza
2019-08-03 14:33   ` Yann E. MORIN
2018-09-28 13:59 ` [Buildroot] [PATCH 2/4] bitcoin: " Fabio Urquiza
2019-08-03 17:19   ` Thomas Petazzoni [this message]
2018-09-28 13:59 ` [Buildroot] [PATCH 3/4] btcd: " Fabio Urquiza
2018-10-12 16:09   ` Adam Duskett
2018-09-28 13:59 ` [Buildroot] [PATCH 4/4] neutrino: " Fabio Urquiza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190803191919.683531bf@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox