Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/s390-tools: add libxml2 optional dependency
@ 2021-08-01 13:33 Fabrice Fontaine
  2021-08-01 14:10 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-08-01 13:33 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine, Alexander Egorenkov

libxml2 is an optional dependency which is enabled by default since
version 2.17.0 and
https://github.com/ibm-s390-linux/s390-tools/commit/56fecf1832c3ebc4626ddf5c598762833c362d5e

Also set PATH to avoid the following build failures related to
curl-config and xml2-config:

/bin/sh: 1: curl-config: not found
Error: libcurl is not built with the OpenSSL backend
make[2]: *** [Makefile:54: check-dep-libekmfweb] Error 1

Fixes:
 - http://autobuild.buildroot.org/results/cfb46d7547c22f0a23aca2286dc5a1d2c20aadfc

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/s390-tools/s390-tools.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/s390-tools/s390-tools.mk b/package/s390-tools/s390-tools.mk
index b5843fe0d6..3d3f24c181 100644
--- a/package/s390-tools/s390-tools.mk
+++ b/package/s390-tools/s390-tools.mk
@@ -15,6 +15,7 @@ S390_TOOLS_MAKE_OPTS = \
 	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
 	LINK="$(TARGET_CC)" \
 	LINKXX="$(TARGET_CXX)" \
+	PATH="$(STAGING_DIR)/usr/bin:$(BR_PATH)" \
 	WARNINGS=
 
 ifeq ($(BR2_PACKAGE_LIBCURL),y)
@@ -56,6 +57,13 @@ else
 S390_TOOLS_MAKE_OPTS += HAVE_GLIB2=0
 endif
 
+ifeq ($(BR2_PACKAGE_LIBXML2),y)
+S390_TOOLS_DEPENDENCIES += libxml2
+S390_TOOLS_MAKE_OPTS += HAVE_LIBXML2=1
+else
+S390_TOOLS_MAKE_OPTS += HAVE_LIBXML2=0
+endif
+
 ifeq ($(BR2_PACKAGE_NCURSES),y)
 S390_TOOLS_DEPENDENCIES += ncurses
 S390_TOOLS_MAKE_OPTS += HAVE_NCURSES=1
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/s390-tools: add libxml2 optional dependency
  2021-08-01 13:33 [Buildroot] [PATCH 1/1] package/s390-tools: add libxml2 optional dependency Fabrice Fontaine
@ 2021-08-01 14:10 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2021-08-01 14:10 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Alexander Egorenkov, buildroot

Fabrice, All,

On 2021-08-01 15:33 +0200, Fabrice Fontaine spake thusly:
> libxml2 is an optional dependency which is enabled by default since
> version 2.17.0 and
> https://github.com/ibm-s390-linux/s390-tools/commit/56fecf1832c3ebc4626ddf5c598762833c362d5e
> 
> Also set PATH to avoid the following build failures related to
> curl-config and xml2-config:

So, thjis is two different things:
  - a fix for finding curl-config
  - an optional dependency to libxml2

As such, this should be two patches.

> /bin/sh: 1: curl-config: not found
> Error: libcurl is not built with the OpenSSL backend
> make[2]: *** [Makefile:54: check-dep-libekmfweb] Error 1

I don;t like it much that we add staging in the path, I find it very
dangerous... I know we are doing that in quite a few other places, but
I don't think that should be an excuse not to fix this curl-config
properly.

The correct way, I believe, to dfix that, is to replace hard-coded calls
to curl-config with something like, in shell scripts:

    ${CURL_CONFIG:-curl-config} --cflags

while in Makefile, it would probably look like:

    CURL_CONFIG ?= curl-config
    FOO_CFLAGS = `$(CURL_CONFIG) --cflags`

And so on... Ditto for xml2-config, of course...

Regards,
Yann E. MORIN.

> Fixes:
>  - http://autobuild.buildroot.org/results/cfb46d7547c22f0a23aca2286dc5a1d2c20aadfc
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/s390-tools/s390-tools.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/s390-tools/s390-tools.mk b/package/s390-tools/s390-tools.mk
> index b5843fe0d6..3d3f24c181 100644
> --- a/package/s390-tools/s390-tools.mk
> +++ b/package/s390-tools/s390-tools.mk
> @@ -15,6 +15,7 @@ S390_TOOLS_MAKE_OPTS = \
>  	CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \
>  	LINK="$(TARGET_CC)" \
>  	LINKXX="$(TARGET_CXX)" \
> +	PATH="$(STAGING_DIR)/usr/bin:$(BR_PATH)" \
>  	WARNINGS=
>  
>  ifeq ($(BR2_PACKAGE_LIBCURL),y)
> @@ -56,6 +57,13 @@ else
>  S390_TOOLS_MAKE_OPTS += HAVE_GLIB2=0
>  endif
>  
> +ifeq ($(BR2_PACKAGE_LIBXML2),y)
> +S390_TOOLS_DEPENDENCIES += libxml2
> +S390_TOOLS_MAKE_OPTS += HAVE_LIBXML2=1
> +else
> +S390_TOOLS_MAKE_OPTS += HAVE_LIBXML2=0
> +endif
> +
>  ifeq ($(BR2_PACKAGE_NCURSES),y)
>  S390_TOOLS_DEPENDENCIES += ncurses
>  S390_TOOLS_MAKE_OPTS += HAVE_NCURSES=1
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot@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 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-08-01 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-01 13:33 [Buildroot] [PATCH 1/1] package/s390-tools: add libxml2 optional dependency Fabrice Fontaine
2021-08-01 14:10 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox