The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/4979

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
It seems that Go does not do that by itself, so for example if clang is
installed instead of gcc, make fails with:

free@x1:/srv/src/go/src/github.com/lxc/lxd$ make
go get -t -v -d ./...
go install -v -tags "libsqlite3"  ./...
github.com/lxc/lxd/lxd
exec: "gcc": executable file not found in $PATH

This change explicitely pass $CC to go install.

Signed-off-by: Free Ekanayaka <[email protected]>
From af4567d9a53e3e43b2ce29f171d1091a785bd256 Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <[email protected]>
Date: Mon, 27 Aug 2018 10:46:09 +0200
Subject: [PATCH] Honor the CC environment variable when invoking go install

It seems that Go does not do that by itself, so for example if clang is
installed instead of gcc, make fails with:

free@x1:/srv/src/go/src/github.com/lxc/lxd$ make
go get -t -v -d ./...
go install -v -tags "libsqlite3"  ./...
github.com/lxc/lxd/lxd
exec: "gcc": executable file not found in $PATH

This change explicitely pass $CC to go install.

Signed-off-by: Free Ekanayaka <[email protected]>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index f4cb3fa62e..415f52a566 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ ifeq ($(TAG_SQLITE3),)
 endif
 
        go get -t -v -d ./...
-       go install -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./...
+       CC=$(CC) go install -v -tags "$(TAG_SQLITE3)" $(DEBUG) ./...
        @echo "LXD built successfully"
 
 .PHONY: client
@@ -83,7 +83,7 @@ ifeq ($(TAG_SQLITE3),)
 endif
 
        go get -t -v -d ./...
-       go install -v -tags "$(TAG_SQLITE3) logdebug" $(DEBUG) ./...
+       CC=$(CC) go install -v -tags "$(TAG_SQLITE3) logdebug" $(DEBUG) ./...
        @echo "LXD built successfully"
 
 .PHONY: check
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to