Message ID | 1469394628-19412-1-git-send-email-christian@paral.in |
---|---|
State | Accepted |
Headers | show |
Hello, On Sun, 24 Jul 2016 14:10:27 -0700, Christian Stewart wrote: > diff --git a/package/btrfs-progs/btrfs-progs.mk b/package/btrfs-progs/btrfs-progs.mk > index 2c3dc50..8d50eb4 100644 > --- a/package/btrfs-progs/btrfs-progs.mk > +++ b/package/btrfs-progs/btrfs-progs.mk > @@ -11,6 +11,7 @@ BTRFS_PROGS_DEPENDENCIES = host-pkgconf e2fsprogs lzo util-linux zlib > BTRFS_PROGS_CONF_OPTS = --disable-backtrace > BTRFS_PROGS_LICENSE = GPLv2 > BTRFS_PROGS_LICENSE_FILES = COPYING > +BTRFS_PROGS_INSTALL_STAGING = YES > > # Doesn't autodetect static-only and tries to build both > ifeq ($(BR2_STATIC_LIBS),y) Unfortunately, this breaks the build in a BR2_STATIC_LIBS=y configuration. So I've tried adding: BTRFS_PROGS_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-static in the existing ifeq ($(BR2_STATIC_LIBS),y). It fixes the build but it isn't correct: it only installs the programs, and not the headers and the static library. So it seems like a btrfs-progs patch is needed to make this whole thing work properly :-/ Thomas
Thomas, On Sun, Jul 24, 2016 at 2:48 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > So it seems like a btrfs-progs patch is needed to make this whole thing > work properly :-/ A few short term solutions are: - Remove btrfs support from docker-engine temporarily until a fix is made to btrfs-progs - Source the headers from $(TARGET_DIR) as before temporarily, resorting to bad practice - Copy the headers from $(TARGET_DIR) to $(STAGING_DIR) in a post-build hook of btrfs-progs. Would any of these options be acceptable to you? Thanks! Christian
Hello, On Sun, 24 Jul 2016 16:35:06 -0700, Christian Stewart wrote: > - Remove btrfs support from docker-engine temporarily until a fix is > made to btrfs-progs > - Source the headers from $(TARGET_DIR) as before temporarily, > resorting to bad practice > - Copy the headers from $(TARGET_DIR) to $(STAGING_DIR) in a > post-build hook of btrfs-progs. > > Would any of these options be acceptable to you? Not really no. The good solution is: - Patch the btrfs-progs Makefile to support installing the headers and static library Best regards, Thomas
Hello, On Sun, 24 Jul 2016 14:10:27 -0700, Christian Stewart wrote: > Other packages when building against btrfs-progs require headers in the > staging directory under /usr/include/btrfs. This patch enables > installing btrfs-progs to the staging directory to enable other packages > to build against the btrfs-progs headers. > > Signed-off-by: Christian Stewart <christian@paral.in> > --- > package/btrfs-progs/btrfs-progs.mk | 1 + > 1 file changed, 1 insertion(+) I've applied after fixing the BR2_STATIC_LIBS=y case, by: 1/ Adding a BTRFS_PROGS_INSTALL_STAGING_OPTS variable 2/ Adding a patch that installs the static lib and the headers during "make install-static". Thomas
diff --git a/package/btrfs-progs/btrfs-progs.mk b/package/btrfs-progs/btrfs-progs.mk index 2c3dc50..8d50eb4 100644 --- a/package/btrfs-progs/btrfs-progs.mk +++ b/package/btrfs-progs/btrfs-progs.mk @@ -11,6 +11,7 @@ BTRFS_PROGS_DEPENDENCIES = host-pkgconf e2fsprogs lzo util-linux zlib BTRFS_PROGS_CONF_OPTS = --disable-backtrace BTRFS_PROGS_LICENSE = GPLv2 BTRFS_PROGS_LICENSE_FILES = COPYING +BTRFS_PROGS_INSTALL_STAGING = YES # Doesn't autodetect static-only and tries to build both ifeq ($(BR2_STATIC_LIBS),y)
Other packages when building against btrfs-progs require headers in the staging directory under /usr/include/btrfs. This patch enables installing btrfs-progs to the staging directory to enable other packages to build against the btrfs-progs headers. Signed-off-by: Christian Stewart <christian@paral.in> --- package/btrfs-progs/btrfs-progs.mk | 1 + 1 file changed, 1 insertion(+)