tcf-agent: upgrade to 1.7.0
PATCH 1/1 tcf-agent: upgrade to 1.7.0
- Patches have been adopted upstream - microblaze and powerpc should build now - changed build from CMake to using plain Makefile as
CMake build doesnt seem particularly well maintained
- openssl is automatically used if available
--- ...gent-add-install-target-to-the-CMakeLists.patch | 48 ---------- ...ream-TCF-Agent-stop-stack-crawl-when-SP-0.patch | 56 +++++++++++ ...-fix-build-with-static-libcrypto-on-Linux.patch | 28 ++++++ ...-remove-explicit-uses-of-__ptrace_request.patch | 103 --------------------- ...de-canonicalize_file_name-for-all-c-libs-.patch | 46 --------- package/tcf-agent/Config.in | 5 +- package/tcf-agent/tcf-agent.hash | 2 +- package/tcf-agent/tcf-agent.mk | 42 +++++++-- 8 files changed, 121 insertions(+), 209 deletions(-) delete mode 100644 package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch create mode 100644 package/tcf-agent/0001-upstream-TCF-Agent-stop-stack-crawl-when-SP-0.patch create mode 100644 package/tcf-agent/0002-TCF-Agent-fix-build-with-static-libcrypto-on-Linux.patch delete mode 100644 package/tcf-agent/0002-linux-remove-explicit-uses-of-__ptrace_request.patch delete mode 100644 package/tcf-agent/0003-linux-provide-canonicalize_file_name-for-all-c-libs-.patch
package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch deleted +0 -48
@@ -1,48 +0,0 @@ -From 96c43b223c90746cb2f680d6d5e198afc690dd4d Mon Sep 17 00:00:00 2001 -From: Norbert Lange <[email protected]> -Date: Mon, 4 Dec 2017 10:56:45 +0100 -Subject: [PATCH] agent: add install target to the CMakeLists - -It is common for CMake packages to make sure that 'make install' -works properly, and that's what most users expect. - -More specifically, build systems such as Buildroot also expect -'make install' to do the right thing for CMake-based packages - -Signed-off-by: Norbert Lange <[email protected]> ---- - agent/CMakeLists.txt | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/agent/CMakeLists.txt b/agent/CMakeLists.txt -index aef15b96..605862b2 100644 ---- a/agent/CMakeLists.txt -+++ b/agent/CMakeLists.txt -@@ -1,6 +1,8 @@ - # -*- cmake -*- - - cmake_minimum_required(VERSION 2.8) -+project(tcfagent C) -+include(GNUInstallDirs) - - set(CMAKE_COLOR_MAKEFILE OFF) - -@@ -43,3 +45,15 @@ message(STATUS "machine:" ${TCF_MACHINE}) - - add_executable(agent tcf/main/main.c) - target_link_libraries(agent ${TCF_LIB_NAME}) -+ -+# executable and library cant have the same target name, -+# but we can rename the output -+set_target_properties(agent -+ PROPERTIES OUTPUT_NAME tcf-agent) -+ -+# add target to install all outputs -+install(TARGETS agent ${TCF_LIB_NAME} -+ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} -+) --- -2.15.1 -
package/tcf-agent/0001-upstream-TCF-Agent-stop-stack-crawl-when-SP-0.patch new file +56 -0
56 lines not on this page · raw message
package/tcf-agent/0002-TCF-Agent-fix-build-with-static-libcrypto-on-Linux.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 0007972acc45c7f397589f1d90cd65ade0519e59 Mon Sep 17 00:00:00 2001 +From: Norbert Lange <[email protected]> +Date: Wed, 28 Feb 2018 10:53:04 +0100 +Subject: [PATCH] TCF Agent: fix build with static libcrypto on Linux + +libcrypto depends on libz, so this library needs to be linked as well + +Signed-off-by: Norbert Lange <[email protected]> +--- + agent/Makefile.inc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agent/Makefile.inc b/agent/Makefile.inc +index f9f191b2..7c8cfa53 100644 +--- a/agent/Makefile.inc ++++ b/agent/Makefile.inc +@@ -81,7 +81,7 @@ endif + + ifeq ($(OPSYS),GNU/Linux) + ifeq ($(NO_SSL),) +- LIBS = -lpthread -lssl -lcrypto -lrt ++ LIBS = -lpthread -lssl -lcrypto -lz -lrt + else + LIBS = -lpthread -lrt + OPTS += -DENABLE_SSL=0 +-- +2.16.1 +
package/tcf-agent/0002-linux-remove-explicit-uses-of-__ptrace_request.patch deleted +0 -103
103 lines not on this page · raw message
package/tcf-agent/0003-linux-provide-canonicalize_file_name-for-all-c-libs-.patch deleted +0 -46
46 lines not on this page · raw message
package/tcf-agent/Config.in +2 -3
@@ -28,9 +28,8 @@ config BR2_PACKAGE_TCF_AGENT_ARCH default "i386" if BR2_i386 && !BR2_ARCH="i686" default "x86_64" if BR2_x86_64 default "powerpc" if BR2_powerpc || BR2_powerpcle -# those architectures fail to build currently -# default "ppc64" if BR2_powerpc64 || BR2_powerpc64le -# default "microblaze" if BR2_microblaze || BR2_microblazeel + default "ppc64" if BR2_powerpc64 || BR2_powerpc64le + default "microblaze" if BR2_microblaze || BR2_microblazeel config BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS bool
package/tcf-agent/tcf-agent.hash +1 -1
@@ -1,5 +1,5 @@ # Locally computed: -sha256 94e9277a52929791417d59b515235bf28ca29ffb05c9e89ad331ebc3256fb5df org.eclipse.tcf.agent-1.6.0.tar.gz +sha256 2f8c7be8a0bf7c86c72fd5680bc19a9e8f98792d40c94a0fee30ceb6428b8f33 org.eclipse.tcf.agent-1.7.0.tar.gz # Hash for license files: sha256 f82d01b74a513bd3504d08136026a5ac2a7e6ff62ebcde391fa74aa222d11ce0 agent/edl-v10.html
package/tcf-agent/tcf-agent.mk +34 -8
59 lines not on this page · raw message
Signature · 1 line
2.16.1
PATCH 1/1 tcf-agent: upgrade to 1.7.0
Hello,
Quoted 7 lines · Norbert Lange
(quoted diff) +0
-4- Patches have been adopted upstream - microblaze and powerpc should build now - changed build from CMake to using plain Makefile as CMake build doesnt seem particularly well maintained - openssl is automatically used if availableSigned-off-by Norbert Lange <[email protected]>
Thanks for this update. A few comments/questions below.
package/tcf-agent/0001-upstream-TCF-Agent-stop-stack-crawl-when-SP-0.patch line 5
Quoted 11 lines
package/tcf-agent/0001-upstream-TCF-Agent-stop-stack-crawl-when-SP-0.patch new file +5
-0@@ -0,0 +1,56 @@ +From 45d57103fe4c344b95d39bf8615b5f6bad138027 Mon Sep 17 00:00:00 2001 +From: Eugene Tarassov <[email protected]> +Date: Sat, 24 Feb 2018 16:32:09 -0800 +Subject: [PATCH] TCF Agent: stop stack crawl when SP = 0 +
We need your Signed-off-by here, and an indication that this is a backport from upstream (if that's the case).
Quoted 18 lines
package/tcf-agent/0002-TCF-Agent-fix-build-with-static-libcrypto-on-Linux.patch new file +12
-0@@ -0,0 +1,28 @@ +From 0007972acc45c7f397589f1d90cd65ade0519e59 Mon Sep 17 00:00:00 2001 +From: Norbert Lange <[email protected]> +Date: Wed, 28 Feb 2018 10:53:04 +0100 +Subject: [PATCH] TCF Agent: fix build with static libcrypto on Linux + +libcrypto depends on libz, so this library needs to be linked as well + +Signed-off-by: Norbert Lange <[email protected]> +--- + agent/Makefile.inc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +
package/tcf-agent/0002-TCF-Agent-fix-build-with-static-libcrypto-on-Linux.patch line 22
Quoted 10 lines
package/tcf-agent/0002-TCF-Agent-fix-build-with-static-libcrypto-on-Linux.patch new file +10
-0+diff --git a/agent/Makefile.inc b/agent/Makefile.inc +index f9f191b2..7c8cfa53 100644 +--- a/agent/Makefile.inc ++++ b/agent/Makefile.inc +@@ -81,7 +81,7 @@ endif + + ifeq ($(OPSYS),GNU/Linux) + ifeq ($(NO_SSL),) +- LIBS = -lpthread -lssl -lcrypto -lrt ++ LIBS = -lpthread -lssl -lcrypto -lz -lrt
It's not great because you force using -lz even in dynamic linking situations. What about instead something like this:
PKG_CONFIG ?=
ifeq ($(OPSYS),GNU/Linux)
ifeq ($(NO_SSL),)
LIBS = -lpthread -lrt
ifeq ($(PKG_CONFIG),)
LIBS += -lssl -l crypto
else
LIBS += $(shell $(PKG_CONFIG) --libs crypto)
endif endif
endif
And same for libuuid. pkg-config automatically returns the right result depending on whether dynamic linking or static linking is used.
Quoted 19 lines
package/tcf-agent/tcf-agent.mk +2
-2@@ -4,7 +4,7 @@ # ################################################################################ -TCF_AGENT_VERSION = 1.6.0 +TCF_AGENT_VERSION = 1.7.0 # the tar.xz link was broken the time this file got authored TCF_AGENT_SOURCE = org.eclipse.tcf.agent-$(TCF_AGENT_VERSION).tar.gz TCF_AGENT_SITE = http://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/snapshot@@ -12,14 +12,40 @@ TCF_AGENT_SITE = http://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/snapshot TCF_AGENT_LICENSE = BSD-3-Clause TCF_AGENT_LICENSE_FILES = agent/edl-v10.html -TCF_AGENT_DEPENDENCIES = util-linux +TCF_AGENT_DEPENDENCIES =
package/tcf-agent/tcf-agent.mk TCF_AGENT_SITE = http://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/snapshot · line 20
Quoted 10 lines
package/tcf-agent/tcf-agent.mk +3
-5TCF_AGENT_SUBDIR = agent -# there is not much purpose for the shared lib, -# if wont be used (unmodifed) outside the tcf-agent application -TCF_AGENT_CONF_OPTS = \ - -DBUILD_SHARED_LIBS=OFF \ - -DTCF_MACHINE=$(call qstrip,$(BR2_PACKAGE_TCF_AGENT_ARCH)) +# There still persists an issue with crosscompiling, +# the file agent/Makefile.inc will use the build system arch +# OPTS += -DENABLE_arch_$(shell uname -m)
And so, how is this issue fixed ?
Here, the build fails for me, it calls ranlib without arguments:
/home/thomas/projets/buildroot/output/host/bin/arm-linux-ranlib
Usage: /home/thomas/projets/buildroot/output/host/bin/arm-linux-ranlib [options] archive
Generate an index to speed access to archives
The options are:
@<file> Read options from <file> --plugin <name> Load the specified plugin -D Use zero for symbol map timestamp -U Use actual symbol map timestamp (default) -t Update the archive's symbol map timestamp -h --help Print this help message -v --version Print version information
/home/thomas/projets/buildroot/output/host/bin/arm-linux-ranlib: supported targets: elf32-littlearm elf32-bigarm elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex make[2]: *** [Makefile:53: obj/GNU/Linux/arm/Debug/libtcf.a] Error 1
make[1]: *** [package/pkg-generic.mk:224: /home/thomas/projets/buildroot/output/build/tcf-agent-1.7.0/.stamp_built] Error 2
make: *** [Makefile:79: _all] Error 2
Here is the defconfig that I have used:
BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.11-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_TCF_AGENT=y
# BR2_TARGET_ROOTFS_TAR is not set
Could you have a look ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com