All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libgpgme: fix build without threads
@ 2022-08-27 21:35 Fabrice Fontaine
  2022-08-28  9:41 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-08-27 21:35 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following build failure without threads raised since bump to
version 1.17.1 in commit 3f121357ae225be9ac2fbf4505027c2cc690626b and
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=f3177d3ee0a1d30e15f33ff226b5e4c96b7610db:

run-wkdlookup.cpp: In function 'int main(int, char**)':
run-wkdlookup.cpp:130:18: error: 'std::this_thread' has not been declared
  130 |             std::this_thread::sleep_for(std::chrono::milliseconds{250 * cnt});
      |                  ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/2915f6105bae595274fabaa12de7cc53926d22d0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0001-Fix-build-without-threads.patch      | 59 +++++++++++++++++++
 package/libgpgme/libgpgme.mk                  |  3 +
 2 files changed, 62 insertions(+)
 create mode 100644 package/libgpgme/0001-Fix-build-without-threads.patch

diff --git a/package/libgpgme/0001-Fix-build-without-threads.patch b/package/libgpgme/0001-Fix-build-without-threads.patch
new file mode 100644
index 0000000000..caa4ed7d78
--- /dev/null
+++ b/package/libgpgme/0001-Fix-build-without-threads.patch
@@ -0,0 +1,59 @@
+From fc1b821c80c78f4ae635639c7fce5bad754edda7 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 27 Aug 2022 23:24:44 +0200
+Subject: [PATCH] Fix build without threads
+
+Allow the user to disable cpp tests to avoid the following build failure
+without threads raised since version 1.17.1 and
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=f3177d3ee0a1d30e15f33ff226b5e4c96b7610db
+
+run-wkdlookup.cpp: In function 'int main(int, char**)':
+run-wkdlookup.cpp:130:18: error: 'std::this_thread' has not been declared
+  130 |             std::this_thread::sleep_for(std::chrono::milliseconds{250 * cnt});
+      |                  ^~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/2915f6105bae595274fabaa12de7cc53926d22d0
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://dev.gnupg.org/T6165]
+---
+ configure.ac         | 5 +++++
+ lang/cpp/Makefile.am | 6 +++++-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e7fe04a7..d1c87486 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -553,6 +553,11 @@ AC_ARG_ENABLE(g13-test,
+          run_g13_test=$enableval)
+ AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
+ 
++run_cpp_test="yes"
++AC_ARG_ENABLE(cpp-test,
++  AS_HELP_STRING([--disable-cpp-test],[disable CPP regression test]),
++         run_cpp_test=$enableval)
++AM_CONDITIONAL(RUN_CPP_TESTS, test "$run_cpp_test" = "yes")
+ 
+ # Checks for header files.
+ AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h stdint.h
+diff --git a/lang/cpp/Makefile.am b/lang/cpp/Makefile.am
+index 724da6ca..243c463d 100644
+--- a/lang/cpp/Makefile.am
++++ b/lang/cpp/Makefile.am
+@@ -18,6 +18,10 @@
+ # License along with this program; if not, see <https://gnu.org/licenses/>.
+ # SPDX-License-Identifier: LGPL-2.1-or-later
+ 
+-SUBDIRS = src tests
++SUBDIRS = src
++
++if RUN_CPP_TESTS
++SUBDIRS += tests
++endif
+ 
+ EXTRA_DIST = README
+-- 
+2.35.1
+
diff --git a/package/libgpgme/libgpgme.mk b/package/libgpgme/libgpgme.mk
index 1b57b18872..2120ee8e3c 100644
--- a/package/libgpgme/libgpgme.mk
+++ b/package/libgpgme/libgpgme.mk
@@ -14,6 +14,8 @@ LIBGPGME_CPE_ID_PRODUCT = gpgme
 LIBGPGME_INSTALL_STAGING = YES
 LIBGPGME_DEPENDENCIES = libassuan libgpg-error
 LIBGPGME_CONFIG_SCRIPTS = gpgme-config
+# We're patching configure.ac
+LIBGPGME_AUTORECONF = YES
 
 LIBGPGME_LANGUAGE_BINDINGS = cl
 # C++ bindings require a C++11 capable gcc, and -Wsuggest-override support
@@ -28,6 +30,7 @@ LIBGPGME_CONF_OPTS = \
 	--disable-gpgconf-test \
 	--disable-g13-test \
 	--disable-gpg-test \
+	--disable-cpp-test \
 	--enable-languages=$(subst $(space),$(comma),$(LIBGPGME_LANGUAGE_BINDINGS))
 
 # Handle argp-standalone or it errors out during build
-- 
2.35.1

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

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

* Re: [Buildroot] [PATCH 1/1] package/libgpgme: fix build without threads
  2022-08-27 21:35 [Buildroot] [PATCH 1/1] package/libgpgme: fix build without threads Fabrice Fontaine
@ 2022-08-28  9:41 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2022-08-28  9:41 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

Fabrice, All,

