All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libqmi: fix build with help2man
@ 2021-12-16 18:49 Fabrice Fontaine
  2021-12-16 20:15 ` Arnout Vandecappelle
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2021-12-16 18:49 UTC (permalink / raw)
  To: buildroot; +Cc: Matt Weber, Aleksander Morgado, Fabrice Fontaine

Fix the following build failure raised with help2man since bump to
version 1.30.0 in commit 50c5495f81d3418a0f63fc642dc6beb41cd316e0:

FAILED: docs/man/qmicli.1
/usr/bin/help2man --output=docs/man/qmicli.1 '--name=Control QMI devices' '--help-option="--help-all"' /home/peko/autobuild/instance-1/output-1/build/libqmi-1.30.2/build/src/qmicli/qmicli
help2man: can't get `"--help-all"' info from /home/peko/autobuild/instance-1/output-1/build/libqmi-1.30.2/build/src/qmicli/qmicli
Try `--no-discard-stderr' if option outputs to stderr

Fixes:
 - http://autobuild.buildroot.org/results/15818b6de7378cd75c59b1d6dc732ed9a20c092a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...add-an-option-to-not-build-man-pages.patch | 65 +++++++++++++++++++
 package/libqmi/libqmi.mk                      |  1 +
 2 files changed, 66 insertions(+)
 create mode 100644 package/libqmi/0001-build-add-an-option-to-not-build-man-pages.patch

diff --git a/package/libqmi/0001-build-add-an-option-to-not-build-man-pages.patch b/package/libqmi/0001-build-add-an-option-to-not-build-man-pages.patch
new file mode 100644
index 0000000000..d9053de537
--- /dev/null
+++ b/package/libqmi/0001-build-add-an-option-to-not-build-man-pages.patch
@@ -0,0 +1,65 @@
+From 295b75e9c8dc895e281e36b1e8121d09fd556af0 Mon Sep 17 00:00:00 2001
+From: Aleksander Morgado <aleksander@aleksander.es>
+Date: Wed, 3 Nov 2021 10:57:51 +0100
+Subject: [PATCH] build: add an option to not build man pages
+
+When cross-compiling, the compiled binaries cannot be run on the build
+machine, unless one defines a helper (e.g. qemu) in the meson
+configuration, which is most of the time undesirable.
+
+If help2man is installed on the build machine, then the build would fail
+because of this, so add an option to disable generating the man pages.
+
+With later versions of meson, it will be possible to automatically
+detect this condition.
+
+Based on the same fix done in libmbim by Nicolas Cavallari, see
+https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/commit/792af73ea90e9689703ab526dd444fdb1c2f8e40
+
+Fixes https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/75
+
+[Retrieved (and backported) from:
+https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/commit/295b75e9c8dc895e281e36b1e8121d09fd556af0]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ meson.build       | 8 +++++++-
+ meson_options.txt | 1 +
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index e88b43a1..c7312146 100644
+--- a/meson.build
++++ b/meson.build
+@@ -223,8 +223,8 @@ if enable_gtk_doc
+   subdir('docs/reference/libqmi-glib')
+ endif
+ 
+-help2man = find_program('help2man', required: false)
+-if help2man.found()
++enable_man = get_option('man')
++if enable_man
+   subdir('docs/man')
+ endif
+ 
+@@ -237,6 +242,7 @@ summary({
+ output += '    Documentation:         ' + enable_gtk_doc.to_string() + '\n'
+ output += '    bash completion:       ' + enable_bash_completion.to_string() + '\n'
+ output += '    gobject introspection: ' + enable_gir.to_string() + '\n\n'
++output += '    man pages:             ' + enable_man.to_string() + '\n\n'
+ output += '  System paths\n'
+ output += '    prefix:                ' + qmi_prefix + '\n'
+ output += '    udev base directory:   ' + qmi_username + '\n\n'
+diff --git a/meson_options.txt b/meson_options.txt
+index 4d4f913d..bee5daac 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -16,5 +16,6 @@ option('udevdir', type: 'string', value: '', description: 'where udev base direc
+ 
+ option('introspection', type: 'boolean', value: 'auto', description: 'build introspection support')
+ option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
++option('man', type: 'boolean', value: 'true', description: 'build man pages using help2man')
+ 
+ option('bash_completion', type: 'boolean', value: true, description: 'install bash completion files')
+-- 
+GitLab
+
diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk
index cd2c2719f9..a4839f1efb 100644
--- a/package/libqmi/libqmi.mk
+++ b/package/libqmi/libqmi.mk
@@ -12,6 +12,7 @@ LIBQMI_CPE_ID_VENDOR = libqmi_project
 LIBQMI_INSTALL_STAGING = YES
 
 LIBQMI_DEPENDENCIES = libglib2
+LIBQMI_CONF_OPTS = -Dman=false
 
 ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
 LIBQMI_DEPENDENCIES += gobject-introspection
-- 
2.33.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/libqmi: fix build with help2man
  2021-12-16 18:49 [Buildroot] [PATCH 1/1] package/libqmi: fix build with help2man Fabrice Fontaine
@ 2021-12-16 20:15 ` Arnout Vandecappelle
  2021-12-23  1:28 ` Christian Stewart via buildroot
  2022-01-22 17:32 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle @ 2021-12-16 20:15 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot; +Cc: Matt Weber, Aleksander Morgado



On 16/12/2021 19:49, Fabrice Fontaine wrote:
> Fix the following build failure raised with help2man since bump to
> version 1.30.0 in commit 50c5495f81d3418a0f63fc642dc6beb41cd316e0:
> 
> FAILED: docs/man/qmicli.1
> /usr/bin/help2man --output=docs/man/qmicli.1 '--name=Control QMI devices' '--help-option="--help-all"' /home/peko/autobuild/instance-1/output-1/build/libqmi-1.30.2/build/src/qmicli/qmicli
> help2man: can't get `"--help-all"' info from /home/peko/autobuild/instance-1/output-1/build/libqmi-1.30.2/build/src/qmicli/qmicli
> Try `--no-discard-stderr' if option outputs to stderr
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/15818b6de7378cd75c59b1d6dc732ed9a20c092a
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   ...add-an-option-to-not-build-man-pages.patch | 65 +++++++++++++++++++
>   package/libqmi/libqmi.mk                      |  1 +
>   2 files changed, 66 insertions(+)
>   create mode 100644 package/libqmi/0001-build-add-an-option-to-not-build-man-pages.patch
> 
> diff --git a/package/libqmi/0001-build-add-an-option-to-not-build-man-pages.patch b/package/libqmi/0001-build-add-an-option-to-not-build-man-pages.patch
> new file mode 100644
> index 0000000000..d9053de537
> --- /dev/null
> +++ b/package/libqmi/0001-build-add-an-option-to-not-build-man-pages.patch
> @@ -0,0 +1,65 @@
> +From 295b75e9c8dc895e281e36b1e8121d09fd556af0 Mon Sep 17 00:00:00 2001
> +From: Aleksander Morgado <aleksander@aleksander.es>
> +Date: Wed, 3 Nov 2021 10:57:51 +0100
> +Subject: [PATCH] build: add an option to not build man pages
> +
> +When cross-compiling, the compiled binaries cannot be run on the build
> +machine, unless one defines a helper (e.g. qemu) in the meson
> +configuration, which is most of the time undesirable.
> +
> +If help2man is installed on the build machine, then the build would fail
> +because of this, so add an option to disable generating the man pages.
> +
> +With later versions of meson, it will be possible to automatically
> +detect this condition.
> +
> +Based on the same fix done in libmbim by Nicolas Cavallari, see
> +https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/commit/792af73ea90e9689703ab526dd444fdb1c2f8e40
> +
> +Fixes https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/75
> +
> +[Retrieved (and backported) from:
> +https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/commit/295b75e9c8dc895e281e36b1e8121d09fd556af0]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + meson.build       | 8 +++++++-
> + meson_options.txt | 1 +
> + 2 files changed, 8 insertions(+), 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index e88b43a1..c7312146 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -223,8 +223,8 @@ if enable_gtk_doc
> +   subdir('docs/reference/libqmi-glib')
> + endif
> +
> +-help2man = find_program('help2man', required: false)
> +-if help2man.found()
> ++enable_man = get_option('man')
> ++if enable_man
> +   subdir('docs/man')
> + endif
> +
> +@@ -237,6 +242,7 @@ summary({
> + output += '    Documentation:         ' + enable_gtk_doc.to_string() + '\n'
> + output += '    bash completion:       ' + enable_bash_completion.to_string() + '\n'
> + output += '    gobject introspection: ' + enable_gir.to_string() + '\n\n'
> ++output += '    man pages:             ' + enable_man.to_string() + '\n\n'
> + output += '  System paths\n'
> + output += '    prefix:                ' + qmi_prefix + '\n'
> + output += '    udev base directory:   ' + qmi_username + '\n\n'
> +diff --git a/meson_options.txt b/meson_options.txt
> +index 4d4f913d..bee5daac 100644
> +--- a/meson_options.txt
> ++++ b/meson_options.txt
> +@@ -16,5 +16,6 @@ option('udevdir', type: 'string', value: '', description: 'where udev base direc
> +
> + option('introspection', type: 'boolean', value: 'auto', description: 'build introspection support')
> + option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
> ++option('man', type: 'boolean', value: 'true', description: 'build man pages using help2man')
> +
> + option('bash_completion', type: 'boolean', value: true, description: 'install bash completion files')
> +--
> +GitLab
> +
> diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk
> index cd2c2719f9..a4839f1efb 100644
> --- a/package/libqmi/libqmi.mk
> +++ b/package/libqmi/libqmi.mk
> @@ -12,6 +12,7 @@ LIBQMI_CPE_ID_VENDOR = libqmi_project
>   LIBQMI_INSTALL_STAGING = YES
>   
>   LIBQMI_DEPENDENCIES = libglib2
> +LIBQMI_CONF_OPTS = -Dman=false
>   
>   ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
>   LIBQMI_DEPENDENCIES += gobject-introspection
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/libqmi: fix build with help2man
  2021-12-16 18:49 [Buildroot] [PATCH 1/1] package/libqmi: fix build with help2man Fabrice Fontaine
  2021-12-16 20:15 ` Arnout Vandecappelle
