All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Boeckel <mathstuf@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/1] taskd: support linking against static gnutls and uuid
Date: Tue, 21 Jun 2016 22:19:46 -0400	[thread overview]
Message-ID: <20160622021946.30144-1-mathstuf@gmail.com> (raw)
In-Reply-To: <20160617020836.9765-1-mathstuf@gmail.com>

The FindGnuTLS module shipped with CMake does not expose the information
required for proper linking if it is a static library.

Similarly, the code which searches for the uuid library is insufficient
for such a task.

Also, find_package(Threads) was missing, so pthreads was not properly
linked.

Do not send this patch to taskwarrior upstream; it is not a proper fix.

Fixes:
http://autobuild.buildroot.net/results/67f574af0cc4348ffe2bce026c44766e49c29124/

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
---
Changes v1 -> v2:
  - renamed patch to be 0002- for unambiguous application order
  - added SoB to taskd patch (with admonition that it is a hack) (via Baruch)
---
 ...ix-linking-against-deps-statically-on-arc.patch | 53 ++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 package/taskd/0002-buildroot-fix-linking-against-deps-statically-on-arc.patch

diff --git a/package/taskd/0002-buildroot-fix-linking-against-deps-statically-on-arc.patch b/package/taskd/0002-buildroot-fix-linking-against-deps-statically-on-arc.patch
new file mode 100644
index 0000000..6983f37
--- /dev/null
+++ b/package/taskd/0002-buildroot-fix-linking-against-deps-statically-on-arc.patch
@@ -0,0 +1,53 @@
+From b916016eaf3a3bdb555de11610c0b7964d52da96 Mon Sep 17 00:00:00 2001
+From: Ben Boeckel <mathstuf@gmail.com>
+Date: Thu, 16 Jun 2016 21:58:47 -0400
+Subject: [PATCH] buildroot: fix linking against deps statically on arc
+
+Also find the Threads package so that CMAKE_THREAD_LIBS_INIT is actually
+set.
+
+Do not send upstream; it is a hack.
+
+Signed-off-by:: Ben Boeckel <mathstuf@gmail.com>
+---
+ CMakeLists.txt     | 4 ++--
+ src/CMakeLists.txt | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9a049b0..09f3209 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,7 +49,7 @@ find_package (GnuTLS REQUIRED)
+ if (GNUTLS_FOUND)
+   set (HAVE_LIBGNUTLS true)
+   set (TASKD_INCLUDE_DIRS ${TASKD_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIR})
+-  set (TASKD_LIBRARIES    ${TASKD_LIBRARIES}    ${GNUTLS_LIBRARIES})
++  set (TASKD_LIBRARIES    ${TASKD_LIBRARIES}    ${PC_GNUTLS_STATIC_LIBRARIES})
+ endif (GNUTLS_FOUND)
+ 
+ check_function_exists (timegm          HAVE_TIMEGM)
+@@ -68,7 +68,7 @@ else (DARWIN OR FREEBSD OR OPENBSD)
+   find_library (UUID_LIBRARY NAMES uuid)
+   if (UUID_INCLUDE_DIR AND UUID_LIBRARY)
+     set (TASKD_INCLUDE_DIRS ${TASKD_INCLUDE_DIRS} ${UUID_INCLUDE_DIR})
+-    set (TASKD_LIBRARIES    ${TASKD_LIBRARIES}    ${UUID_LIBRARY})
++    set (TASKD_LIBRARIES    ${TASKD_LIBRARIES}    ${UUID_LIBRARY} -lintl)
+     # Look for uuid_unparse_lower
+     set (CMAKE_REQUIRED_INCLUDES  ${CMAKE_REQUIRED_INCLUDES}  ${UUID_INCLUDE_DIR})
+     set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${UUID_LIBRARY})
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 5820392..243b0f9 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -35,6 +35,7 @@ add_library (taskd admin.cpp
+                    util.cpp       util.h
+                    wcwidth6.cpp)
+ 
++find_package(Threads REQUIRED)
+ add_executable (taskd_executable taskd.cpp)
+ target_link_libraries (taskd_executable taskd ${TASKD_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+ set_property (TARGET taskd_executable PROPERTY OUTPUT_NAME "taskd")
+-- 
+2.9.0
+
-- 
2.9.0

  parent reply	other threads:[~2016-06-22  2:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  2:08 [Buildroot] [PATCH 1/1] taskd: support linking against static gnutls and uuid Ben Boeckel
2016-06-17  3:22 ` Baruch Siach
2016-06-17  4:24   ` Ben Boeckel
2016-06-17  4:32     ` Baruch Siach
2016-06-22  2:19 ` Ben Boeckel [this message]
2016-07-03 16:51   ` [Buildroot] [PATCH v2 " Samuel Martin
2016-08-05  3:17     ` Ben Boeckel

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=20160622021946.30144-1-mathstuf@gmail.com \
    --to=mathstuf@gmail.com \
    --cc=buildroot@busybox.net \
    /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.