Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request v2] nfs-utils: fix static build
@ 2014-11-27 21:28 Yann E. MORIN
  2014-11-27 21:28 ` [Buildroot] [PATCH 1/4 v2] package/libtirpc: rename patches Yann E. MORIN
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Yann E. MORIN @ 2014-11-27 21:28 UTC (permalink / raw)
  To: buildroot

Hello All!

This small series fixes nfs-utils for static builds.
Not much to say besides what the various changelogs already say.

If needed, I can drop renaming the patches if it is not wanted for the
master branch, or they can be folded each into its following changeset.


Changes v1 -> v2:
  - fix the nfs-utils patch to get rid of a latent bug, use the same
    patch as sent upstream


Regards,
Yann E. MORIN.


The following changes since commit 3a66731b9c50e62a6768edc9f21da867a74869b9:

  infra: do not append an empty LD_LIBRARY_PATH (2014-11-27 22:07:15 +0100)

are available in the git repository at:

  git://git.busybox.net/~ymorin/git/buildroot yem/for-release

for you to fetch changes up to ffb61e77dc527abadcf5c155b2163c3fcc9b9329:

  package/nfs-utils: use pkg-config to find libtirpc (2014-11-27 22:25:42 +0100)

----------------------------------------------------------------
Yann E. MORIN (4):
      package/libtirpc: rename patches
      package/libtirpc: add -pthread to the private libraries
      package/nfs-utils: rename patches
      package/nfs-utils: use pkg-config to find libtirpc

 ...ble-parts-of-TIRPC-requiring-NIS-support.patch} |   0
 ...ut-RPC-support-does-not-install-rpcent.h.patch} |   0
 ...patch => 0003-Make-IPv6-support-optional.patch} |   0
 ...dd-rpcgen-program-from-nfs-utils-sources.patch} |   0
 ...y-generate-XDR-header-files-from-.x-sour.patch} |   0
 ...-files-needed-to-build-rpcbind-on-top-of.patch} |   0
 package/libtirpc/0007-needs-pthread.patch          |  25 +++++
 ...-AM_CONDITIONAL-in-conditional-execution.patch} |   0
 ...oo.patch => 0002-Patch-taken-from-Gentoo.patch} |   0
 ...-Switch-legacy-index-in-favour-of-strchr.patch} |   0
 ...libc.patch => 0004-fix-build-with-uClibc.patch} |   0
 ...of-getrpcbynumber-when-getrpcbynumber_r-.patch} |   0
 ...igure-script-find-getrpcbynumber-in-libt.patch} |   0
 ... 0007-sockaddr-h-needs-stddef-h-for-NULL.patch} |   0
 package/nfs-utils/0008-tirpc-with-pkgconfig.patch  | 102 +++++++++++++++++++++
 package/nfs-utils/nfs-utils.mk                     |   2 +-
 16 files changed, 128 insertions(+), 1 deletion(-)
 rename package/libtirpc/{libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch => 0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch} (100%)
 rename package/libtirpc/{libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch => 0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch} (100%)
 rename package/libtirpc/{libtirpc-0004-Make-IPv6-support-optional.patch => 0003-Make-IPv6-support-optional.patch} (100%)
 rename package/libtirpc/{libtirpc-0008-Add-rpcgen-program-from-nfs-utils-sources.patch => 0004-Add-rpcgen-program-from-nfs-utils-sources.patch} (100%)
 rename package/libtirpc/{libtirpc-0009-Automatically-generate-XDR-header-files-from-.x-sour.patch => 0005-Automatically-generate-XDR-header-files-from-.x-sour.patch} (100%)
 rename package/libtirpc/{libtirpc-0010-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch => 0006-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch} (100%)
 create mode 100644 package/libtirpc/0007-needs-pthread.patch
 rename package/nfs-utils/{nfs-utils-0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch => 0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0002-Patch-taken-from-Gentoo.patch => 0002-Patch-taken-from-Gentoo.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch => 0003-Switch-legacy-index-in-favour-of-strchr.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0004-fix-build-with-uClibc.patch => 0004-fix-build-with-uClibc.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch => 0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch => 0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0007-sockaddr-h-needs-stddef-h-for-NULL.patch => 0007-sockaddr-h-needs-stddef-h-for-NULL.patch} (100%)
 create mode 100644 package/nfs-utils/0008-tirpc-with-pkgconfig.patch

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH 1/4 v2] package/libtirpc: rename patches
  2014-11-27 21:28 [Buildroot] [pull request v2] nfs-utils: fix static build Yann E. MORIN
@ 2014-11-27 21:28 ` Yann E. MORIN
  2014-11-27 21:28 ` [Buildroot] [PATCH 2/4 v2] package/libtirpc: add -pthread to the private libraries Yann E. MORIN
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2014-11-27 21:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 ...port.patch => 0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch} | 0
 ...ch => 0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch} | 0
 ...-IPv6-support-optional.patch => 0003-Make-IPv6-support-optional.patch} | 0
 ...sources.patch => 0004-Add-rpcgen-program-from-nfs-utils-sources.patch} | 0
 ...ch => 0005-Automatically-generate-XDR-header-files-from-.x-sour.patch} | 0
 ...ch => 0006-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch} | 0
 6 files changed, 0 insertions(+), 0 deletions(-)
 rename package/libtirpc/{libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch => 0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch} (100%)
 rename package/libtirpc/{libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch => 0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch} (100%)
 rename package/libtirpc/{libtirpc-0004-Make-IPv6-support-optional.patch => 0003-Make-IPv6-support-optional.patch} (100%)
 rename package/libtirpc/{libtirpc-0008-Add-rpcgen-program-from-nfs-utils-sources.patch => 0004-Add-rpcgen-program-from-nfs-utils-sources.patch} (100%)
 rename package/libtirpc/{libtirpc-0009-Automatically-generate-XDR-header-files-from-.x-sour.patch => 0005-Automatically-generate-XDR-header-files-from-.x-sour.patch} (100%)
 rename package/libtirpc/{libtirpc-0010-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch => 0006-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch} (100%)

diff --git a/package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch b/package/libtirpc/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch
similarity index 100%
rename from package/libtirpc/libtirpc-0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch
rename to package/libtirpc/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch
diff --git a/package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch b/package/libtirpc/0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch
similarity index 100%
rename from package/libtirpc/libtirpc-0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch
rename to package/libtirpc/0002-uClibc-without-RPC-support-does-not-install-rpcent.h.patch
diff --git a/package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch b/package/libtirpc/0003-Make-IPv6-support-optional.patch
similarity index 100%
rename from package/libtirpc/libtirpc-0004-Make-IPv6-support-optional.patch
rename to package/libtirpc/0003-Make-IPv6-support-optional.patch
diff --git a/package/libtirpc/libtirpc-0008-Add-rpcgen-program-from-nfs-utils-sources.patch b/package/libtirpc/0004-Add-rpcgen-program-from-nfs-utils-sources.patch
similarity index 100%
rename from package/libtirpc/libtirpc-0008-Add-rpcgen-program-from-nfs-utils-sources.patch
rename to package/libtirpc/0004-Add-rpcgen-program-from-nfs-utils-sources.patch
diff --git a/package/libtirpc/libtirpc-0009-Automatically-generate-XDR-header-files-from-.x-sour.patch b/package/libtirpc/0005-Automatically-generate-XDR-header-files-from-.x-sour.patch
similarity index 100%
rename from package/libtirpc/libtirpc-0009-Automatically-generate-XDR-header-files-from-.x-sour.patch
rename to package/libtirpc/0005-Automatically-generate-XDR-header-files-from-.x-sour.patch
diff --git a/package/libtirpc/libtirpc-0010-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch b/package/libtirpc/0006-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch
similarity index 100%
rename from package/libtirpc/libtirpc-0010-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch
rename to package/libtirpc/0006-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch
-- 
1.9.1

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

* [Buildroot] [PATCH 2/4 v2] package/libtirpc: add -pthread to the private libraries
  2014-11-27 21:28 [Buildroot] [pull request v2] nfs-utils: fix static build Yann E. MORIN
  2014-11-27 21:28 ` [Buildroot] [PATCH 1/4 v2] package/libtirpc: rename patches Yann E. MORIN