@ 2021-12-23  1:28 ` Christian Stewart via buildroot
  2022-01-22 17:32 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Christian Stewart via buildroot @ 2021-12-23  1:28 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot


Hi all,

Original e-mail:
> Fix the following build failure raised with help2man since bump to
> version 1.30.0 in commit 50c5495f81d3418a0f63fc642dc6beb41cd316e0:

Please cherry-pick to 2021.11.x. Thanks.

Best regards,
Christian

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/libqmi: fix build with help2man
  2021-12-16 18:49 [Buildroot] [PATCH 1/1] package/libqmi: fix build with help2man Fabrice Fontaine
  2021-12-16 20:15 ` Arnout Vandecappelle
  2021-12-23  1:28 ` Christian Stewart via buildroot
@ 2022-01-22 17:32 ` Peter Korsgaard
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2022-01-22 17:32 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Matt Weber, Aleksander Morgado, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure raised with help2man since bump to
 > version 1.30.0 in commit 50c5495f81d3418a0f63fc642dc6beb41cd316e0:

 > FAILED: docs/man/qmicli.1
 > /usr/bin/help2man --output=docs/man/qmicli.1 '--name=Control QMI
 > devices' '--help-option="--help-all"'
 > /home/peko/autobuild/instance-1/output-1/build/libqmi-1.30.2/build/src/qmicli/qmicli
 > help2man: can't get `"--help-all"' info from
 > /home/peko/autobuild/instance-1/output-1/build/libqmi-1.30.2/build/src/qmicli/qmicli
 > Try `--no-discard-stderr' if option outputs to stderr

 > Fixes:
 >  - http://autobuild.buildroot.org/results/15818b6de7378cd75c59b1d6dc732ed9a20c092a

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2021.11.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-01-22 17:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-16 18:49 [Buildroot] [PATCH 1/1] package/libqmi: fix build with help2man Fabrice Fontaine
2021-12-16 20:15 ` Arnout Vandecappelle
2021-12-23  1:28 ` Christian Stewart via buildroot
2022-01-22 17:32 ` Peter Korsgaard

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.