* [Buildroot] [PATCH 1/1] package/zeromq: add -latomic to libzmq.pc
@ 2020-01-12 19:07 Fabrice Fontaine
2020-01-12 21:08 ` Thomas Petazzoni
2020-02-28 16:46 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2020-01-12 19:07 UTC (permalink / raw)
To: buildroot
This will fix a static build failure with czmq
Fixes:
- http://autobuild.buildroot.org/results/4a12f1ede260cd956a0b5ccb4eec6ca8b44cb04f
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch | 36 +++++++++++++++++++
package/zeromq/zeromq.mk | 2 ++
2 files changed, 38 insertions(+)
create mode 100644 package/zeromq/0001-acinclude.m4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch
diff --git a/package/zeromq/0001-acinclude.m4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch b/package/zeromq/0001-acinclude.m4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch
new file mode 100644
index 0000000000..49f753b27f
--- /dev/null
+++ b/package/zeromq/0001-acinclude.m4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch
@@ -0,0 +1,36 @@
+From d59dcbcaebd91ca30a0f866403c383177a4843f8 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 12 Jan 2020 10:10:15 +0100
+Subject: [PATCH] acinclude.m4: add -latomic to PKGCFG_LIBS_PRIVATE
+
+Add -latomic to PKGCFG_LIBS_PRIVATE so applications linking statically
+with libzmq (such czmq) will know that they have to link with -latomic
+and the following build failure will be avoided:
+
+ CCLD src/czmq_selftest
+/home/buildroot/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/7.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/run/instance-3/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libzmq.a(src_libzmq_la-ctx.o): in function `zmq::ctx_t::create_socket(int)':
+ctx.cpp:(.text+0x1710): undefined reference to `__atomic_fetch_add_4'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/4a12f1ede260cd956a0b5ccb4eec6ca8b44cb04f
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Retrieved from:
+https://github.com/zeromq/libzmq/commit/d59dcbcaebd91ca30a0f866403c383177a4843f8]
+---
+ acinclude.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 8c042ca50..387a3d2a1 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -691,7 +691,7 @@ int main (int, char **)
+ return t;
+ }
+ ])],
+- [AC_MSG_RESULT(yes) ; libzmq_cv_has_atomic_instrisics="yes" ; $1],
++ [AC_MSG_RESULT(yes) ; libzmq_cv_has_atomic_instrisics="yes" PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -latomic" ; $1],
+ [AC_MSG_RESULT(no) ; libzmq_cv_has_atomic_instrisics="no" LIBS=$save_LIBS ; $2])
+ fi
+ }])
diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk
index 2c2e3e45b8..04f7e7d3f2 100644
--- a/package/zeromq/zeromq.mk
+++ b/package/zeromq/zeromq.mk
@@ -11,6 +11,8 @@ ZEROMQ_DEPENDENCIES = util-linux
ZEROMQ_CONF_OPTS = --without-documentation
ZEROMQ_LICENSE = LGPL-3.0+ with exceptions
ZEROMQ_LICENSE_FILES = COPYING COPYING.LESSER
+# We're patching acinclude.m4
+ZEROMQ_AUTORECONF = YES
# Assume these flags are always available. It is true, at least for
# SOCK_CLOEXEC, since linux v2.6.27.
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/zeromq: add -latomic to libzmq.pc
2020-01-12 19:07 [Buildroot] [PATCH 1/1] package/zeromq: add -latomic to libzmq.pc Fabrice Fontaine
@ 2020-01-12 21:08 ` Thomas Petazzoni
2020-02-28 16:46 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2020-01-12 21:08 UTC (permalink / raw)
To: buildroot
On Sun, 12 Jan 2020 20:07:48 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> This will fix a static build failure with czmq
>
> Fixes:
> - http://autobuild.buildroot.org/results/4a12f1ede260cd956a0b5ccb4eec6ca8b44cb04f
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch | 36 +++++++++++++++++++
> package/zeromq/zeromq.mk | 2 ++
> 2 files changed, 38 insertions(+)
> create mode 100644 package/zeromq/0001-acinclude.m4-add-latomic-to-PKGCFG_LIBS_PRIVATE.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/zeromq: add -latomic to libzmq.pc
2020-01-12 19:07 [Buildroot] [PATCH 1/1] package/zeromq: add -latomic to libzmq.pc Fabrice Fontaine
2020-01-12 21:08 ` Thomas Petazzoni
@ 2020-02-28 16:46 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-02-28 16:46 UTC (permalink / raw)
To: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> This will fix a static build failure with czmq
> Fixes:
> - http://autobuild.buildroot.org/results/4a12f1ede260cd956a0b5ccb4eec6ca8b44cb04f
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2019.02.x and 2019.11.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-28 16:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12 19:07 [Buildroot] [PATCH 1/1] package/zeromq: add -latomic to libzmq.pc Fabrice Fontaine
2020-01-12 21:08 ` Thomas Petazzoni
2020-02-28 16:46 ` 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.