@ 2014-11-27 21:28 ` Yann E. MORIN
  2014-11-27 21:28 ` [Buildroot] [PATCH 3/4 v2] package/nfs-utils: rename patches Yann E. MORIN
  2014-11-27 21:28 ` [Buildroot] [PATCH 4/4 v2] package/nfs-utils: use pkg-config to find libtirpc Yann E. MORIN
  3 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2014-11-27 21:28 UTC (permalink / raw)
  To: buildroot

Fixes:
    http://autobuild.buildroot.net/results/17d/17d1d94e6f1617851e374f4fe9804f1e5ea9e99f/
    http://autobuild.buildroot.net/results/c08/c08b7be40c8f208147a4f95ad897e4a1df7e108d/
    and maybe a bunch of others...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/libtirpc/0007-needs-pthread.patch | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 package/libtirpc/0007-needs-pthread.patch

diff --git a/package/libtirpc/0007-needs-pthread.patch b/package/libtirpc/0007-needs-pthread.patch
new file mode 100644
index 0000000..6cdf98a
--- /dev/null
+++ b/package/libtirpc/0007-needs-pthread.patch
@@ -0,0 +1,25 @@
+pkg-config: needs pthread as private library
+
+libtirpc needs pthreads. This is automatically pulled in when linking
+with the shared library, thanks to the DT_NEEDED ELF tags.
+
+But for a static library, there is no such mechanism to identify
+required libraries.
+
+Thus, add -pthread to the private libraries in the pkg-config file.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+---
+Patch sent upstream:
+    http://sourceforge.net/p/libtirpc/mailman/message/33072076/
+
+diff -durN libtirpc-0.2.4.orig/libtirpc.pc.in libtirpc-0.2.4/libtirpc.pc.in
+--- libtirpc-0.2.4.orig/libtirpc.pc.in	2013-12-09 21:59:51.000000000 +0100
++++ libtirpc-0.2.4/libtirpc.pc.in	2014-11-23 14:02:58.677760108 +0100
+@@ -8,4 +8,5 @@
+ Requires:
+ Version: @PACKAGE_VERSION@
+ Libs: -L at libdir@ -ltirpc
++Libs.private: -pthread
+ Cflags: -I at includedir@/tirpc
-- 
1.9.1

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

* [Buildroot] [PATCH 3/4 v2] package/nfs-utils: rename patches
  2014-11-27 21:28 [Buildroot] [pull request v2] nfs-utils: fix static build Yann E. MORIN
  2014-11-27 21:28 ` [Buildroot] [PATCH 1/4 v2] package/libtirpc: rename patches Yann E. MORIN
  2014-11-27 21:28 ` [Buildroot] [PATCH 2/4 v2] package/libtirpc: add -pthread to the private libraries Yann E. MORIN
@ 2014-11-27 21:28 ` Yann E. MORIN
  2014-11-27 21:28 ` [Buildroot] [PATCH 4/4 v2] package/nfs-utils: use pkg-config to find libtirpc Yann E. MORIN
  3 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2014-11-27 21:28 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 ...tch => 0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch} | 0
 ...2-Patch-taken-from-Gentoo.patch => 0002-Patch-taken-from-Gentoo.patch} | 0
 ...of-strchr.patch => 0003-Switch-legacy-index-in-favour-of-strchr.patch} | 0
 ...-0004-fix-build-with-uClibc.patch => 0004-fix-build-with-uClibc.patch} | 0
 ...ch => 0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch} | 0
 ...ch => 0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch} | 0
 ...def-h-for-NULL.patch => 0007-sockaddr-h-needs-stddef-h-for-NULL.patch} | 0
 7 files changed, 0 insertions(+), 0 deletions(-)
 rename package/nfs-utils/{nfs-utils-0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch => 0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0002-Patch-taken-from-Gentoo.patch => 0002-Patch-taken-from-Gentoo.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch => 0003-Switch-legacy-index-in-favour-of-strchr.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0004-fix-build-with-uClibc.patch => 0004-fix-build-with-uClibc.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch => 0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch => 0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch} (100%)
 rename package/nfs-utils/{nfs-utils-0007-sockaddr-h-needs-stddef-h-for-NULL.patch => 0007-sockaddr-h-needs-stddef-h-for-NULL.patch} (100%)

diff --git a/package/nfs-utils/nfs-utils-0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch b/package/nfs-utils/0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch
similarity index 100%
rename from package/nfs-utils/nfs-utils-0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch
rename to package/nfs-utils/0001-build-avoid-AM_CONDITIONAL-in-conditional-execution.patch
diff --git a/package/nfs-utils/nfs-utils-0002-Patch-taken-from-Gentoo.patch b/package/nfs-utils/0002-Patch-taken-from-Gentoo.patch
similarity index 100%
rename from package/nfs-utils/nfs-utils-0002-Patch-taken-from-Gentoo.patch
rename to package/nfs-utils/0002-Patch-taken-from-Gentoo.patch
diff --git a/package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch b/package/nfs-utils/0003-Switch-legacy-index-in-favour-of-strchr.patch
similarity index 100%
rename from package/nfs-utils/nfs-utils-0003-Switch-legacy-index-in-favour-of-strchr.patch
rename to package/nfs-utils/0003-Switch-legacy-index-in-favour-of-strchr.patch
diff --git a/package/nfs-utils/nfs-utils-0004-fix-build-with-uClibc.patch b/package/nfs-utils/0004-fix-build-with-uClibc.patch
similarity index 100%
rename from package/nfs-utils/nfs-utils-0004-fix-build-with-uClibc.patch
rename to package/nfs-utils/0004-fix-build-with-uClibc.patch
diff --git a/package/nfs-utils/nfs-utils-0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch b/package/nfs-utils/0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch
similarity index 100%
rename from package/nfs-utils/nfs-utils-0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch
rename to package/nfs-utils/0005-Allow-usage-of-getrpcbynumber-when-getrpcbynumber_r-.patch
diff --git a/package/nfs-utils/nfs-utils-0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch b/package/nfs-utils/0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch
similarity index 100%
rename from package/nfs-utils/nfs-utils-0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch
rename to package/nfs-utils/0006-Let-the-configure-script-find-getrpcbynumber-in-libt.patch
diff --git a/package/nfs-utils/nfs-utils-0007-sockaddr-h-needs-stddef-h-for-NULL.patch b/package/nfs-utils/0007-sockaddr-h-needs-stddef-h-for-NULL.patch
similarity index 100%
rename from package/nfs-utils/nfs-utils-0007-sockaddr-h-needs-stddef-h-for-NULL.patch
rename to package/nfs-utils/0007-sockaddr-h-needs-stddef-h-for-NULL.patch
-- 
1.9.1

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

* [Buildroot] [PATCH 4/4 v2] package/nfs-utils: use pkg-config to find libtirpc
  2014-11-27 21:28 [Buildroot] [pull request v2] nfs-utils: fix static build Yann E. MORIN
                   ` (2 preceding siblings ...)
  2014-11-27 21:28 ` [Buildroot] [PATCH 3/4 v2] package/nfs-utils: rename patches Yann E. MORIN
@ 2014-11-27 21:28 ` Yann E. MORIN
  2014-11-27 22:28   ` Peter Korsgaard
  3 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2014-11-27 21:28 UTC (permalink / raw)
  To: buildroot

Fixes:
    http://autobuild.buildroot.net/results/17d/17d1d94e6f1617851e374f4fe9804f1e5ea9e99f/
    http://autobuild.buildroot.net/results/c08/c08b7be40c8f208147a4f95ad897e4a1df7e108d/
    and probably some others as well...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/nfs-utils/0008-tirpc-with-pkgconfig.patch | 102 ++++++++++++++++++++++
 package/nfs-utils/nfs-utils.mk                    |   2 +-
 2 files changed, 103 insertions(+), 1 deletion(-)
 create mode 100644 package/nfs-utils/0008-tirpc-with-pkgconfig.patch

diff --git a/package/nfs-utils/0008-tirpc-with-pkgconfig.patch b/package/nfs-utils/0008-tirpc-with-pkgconfig.patch
new file mode 100644
index 0000000..62c820b
--- /dev/null
+++ b/package/nfs-utils/0008-tirpc-with-pkgconfig.patch
@@ -0,0 +1,102 @@
+From 1ecd1f2008bfab7bb3cd6ada135c980414a7f1ba Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Sun, 23 Nov 2014 15:53:56 +0100
+Subject: [PATCH] configure: use pkg-config to find libtirpc
+
+Currently, we use a custom function to find libtirpc's headers and
+libraries. This works fine for shared linking.
+
+But for static linking, this forgets to link with -lpthread, which is
+required by libtirpc.
+
+A recent patch was sent to libtirpc to add that missing -lpthread in its
+Libs.private section of its .pc file. Thus, pkg-config will soon be able
+to return the appropriate libraries.
+
+So, use pkg-config to find libtirpc.
+
+And for older libtirpc versions, there is no change in behaviour: we're
+still missing the -lpthread. But once libtirpc has been fixed, we'll
+automatically get that missing library for free! :-)
+
+Remove the --with-libirpc flag as it is no longer needed: pkg-config
+will provide us with the -I and -L flags, now.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Cc: Steve Dickson <steved@redhat.com>
+
+---
+Patch sent upstream:
+    http://article.gmane.org/gmane.linux.nfs/67708
+---
+ aclocal/libtirpc.m4 | 68 ++++++++++-------------------------------------------
+ 1 file changed, 13 insertions(+), 55 deletions(-)
+
+diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
+index b823364..4a19c1a 100644
+--- a/aclocal/libtirpc.m4
++++ b/aclocal/libtirpc.m4
+@@ -2,50 +2,19 @@ dnl Checks for TI-RPC library and headers
+ dnl
+ AC_DEFUN([AC_LIBTIRPC], [
+ 
+-  AC_ARG_WITH([tirpcinclude],
+-              [AC_HELP_STRING([--with-tirpcinclude=DIR],
+-                              [use TI-RPC headers in DIR])],
+-              [tirpc_header_dir=$withval],
+-              [tirpc_header_dir=/usr/include/tirpc])
+-
+-  dnl if --enable-tirpc was specifed, the following components
+-  dnl must be present, and we set up HAVE_ macros for them.
+-
+-  if test "$enable_tirpc" != "no"; then
+-
+-    dnl look for the library
+-    AC_CHECK_LIB([tirpc], [clnt_tli_create], [:],
+-                 [if test "$enable_tirpc" = "yes"; then
+-			AC_MSG_ERROR([libtirpc not found.])
+-		  else
+-			AC_MSG_WARN([libtirpc not found. TIRPC disabled!])
+-			enable_tirpc="no"
+-		  fi])
+-  fi
+-
+-  if test "$enable_tirpc" != "no"; then
+-    dnl also must have the headers installed where we expect
+-    dnl look for headers; add -I compiler option if found
+-    AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
+-    		      AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]),
+-		      [if test "$enable_tirpc" = "yes"; then
+-			 AC_MSG_ERROR([libtirpc headers not found.])
+-		       else
+-			 AC_MSG_WARN([libtirpc headers not found. TIRPC disabled!])
+-			 enable_tirpc="no"
+-		       fi])
+-
+-  fi
+-
+-  dnl now set $LIBTIRPC accordingly
+-  if test "$enable_tirpc" != "no"; then
+-    AC_DEFINE([HAVE_LIBTIRPC], 1,
+-              [Define to 1 if you have and wish to use libtirpc.])
+-    LIBTIRPC="-ltirpc"
+-  else
+-    LIBTIRPC=""
+-  fi
+-
++  PKG_PROG_PKG_CONFIG([0.9.0])
++  AS_IF(
++    [test "$enable_tirpc" != "no"],
++    [PKG_CHECK_MODULES([TIRPC], [libtirpc >= 0.2.4],
++                       [LIBTIRPC="${TIRPC_LIBS}"
++                        AM_CPPFLAGS="${AM_CPPFLAGS} ${TIRPC_CFLAGS}"
++                        AC_DEFINE([HAVE_LIBTIRPC], [1],
++                                  [Define to 1 if you have and wish to use libtirpc.])],
++                       [AS_IF([test "$enable_tirpc" = "yes"],
++                              [AC_MSG_ERROR([libtirpc not found.])],
++                              [LIBTIRPC=""])])])
++
++  AC_SUBST([AM_CPPFLAGS])
+   AC_SUBST(LIBTIRPC)
+ 
+ ])dnl
diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
index 522e790..8b56edf 100644
--- a/package/nfs-utils/nfs-utils.mk
+++ b/package/nfs-utils/nfs-utils.mk
@@ -28,7 +28,7 @@ NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd
 NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad
 
 ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
-NFS_UTILS_CONF_OPTS += --enable-tirpc --with-tirpcinclude=$(STAGING_DIR)/usr/include/tirpc/
+NFS_UTILS_CONF_OPTS += --enable-tirpc
 NFS_UTILS_DEPENDENCIES += libtirpc
 else
 NFS_UTILS_CONF_OPTS += --disable-tirpc
-- 
1.9.1

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

* [Buildroot] [PATCH 4/4 v2] package/nfs-utils: use pkg-config to find libtirpc
  2014-11-27 21:28 ` [Buildroot] [PATCH 4/4 v2] package/nfs-utils: use pkg-config to find libtirpc Yann E. MORIN
