All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@buildroot.org
Cc: Karoly Kasza <kaszak@gmail.com>,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH 1/2] package/irqbalance: use pkg-config to find numa
Date: Sun,  1 Aug 2021 23:46:00 +0200	[thread overview]
Message-ID: <20210801214601.566970-1-fontaine.fabrice@gmail.com> (raw)

Use pkg-config to find numa to avoid the following build failure when
checking for numa_available:

configure:9667: checking for numa_available in -lnuma
configure:9692: /tmp/instance-7/output-1/host/bin/microblazeel-linux-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -static -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -static conftest.c -lnuma   >&5
/tmp/instance-7/output-1/host/opt/ext-toolchain/bin/../lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: /tmp/instance-7/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libnuma.a(libnuma.o): in function `numa_node_to_cpus_v1':
(.text+0x2a80): undefined reference to `__atomic_fetch_and_1'
/tmp/instance-7/output-1/host/opt/ext-toolchain/bin/../lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: /tmp/instance-7/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libnuma.a(libnuma.o): in function `numa_node_to_cpus_v2':
(.text+0x2ddc): undefined reference to `__atomic_fetch_and_1'
collect2: error: ld returned 1 exit status

Fixes:
 - http://autobuild.buildroot.org/results/577a63432fba2f9ae1ed2c6c2a77c5ce54ac5521

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...igure.ac-use-pkg-config-to-find-numa.patch | 38 +++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 package/irqbalance/0002-configure.ac-use-pkg-config-to-find-numa.patch

diff --git a/package/irqbalance/0002-configure.ac-use-pkg-config-to-find-numa.patch b/package/irqbalance/0002-configure.ac-use-pkg-config-to-find-numa.patch
new file mode 100644
index 0000000000..751367ccfb
--- /dev/null
+++ b/package/irqbalance/0002-configure.ac-use-pkg-config-to-find-numa.patch
@@ -0,0 +1,38 @@
+From 274cb8ea470a10ce46b783e77784b0eb08cf20d8 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 1 Aug 2021 23:26:01 +0200
+Subject: [PATCH] configure.ac: use pkg-config to find numa
+
+Use pkg-config to find numa and fallback to current mechanism.
+Thanks to pkg-config, numa dependencies such as -latomic will be
+retrieved.
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/Irqbalance/irqbalance/pull/188]
+---
+ configure.ac | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c45b9ce..50c62ba 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -23,7 +23,14 @@ AC_CHECK_HEADERS([numa.h])
+ 
+ AC_CHECK_FUNCS(getopt_long)
+ 
+-AC_CHECK_LIB(numa, numa_available)
++PKG_CHECK_MODULES([NUMA], [numa], [has_numa=yes], [AC_CHECK_LIB(numa, numa_available)])
++AS_IF([test "x$has_numa" = "xyes"], [
++  AC_SUBST([NUMA_CFLAGS])
++  AC_SUBST([NUMA_LIBS])
++  LIBS="$LIBS $NUMA_LIBS"
++  AC_SUBST([LIBS])
++])
++
+ AC_CHECK_LIB(m, floor)
+ 
+ PKG_CHECK_MODULES([GLIB2], [glib-2.0], [], [AC_MSG_ERROR([glib-2.0 is required])])
+-- 
+2.30.2
+
-- 
2.30.2

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

             reply	other threads:[~2021-08-01 21:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-01 21:46 Fabrice Fontaine [this message]
2021-08-01 21:46 ` [Buildroot] [PATCH 2/2] package/irqbalance: bump to version 1.8.0 Fabrice Fontaine
2021-08-02 16:33 ` [Buildroot] [PATCH 1/2] package/irqbalance: use pkg-config to find numa Arnout Vandecappelle
2021-08-07 20:47 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210801214601.566970-1-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=kaszak@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.