On 2022-08-27 23:35 +0200, Fabrice Fontaine spake thusly:
> Fix the following build failure without threads raised since bump to
> version 1.17.1 in commit 3f121357ae225be9ac2fbf4505027c2cc690626b and
> https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=f3177d3ee0a1d30e15f33ff226b5e4c96b7610db:
> 
> run-wkdlookup.cpp: In function 'int main(int, char**)':
> run-wkdlookup.cpp:130:18: error: 'std::this_thread' has not been declared
>   130 |             std::this_thread::sleep_for(std::chrono::milliseconds{250 * cnt});
>       |                  ^~~~~~~~~~~
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/2915f6105bae595274fabaa12de7cc53926d22d0
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  .../0001-Fix-build-without-threads.patch      | 59 +++++++++++++++++++
>  package/libgpgme/libgpgme.mk                  |  3 +
>  2 files changed, 62 insertions(+)
>  create mode 100644 package/libgpgme/0001-Fix-build-without-threads.patch
> 
> diff --git a/package/libgpgme/0001-Fix-build-without-threads.patch b/package/libgpgme/0001-Fix-build-without-threads.patch
> new file mode 100644
> index 0000000000..caa4ed7d78
> --- /dev/null
> +++ b/package/libgpgme/0001-Fix-build-without-threads.patch
> @@ -0,0 +1,59 @@
> +From fc1b821c80c78f4ae635639c7fce5bad754edda7 Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sat, 27 Aug 2022 23:24:44 +0200
> +Subject: [PATCH] Fix build without threads
> +
> +Allow the user to disable cpp tests to avoid the following build failure
> +without threads raised since version 1.17.1 and
> +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=f3177d3ee0a1d30e15f33ff226b5e4c96b7610db
> +
> +run-wkdlookup.cpp: In function 'int main(int, char**)':
> +run-wkdlookup.cpp:130:18: error: 'std::this_thread' has not been declared
> +  130 |             std::this_thread::sleep_for(std::chrono::milliseconds{250 * cnt});
> +      |                  ^~~~~~~~~~~
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/2915f6105bae595274fabaa12de7cc53926d22d0
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://dev.gnupg.org/T6165]
> +---
> + configure.ac         | 5 +++++
> + lang/cpp/Makefile.am | 6 +++++-
> + 2 files changed, 10 insertions(+), 1 deletion(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index e7fe04a7..d1c87486 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -553,6 +553,11 @@ AC_ARG_ENABLE(g13-test,
> +          run_g13_test=$enableval)
> + AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
> + 
> ++run_cpp_test="yes"
> ++AC_ARG_ENABLE(cpp-test,
> ++  AS_HELP_STRING([--disable-cpp-test],[disable CPP regression test]),
> ++         run_cpp_test=$enableval)
> ++AM_CONDITIONAL(RUN_CPP_TESTS, test "$run_cpp_test" = "yes")
> + 
> + # Checks for header files.
> + AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h stdint.h
> +diff --git a/lang/cpp/Makefile.am b/lang/cpp/Makefile.am
> +index 724da6ca..243c463d 100644
> +--- a/lang/cpp/Makefile.am
> ++++ b/lang/cpp/Makefile.am
> +@@ -18,6 +18,10 @@
> + # License along with this program; if not, see <https://gnu.org/licenses/>.
> + # SPDX-License-Identifier: LGPL-2.1-or-later
> + 
> +-SUBDIRS = src tests
> ++SUBDIRS = src
> ++
> ++if RUN_CPP_TESTS
> ++SUBDIRS += tests
> ++endif
> + 
> + EXTRA_DIST = README
> +-- 
> +2.35.1
> +
> diff --git a/package/libgpgme/libgpgme.mk b/package/libgpgme/libgpgme.mk
> index 1b57b18872..2120ee8e3c 100644
> --- a/package/libgpgme/libgpgme.mk
> +++ b/package/libgpgme/libgpgme.mk
> @@ -14,6 +14,8 @@ LIBGPGME_CPE_ID_PRODUCT = gpgme
>  LIBGPGME_INSTALL_STAGING = YES
>  LIBGPGME_DEPENDENCIES = libassuan libgpg-error
>  LIBGPGME_CONFIG_SCRIPTS = gpgme-config
> +# We're patching configure.ac
> +LIBGPGME_AUTORECONF = YES
>  
>  LIBGPGME_LANGUAGE_BINDINGS = cl
>  # C++ bindings require a C++11 capable gcc, and -Wsuggest-override support
> @@ -28,6 +30,7 @@ LIBGPGME_CONF_OPTS = \
>  	--disable-gpgconf-test \
>  	--disable-g13-test \
>  	--disable-gpg-test \
> +	--disable-cpp-test \
>  	--enable-languages=$(subst $(space),$(comma),$(LIBGPGME_LANGUAGE_BINDINGS))
>  
>  # Handle argp-standalone or it errors out during build
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/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@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-08-28  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-27 21:35 [Buildroot] [PATCH 1/1] package/libgpgme: fix build without threads Fabrice Fontaine
2022-08-28  9:41 ` 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.