@ 2014-11-27 22:28   ` Peter Korsgaard
  2014-11-27 22:35     ` Yann E. MORIN
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2014-11-27 22:28 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > Fixes:
 >     http://autobuild.buildroot.net/results/17d/17d1d94e6f1617851e374f4fe9804f1e5ea9e99f/
 >     http://autobuild.buildroot.net/results/c08/c08b7be40c8f208147a4f95ad897e4a1df7e108d/
 >     and probably some others as well...

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > ---
 >  package/nfs-utils/0008-tirpc-with-pkgconfig.patch | 102 ++++++++++++++++++++++
 >  package/nfs-utils/nfs-utils.mk                    |   2 +-
 >  2 files changed, 103 insertions(+), 1 deletion(-)
 >  create mode 100644 package/nfs-utils/0008-tirpc-with-pkgconfig.patch

 > diff --git a/package/nfs-utils/0008-tirpc-with-pkgconfig.patch b/package/nfs-utils/0008-tirpc-with-pkgconfig.patch
 > new file mode 100644
 > index 0000000..62c820b
 > --- /dev/null
 > +++ b/package/nfs-utils/0008-tirpc-with-pkgconfig.patch
 > @@ -0,0 +1,102 @@
 > +From 1ecd1f2008bfab7bb3cd6ada135c980414a7f1ba Mon Sep 17 00:00:00 2001
 > +From: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > +Date: Sun, 23 Nov 2014 15:53:56 +0100
 > +Subject: [PATCH] configure: use pkg-config to find libtirpc
 > +
 > +Currently, we use a custom function to find libtirpc's headers and
 > +libraries. This works fine for shared linking.
 > +
 > +But for static linking, this forgets to link with -lpthread, which is
 > +required by libtirpc.
 > +
 > +A recent patch was sent to libtirpc to add that missing -lpthread in its
 > +Libs.private section of its .pc file. Thus, pkg-config will soon be able
 > +to return the appropriate libraries.
 > +
 > +So, use pkg-config to find libtirpc.
 > +
 > +And for older libtirpc versions, there is no change in behaviour: we're
 > +still missing the -lpthread. But once libtirpc has been fixed, we'll
 > +automatically get that missing library for free! :-)
 > +
 > +Remove the --with-libirpc flag as it is no longer needed: pkg-config

