[v5,1/1] package/nodejs: Use zlib headers from HOST_ZLIB_SRCDIR for host-nodejs
diff mbox series

Message ID 20200218031521.32988-1-james.hilliard1@gmail.com
State New
Headers show
Series
  • [v5,1/1] package/nodejs: Use zlib headers from HOST_ZLIB_SRCDIR for host-nodejs
Related show

Commit Message

James Hilliard Feb. 18, 2020, 3:15 a.m. UTC
The nodejs configure.py file orders zlib headers before the bundled ICU
headers. The zlib headers happen to be located in the system include
directory, next to some system ICU headers (not bundled). If these are
built before nodejs is, nodejs will get confused and try to use the
system ICU headers instead of the bundled ones.

Fix this by using headers from HOST_ZLIB_SRCDIR so that the ICU headers
in the system include directory are not used.

Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v4 -> v5:
  - use headers from HOST_ZLIB_SRCDIR
  - use shared zlib instead of static zlib
---
 package/nodejs/nodejs.mk | 2 ++
 1 file changed, 2 insertions(+)

Comments

Eugen Hristev March 28, 2020, 2:04 p.m. UTC | #1
On 18.02.2020 05:15, James Hilliard wrote:

> The nodejs configure.py file orders zlib headers before the bundled ICU
> headers. The zlib headers happen to be located in the system include
> directory, next to some system ICU headers (not bundled). If these are
> built before nodejs is, nodejs will get confused and try to use the
> system ICU headers instead of the bundled ones.
> 
> Fix this by using headers from HOST_ZLIB_SRCDIR so that the ICU headers
> in the system include directory are not used.
> 
> Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---

Hello,

Just FYI , we had issues building our distro based on 2020.02 buildroot, 
but this patch fixes the host node-js build problem.

So thanks for fixing it,

Eugen
Johan Derycke March 31, 2020, 1:11 p.m. UTC | #2
Op di 18 feb. 2020 om 04:15 schreef James Hilliard <james.hilliard1@gmail.com>:
>
> The nodejs configure.py file orders zlib headers before the bundled ICU
> headers. The zlib headers happen to be located in the system include
> directory, next to some system ICU headers (not bundled). If these are
> built before nodejs is, nodejs will get confused and try to use the
> system ICU headers instead of the bundled ones.
>
> Fix this by using headers from HOST_ZLIB_SRCDIR so that the ICU headers
> in the system include directory are not used.
>
> Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
> Changes v4 -> v5:
>   - use headers from HOST_ZLIB_SRCDIR
>   - use shared zlib instead of static zlib
> ---
>  package/nodejs/nodejs.mk | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
> index 0de3495df9..30f5b35809 100644
> --- a/package/nodejs/nodejs.mk
> +++ b/package/nodejs/nodejs.mk
> @@ -64,6 +64,8 @@ define HOST_NODEJS_CONFIGURE_CMDS
>                 --shared-openssl-includes=$(HOST_DIR)/include/openssl \
>                 --shared-openssl-libpath=$(HOST_DIR)/lib \
>                 --shared-zlib \
> +               --shared-zlib-includes=$(HOST_ZLIB_SRCDIR) \
> +               --shared-zlib-libpath=$(HOST_DIR)/lib \
>                 --no-cross-compiling \
>                 --with-intl=small-icu \
>         )
> --
> 2.20.1
>

Hi,

I had the same compilation issue on 2020.02. This patch fixed it for me.

Tested-by: Johan Derycke <johanderycke@gmail.com>

Best regards,

Johan

Patch
diff mbox series

diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk
index 0de3495df9..30f5b35809 100644
--- a/package/nodejs/nodejs.mk
+++ b/package/nodejs/nodejs.mk
@@ -64,6 +64,8 @@  define HOST_NODEJS_CONFIGURE_CMDS
 		--shared-openssl-includes=$(HOST_DIR)/include/openssl \
 		--shared-openssl-libpath=$(HOST_DIR)/lib \
 		--shared-zlib \
+		--shared-zlib-includes=$(HOST_ZLIB_SRCDIR) \
+		--shared-zlib-libpath=$(HOST_DIR)/lib \
 		--no-cross-compiling \
 		--with-intl=small-icu \
 	)