All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] zstd: fix host headers installation
@ 2018-05-08 18:26 Baruch Siach
  2018-05-08 18:26 ` [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4 Baruch Siach
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Baruch Siach @ 2018-05-08 18:26 UTC (permalink / raw)
  To: buildroot

If host-zstd builds when $(HOST_DIR)/include has not been created yet,
the install-includes target does not create this directory. Instead, the
install command copies the headers over $(HOST_DIR)/include, thus
creating a regular file instead of a directory. This leads to the
following installation failure:

Installing includes
install: cannot create directory ?.../host/usr/include/?: File exists
Makefile:166: recipe for target 'install-pc' failed
make[1]: *** [install-pc] Error 1

Add a patch to fix that.

Cc: Peter Seiderer <ps.report@gmx.net>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 ...ate-include-directory-before-headers.patch | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch

diff --git a/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch b/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
new file mode 100644
index 000000000000..e95f8c0be48c
--- /dev/null
+++ b/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
@@ -0,0 +1,45 @@
+From 9a0643b633c00e86db059e3790bdea7155fb6dc9 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 8 May 2018 20:43:28 +0300
+Subject: [PATCH] lib/Makefile: create include directory before headers
+ installation
+
+Make sure that $(INCLUDEDIR) exists before copying the headers there.
+Otherwise, the contest of header files is copied over
+$(DESTDIR)$(INCLUDEDIR), making it a regular file.
+
+While at it, remove $(DESTDIR)$(INCLUDEDIR) from the list of directories
+to create in the install-pc target. The install-pc target does not need
+this directory.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: https://github.com/facebook/zstd/pull/1123
+
+ lib/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index f64f192d4724..d8178c7a58a0 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -163,7 +163,7 @@ install: install-pc install-static install-shared install-includes
+ 	@echo zstd static and shared library installed
+ 
+ install-pc: libzstd.pc
+-	@$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/
++	@$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
+ 	@$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
+ 
+ install-static: libzstd.a
+@@ -178,6 +178,7 @@ install-shared: libzstd
+ 
+ install-includes:
+ 	@echo Installing includes
++	@$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/
+ 	@$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
+ 	@$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
+ 	@$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR)     # prototypes generate deprecation warnings
+-- 
+2.17.0
+
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4
  2018-05-08 18:26 [Buildroot] [PATCH 1/2] zstd: fix host headers installation Baruch Siach
@ 2018-05-08 18:26 ` Baruch Siach
  2018-05-08 21:43   ` Peter Seiderer
  2018-05-13 21:01   ` Thomas Petazzoni
  2018-05-08 21:42 ` [Buildroot] [PATCH 1/2] zstd: fix host headers installation Peter Seiderer
  2018-05-13 20:37 ` Yann E. MORIN
  2 siblings, 2 replies; 6+ messages in thread
From: Baruch Siach @ 2018-05-08 18:26 UTC (permalink / raw)
  To: buildroot

Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/zstd/zstd.hash | 2 +-
 package/zstd/zstd.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/zstd/zstd.hash b/package/zstd/zstd.hash
index 51e5fc245ca3..f7aadfb5db75 100644
--- a/package/zstd/zstd.hash
+++ b/package/zstd/zstd.hash
@@ -1,5 +1,5 @@
 # Locally computed
-sha256 a77c47153ee7de02626c5b2a097005786b71688be61e9fb81806a011f90b297b zstd-v1.3.3.tar.gz
+sha256 92e41b6e8dd26bbd46248e8aa1d86f1551bc221a796277ae9362954f26d605a9 zstd-v1.3.4.tar.gz
 
 # License files (locally computed as well)
 sha256 2c1a7fa704df8f3a606f6fc010b8b5aaebf403f3aeec339a12048f1ba7331a0b LICENSE
diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
index c74c8f24b63f..4915cee07d50 100644
--- a/package/zstd/zstd.mk
+++ b/package/zstd/zstd.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-ZSTD_VERSION = v1.3.3
+ZSTD_VERSION = v1.3.4
 ZSTD_SITE = $(call github,facebook,zstd,$(ZSTD_VERSION))
 ZSTD_INSTALL_STAGING = YES
 ZSTD_LICENSE = BSD-3-Clause or GPL-2.0
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] zstd: fix host headers installation
  2018-05-08 18:26 [Buildroot] [PATCH 1/2] zstd: fix host headers installation Baruch Siach
  2018-05-08 18:26 ` [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4 Baruch Siach
@ 2018-05-08 21:42 ` Peter Seiderer
  2018-05-13 20:37 ` Yann E. MORIN
  2 siblings, 0 replies; 6+ messages in thread
From: Peter Seiderer @ 2018-05-08 21:42 UTC (permalink / raw)
  To: buildroot

Hello Baruch,

On Tue,  8 May 2018 21:26:16 +0300, Baruch Siach <baruch@tkos.co.il> wrote:

> If host-zstd builds when $(HOST_DIR)/include has not been created yet,
> the install-includes target does not create this directory. Instead, the
> install command copies the headers over $(HOST_DIR)/include, thus
> creating a regular file instead of a directory. This leads to the
> following installation failure:
> 
> Installing includes
> install: cannot create directory ?.../host/usr/include/?: File exists
> Makefile:166: recipe for target 'install-pc' failed
> make[1]: *** [install-pc] Error 1
> 
> Add a patch to fix that.
> 
> Cc: Peter Seiderer <ps.report@gmx.net>
> Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  ...ate-include-directory-before-headers.patch | 45 +++++++++++++++++++
>  1 file changed, 45 insertions(+)run_test_pkg_libtsm.sh
>  create mode 100644 package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
> 
> diff --git a/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch b/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
> new file mode 100644
> index 000000000000..e95f8c0be48c
> --- /dev/null
> +++ b/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
> @@ -0,0 +1,45 @@
> +From 9a0643b633c00e86db059e3790bdea7155fb6dc9 Mon Sep 17 00:00:00 2001
> +From: Baruch Siach <baruch@tkos.co.il>
> +Date: Tue, 8 May 2018 20:43:28 +0300
> +Subject: [PATCH] lib/Makefile: create include directory before headers
> + installation
> +
> +Make sure that $(INCLUDEDIR) exists before copying the headers there.
> +Otherwise, the contest of header files is copied over
> +$(DESTDIR)$(INCLUDEDIR), making it a regular file.
> +
> +While at it, remove $(DESTDIR)$(INCLUDEDIR) from the list of directories
> +to create in the install-pc target. The install-pc target does not need
> +this directory.
> +
> +Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> +---
> +Upstream status: https://github.com/facebook/zstd/pull/1123
> +run_test_pkg_libtsm.sh
> + lib/Makefile | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/lib/Makefile b/lib/Makefile
> +index f64f192d4724..d8178c7a58a0 100644
> +--- a/lib/Makefile
> ++++ b/lib/Makefile
> +@@ -163,7 +163,7 @@ install: install-pc install-static install-shared install-includes
> + 	@echo zstd static and shared library installed
> + 
> + install-pc: libzstd.pc
> +-	@$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/
> ++	@$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
> + 	@$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
> + 
> + install-static: libzstd.a
> +@@ -178,6 +178,7 @@ install-shared: libzstd
> + 
> + install-includes:
> + 	@echo Installing includes
> ++	@$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/
> + 	@$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
> + 	@$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
> + 	@$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR)     # prototypes generate deprecation warnings
> +-- 
> +2.17.0
> +

Thanks for catching this (a follow up patch or a v2 version doing the same for the
libs as suggested on the upstream pull request would be nice), neverless:

Reviewed-by: Peter Seiderer <ps.report@gmx.net>

Regards,
Peter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4
  2018-05-08 18:26 ` [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4 Baruch Siach
@ 2018-05-08 21:43   ` Peter Seiderer
  2018-05-13 21:01   ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Seiderer @ 2018-05-08 21:43 UTC (permalink / raw)
  To: buildroot

Hello Baruch,

On Tue,  8 May 2018 21:26:17 +0300, Baruch Siach <baruch@tkos.co.il> wrote:

> Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  package/zstd/zstd.hash | 2 +-
>  package/zstd/zstd.mk   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/zstd/zstd.hash b/package/zstd/zstd.hash
> index 51e5fc245ca3..f7aadfb5db75 100644
> --- a/package/zstd/zstd.hash
> +++ b/package/zstd/zstd.hash
> @@ -1,5 +1,5 @@
>  # Locally computed
> -sha256 a77c47153ee7de02626c5b2a097005786b71688be61e9fb81806a011f90b297b zstd-v1.3.3.tar.gz
> +sha256 92e41b6e8dd26bbd46248e8aa1d86f1551bc221a796277ae9362954f26d605a9 zstd-v1.3.4.tar.gz
>  
>  # License files (locally computed as well)
>  sha256 2c1a7fa704df8f3a606f6fc010b8b5aaebf403f3aeec339a12048f1ba7331a0b LICENSE
> diff --git a/package/zstd/zstd.mk b/package/zstd/zstd.mk
> index c74c8f24b63f..4915cee07d50 100644
> --- a/package/zstd/zstd.mk
> +++ b/package/zstd/zstd.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>  
> -ZSTD_VERSION = v1.3.3
> +ZSTD_VERSION = v1.3.4
>  ZSTD_SITE = $(call github,facebook,zstd,$(ZSTD_VERSION))
>  ZSTD_INSTALL_STAGING = YES
>  ZSTD_LICENSE = BSD-3-Clause or GPL-2.0

Reviewed-by: Peter Seiderer <ps.report@gmx.net>

Regards,
Peter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/2] zstd: fix host headers installation
  2018-05-08 18:26 [Buildroot] [PATCH 1/2] zstd: fix host headers installation Baruch Siach
  2018-05-08 18:26 ` [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4 Baruch Siach
  2018-05-08 21:42 ` [Buildroot] [PATCH 1/2] zstd: fix host headers installation Peter Seiderer
@ 2018-05-13 20:37 ` Yann E. MORIN
  2 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2018-05-13 20:37 UTC (permalink / raw)
  To: buildroot

Baruch, All,

On 2018-05-08 21:26 +0300, Baruch Siach spake thusly:
> If host-zstd builds when $(HOST_DIR)/include has not been created yet,
> the install-includes target does not create this directory. Instead, the
> install command copies the headers over $(HOST_DIR)/include, thus
> creating a regular file instead of a directory. This leads to the
> following installation failure:
> 
> Installing includes
> install: cannot create directory ?.../host/usr/include/?: File exists
> Makefile:166: recipe for target 'install-pc' failed
> make[1]: *** [install-pc] Error 1
> 
> Add a patch to fix that.

I'm OK that we fix zstd and send them the patch.

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

However, for the target/staging skeleton, we explcitly create the
include directory:
    https://git.buildroot.org/buildroot/tree/package/skeleton-init-common/skeleton-init-common.mk#n34

Why don't we do the same for the host skeleton too?

Regards,
Yann E. MORIN.

> Cc: Peter Seiderer <ps.report@gmx.net>
> Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  ...ate-include-directory-before-headers.patch | 45 +++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
> 
> diff --git a/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch b/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
> new file mode 100644
> index 000000000000..e95f8c0be48c
> --- /dev/null
> +++ b/package/zstd/0002-lib-Makefile-create-include-directory-before-headers.patch
> @@ -0,0 +1,45 @@
> +From 9a0643b633c00e86db059e3790bdea7155fb6dc9 Mon Sep 17 00:00:00 2001
> +From: Baruch Siach <baruch@tkos.co.il>
> +Date: Tue, 8 May 2018 20:43:28 +0300
> +Subject: [PATCH] lib/Makefile: create include directory before headers
> + installation
> +
> +Make sure that $(INCLUDEDIR) exists before copying the headers there.
> +Otherwise, the contest of header files is copied over
> +$(DESTDIR)$(INCLUDEDIR), making it a regular file.
> +
> +While at it, remove $(DESTDIR)$(INCLUDEDIR) from the list of directories
> +to create in the install-pc target. The install-pc target does not need
> +this directory.
> +
> +Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> +---
> +Upstream status: https://github.com/facebook/zstd/pull/1123
> +
> + lib/Makefile | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/lib/Makefile b/lib/Makefile
> +index f64f192d4724..d8178c7a58a0 100644
> +--- a/lib/Makefile
> ++++ b/lib/Makefile
> +@@ -163,7 +163,7 @@ install: install-pc install-static install-shared install-includes
> + 	@echo zstd static and shared library installed
> + 
> + install-pc: libzstd.pc
> +-	@$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ $(DESTDIR)$(INCLUDEDIR)/
> ++	@$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
> + 	@$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
> + 
> + install-static: libzstd.a
> +@@ -178,6 +178,7 @@ install-shared: libzstd
> + 
> + install-includes:
> + 	@echo Installing includes
> ++	@$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/
> + 	@$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
> + 	@$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
> + 	@$(INSTALL_DATA) deprecated/zbuff.h $(DESTDIR)$(INCLUDEDIR)     # prototypes generate deprecation warnings
> +-- 
> +2.17.0
> +
> -- 
> 2.17.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4
  2018-05-08 18:26 ` [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4 Baruch Siach
  2018-05-08 21:43   ` Peter Seiderer
@ 2018-05-13 21:01   ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-05-13 21:01 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue,  8 May 2018 21:26:17 +0300, Baruch Siach wrote:
> Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  package/zstd/zstd.hash | 2 +-
>  package/zstd/zstd.mk   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-05-13 21:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08 18:26 [Buildroot] [PATCH 1/2] zstd: fix host headers installation Baruch Siach
2018-05-08 18:26 ` [Buildroot] [PATCH 2/2] zstd: bump to version 1.3.4 Baruch Siach
2018-05-08 21:43   ` Peter Seiderer
2018-05-13 21:01   ` Thomas Petazzoni
2018-05-08 21:42 ` [Buildroot] [PATCH 1/2] zstd: fix host headers installation Peter Seiderer
2018-05-13 20:37 ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.