This should probably have been --with-tirpcinclude, right?

Other than that the series looks good - Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 4/4 v2] package/nfs-utils: use pkg-config to find libtirpc
  2014-11-27 22:28   ` Peter Korsgaard
@ 2014-11-27 22:35     ` Yann E. MORIN
  0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2014-11-27 22:35 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2014-11-27 23:28 +0100, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> 
>  > Fixes:
>  >     http://autobuild.buildroot.net/results/17d/17d1d94e6f1617851e374f4fe9804f1e5ea9e99f/
>  >     http://autobuild.buildroot.net/results/c08/c08b7be40c8f208147a4f95ad897e4a1df7e108d/
>  >     and probably some others as well...
> 
>  > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  > ---
>  >  package/nfs-utils/0008-tirpc-with-pkgconfig.patch | 102 ++++++++++++++++++++++
>  >  package/nfs-utils/nfs-utils.mk                    |   2 +-
>  >  2 files changed, 103 insertions(+), 1 deletion(-)
>  >  create mode 100644 package/nfs-utils/0008-tirpc-with-pkgconfig.patch
> 
>  > diff --git a/package/nfs-utils/0008-tirpc-with-pkgconfig.patch b/package/nfs-utils/0008-tirpc-with-pkgconfig.patch
>  > new file mode 100644
>  > index 0000000..62c820b
>  > --- /dev/null
>  > +++ b/package/nfs-utils/0008-tirpc-with-pkgconfig.patch
>  > @@ -0,0 +1,102 @@
>  > +From 1ecd1f2008bfab7bb3cd6ada135c980414a7f1ba Mon Sep 17 00:00:00 2001
>  > +From: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  > +Date: Sun, 23 Nov 2014 15:53:56 +0100
>  > +Subject: [PATCH] configure: use pkg-config to find libtirpc
>  > +
>  > +Currently, we use a custom function to find libtirpc's headers and
>  > +libraries. This works fine for shared linking.
>  > +
>  > +But for static linking, this forgets to link with -lpthread, which is
>  > +required by libtirpc.
>  > +
>  > +A recent patch was sent to libtirpc to add that missing -lpthread in its
>  > +Libs.private section of its .pc file. Thus, pkg-config will soon be able
>  > +to return the appropriate libraries.
>  > +
>  > +So, use pkg-config to find libtirpc.
>  > +
>  > +And for older libtirpc versions, there is no change in behaviour: we're
>  > +still missing the -lpthread. But once libtirpc has been fixed, we'll
>  > +automatically get that missing library for free! :-)
>  > +
>  > +Remove the --with-libirpc flag as it is no longer needed: pkg-config
> 
> This should probably have been --with-tirpcinclude, right?

Yes, probably, yes. I'll wait news from upstream to see if they choke on
this typo. ;-)

> Other than that the series looks good - Committed, thanks.

Thanks!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

end of thread, other threads:[~2014-11-27 22:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-27 21:28 [Buildroot] [pull request v2] nfs-utils: fix static build Yann E. MORIN
2014-11-27 21:28 ` [Buildroot] [PATCH 1/4 v2] package/libtirpc: rename patches Yann E. MORIN
2014-11-27 21:28 ` [Buildroot] [PATCH 2/4 v2] package/libtirpc: add -pthread to the private libraries Yann E. MORIN
2014-11-27 21:28 ` [Buildroot] [PATCH 3/4 v2] package/nfs-utils: rename patches Yann E. MORIN
2014-11-27 21:28 ` [Buildroot] [PATCH 4/4 v2] package/nfs-utils: use pkg-config to find libtirpc Yann E. MORIN
2014-11-27 22:28   ` Peter Korsgaard
2014-11-27 22:35     ` 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