[lxc-devel] [go-lxc/v2] [dontmerge][rfc] Try to make static linking work (fails)

hallyn on Github lxc-bot at linuxcontainers.org
Wed Jun 12 04:40:44 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 1151 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190611/357656f1/attachment.bin>
-------------- next part --------------
From ea1eaafdf37ca77759c773486602a39a07411bd3 Mon Sep 17 00:00:00 2001
From: Serge Hallyn <shallyn at cisco.com>
Date: Wed, 12 Jun 2019 04:06:00 +0000
Subject: [PATCH] Try to make static linking work (fails)

---
 linking_static.go | 4 +++-
 lxc-binding.go    | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/linking_static.go b/linking_static.go
index 89f06b4..49bdbd7 100644
--- a/linking_static.go
+++ b/linking_static.go
@@ -6,5 +6,7 @@
 
 package lxc
 
-// #cgo LDFLAGS: -static -llxc -lseccomp -lutil -lcap
+// #cgo LDFLAGS: -static -llxc -lutil -lselinux -lcap -lseccomp
+// #cgo pkg-config: lxc libseccomp libselinux libcap gnutls
+// #include <selinux/selinux.h>
 import "C"
diff --git a/lxc-binding.go b/lxc-binding.go
index 61462a1..fed6bb0 100644
--- a/lxc-binding.go
+++ b/lxc-binding.go
@@ -6,7 +6,7 @@
 
 package lxc
 
-// #cgo pkg-config: lxc
+// #cgo pkg-config: lxc libseccomp libselinux libcap gnutls
 // #include <lxc/lxccontainer.h>
 // #include <lxc/version.h>
 // #include "lxc-binding.h"


More information about the lxc-devel mailing list