All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/runc: use BR_PATH to find pkg-config
@ 2016-07-07 18:39 Romain Naour
  2016-07-07 18:39 ` [Buildroot] [PATCH 2/3] package/runc: fix shared only build when libseccomp is enabled Romain Naour
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Romain Naour @ 2016-07-07 18:39 UTC (permalink / raw)
  To: buildroot

When BR2_PACKAGE_LIBSECCOMP is set, go will try to find libseccomp
library using pkg-config. But pkg-config is not in the PATH when go
is called during the runc build.

Set the correct PATH in RUNC_MAKE_ENV.

Fixes:
http://autobuild.buildroot.net/results/fea/fea069fec671b32bffd3d133898d71d45abab552

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Christian Stewart <christian@paral.in>
---
 package/runc/runc.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/runc/runc.mk b/package/runc/runc.mk
index c4e75dd..1396e0c 100644
--- a/package/runc/runc.mk
+++ b/package/runc/runc.mk
@@ -15,7 +15,8 @@ RUNC_GOPATH = "$(@D)/Godeps/_workspace"
 RUNC_MAKE_ENV = $(HOST_GO_TARGET_ENV) \
 	CGO_ENABLED=1 \
 	GOBIN="$(@D)/bin" \
-	GOPATH="$(RUNC_GOPATH)"
+	GOPATH="$(RUNC_GOPATH)" \
+	PATH=$(BR_PATH)
 
 RUNC_GLDFLAGS = \
 	-X main.gitCommit=$(RUNC_VERSION) \
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [Buildroot] [PATCH 3/3] package/runc: disable for static only build
@ 2016-07-07 18:45 Romain Naour
  0 siblings, 0 replies; 14+ messages in thread
From: Romain Naour @ 2016-07-07 18:45 UTC (permalink / raw)
  To: buildroot

When build statically, runc try to link against Scrt1.o which is not
provided by a toolchain for static build only.

[...]arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find Scrt1.o: No such file or directory
collect2: error: ld returned 1 exit status

Add the reverse dependency on docker-containerd.

Remove the static case handling for runc.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Christian Stewart <christian@paral.in>
---
 package/docker-containerd/Config.in | 6 ++++--
 package/runc/Config.in              | 5 +++--
 package/runc/runc.mk                | 5 -----
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/package/docker-containerd/Config.in b/package/docker-containerd/Config.in
index 99af917..6615c5f 100644
--- a/package/docker-containerd/Config.in
+++ b/package/docker-containerd/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_DOCKER_CONTAINERD
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # util-linux
 	depends on BR2_USE_WCHAR # util-linux
+	depends on !BR2_STATIC_LIBS # runc
 	select BR2_PACKAGE_RUNC # runtime dependency
 	select BR2_PACKAGE_UTIL_LINUX # runtime dependency
 	select BR2_PACKAGE_UTIL_LINUX_BINARIES
@@ -16,8 +17,9 @@ config BR2_PACKAGE_DOCKER_CONTAINERD
 
 	  https://github.com/docker/containerd
 
-comment "docker-containerd needs a toolchain w/ threads, wchar"
+comment "docker-containerd needs a toolchain w/ dynamic library, threads, wchar"
 	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
 	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR \
+		 || BR2_STATIC_LIBS
diff --git a/package/runc/Config.in b/package/runc/Config.in
index fd5dee7..8b6d003 100644
--- a/package/runc/Config.in
+++ b/package/runc/Config.in
@@ -3,13 +3,14 @@ config BR2_PACKAGE_RUNC
 	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
 	depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_STATIC_LIBS
 	help
 	  runC is a CLI tool for spawning and running containers
 	  according to the OCP specification.
 
 	  https://github.com/opencontainers/runc
 
-comment "runc needs a toolchain w/ threads"
+comment "runc needs a toolchain w/ dynamic library, threads"
 	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS && \
 		BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
diff --git a/package/runc/runc.mk b/package/runc/runc.mk
index 66f234f..0032017 100644
--- a/package/runc/runc.mk
+++ b/package/runc/runc.mk
@@ -23,11 +23,6 @@ RUNC_GLDFLAGS = \
 
 RUNC_GOTAGS = cgo
 
-ifeq ($(BR2_STATIC_LIBS),y)
-RUNC_GOTAGS += static_build
-RUNC_GLDFLAGS += -extldflags '-static'
-endif
-
 ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
 RUNC_GOTAGS += seccomp
 RUNC_DEPENDENCIES += libseccomp host-pkgconf
-- 
2.5.5

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

end of thread, other threads:[~2016-07-24 14:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07 18:39 [Buildroot] [PATCH 1/3] package/runc: use BR_PATH to find pkg-config Romain Naour
2016-07-07 18:39 ` [Buildroot] [PATCH 2/3] package/runc: fix shared only build when libseccomp is enabled Romain Naour
2016-07-08 19:27   ` Thomas Petazzoni
2016-07-08 19:32     ` Christian Stewart
2016-07-08 19:50       ` Thomas Petazzoni
2016-07-08 19:55         ` Christian Stewart
2016-07-11  9:47           ` Thomas Petazzoni
2016-07-13 21:18           ` Romain Naour
2016-07-24 14:45   ` Thomas Petazzoni
2016-07-07 18:39 ` [Buildroot] [PATCH 3/3] package/runc: disable for static only build Romain Naour
2016-07-08 19:47   ` Thomas Petazzoni
2016-07-24 14:49     ` Thomas Petazzoni
2016-07-08 19:22 ` [Buildroot] [PATCH 1/3] package/runc: use BR_PATH to find pkg-config Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2016-07-07 18:45 [Buildroot] [PATCH 3/3] package/runc: disable for static only build Romain Naour

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.