You are not logged in.

#1 2019-05-06 12:45:19

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 272
Website

SOLVED: LXD fails to build

SOLUTION:

See the post by loqs below.

***

Upgrading the hard drive on my LXD server and LXD will not build.  I was unable to capture the full screen output but here is what I am seeing:

pamac build lxd

github.com/lxc/lxd/lxd/cluster
# github.com/lxc/lxd/lxd/cluster
lxd/cluster/raft.go:101:16: cannot use raftLogger (type *log.Logger) as type hclog.Logger in assignment:
*log.Logger does not implement hclog.Logger (missing Debug method)
make: *** [Makefile:19: default] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

LXD in the AUR does not appear to have changed since I installed it on my old drive:

pamac info lxd (to be built)

Name                 : lxd
Version              : 3.12-1
Description          : REST API, command line tool and OpenStack integration plugin for LXC.
URL                  : https://github.com/lxc/lxd
Licenses             : Apache
Repository           : AUR
Depends On           : lxc squashfs-tools dnsmasq libuv
Make Dependencies    : go git tcl patchelf
Optional Dependencies: lvm2 [Installed]
                       thin-provisioning-tools [Installed]
                       btrfs-progs
                       ceph
Provides             : lxd
Conflicts With       : lxd-git lxd-lts
Maintainer           : maikoool
First Submitted      : 02/29/2016
Last Modified        : 04/05/2019
Votes                : 51

pamac info lxd (old drive)

Name                 : lxd
Version              : 3.12-1
Description          : REST API, command line tool and OpenStack integration plugin for LXC.
URL                  : https://github.com/lxc/lxd
Licenses             : APACHE
Repository           : AUR
Size                 : 151.4 MB
Depends On           : lxc squashfs-tools dnsmasq libuv
Optional Dependencies: lvm2: for lvm2 support [Installed]
                       thin-provisioning-tools: for thin provisioning support [Installed]
                       btrfs-progs: for btrfs storage driver support
                       ceph: for ceph storage driver support
Provides             : lxd
Conflicts With       : lxd-git lxd-lts
Packager             : Unknown Packager
Build Date           : 04/28/2019
Install Date         : 04/28/2019
Install Reason       : Explicitly installed

What could I be doing wrong?

Last edited by lenhuppe (2019-05-08 01:17:42)


Why do we drive on the parkway and then park in the driveway?

Offline

#2 2019-05-06 18:42:28

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: SOLVED: LXD fails to build

You appear to be building with an AUR helper.  Don't do that. Use makepkg or devtools.  That said, when building an a clean-chroot, I get the same error you are seeing.  Ask on the AUR or upstream.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2019-05-06 18:49:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: SOLVED: LXD fails to build

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2019-05-06 19:58:05

loqs
Member
Registered: 2014-03-06
Posts: 17,365

Re: SOLVED: LXD fails to build

https://github.com/lxc/lxd/commit/76dd2 … 2983e30035 This successfully builds the package locally.  (it does not pin any of the dependencies)

diff --git a/PKGBUILD b/PKGBUILD
index 245ddb7..10b8028 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -59,6 +59,7 @@ build() {
   export GOPATH="${srcdir}/go"
   cd "${GOPATH}/src/${_lxd}"
   git checkout lxd-${pkgver}
+  git cherry-pick -n 76dd2a64582e021faca9ca4cf3b1642983e30035
   make deps
   export CGO_CFLAGS="-I${GOPATH}/deps/sqlite/ -I${GOPATH}/deps/dqlite/include/"
   export CGO_LDFLAGS="-L${GOPATH}/deps/sqlite/.libs/ -L${GOPATH}/deps/dqlite/.libs/"

Offline

#5 2019-05-06 23:55:25

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 272
Website

Re: SOLVED: LXD fails to build

graysky wrote:

You appear to be building with an AUR helper.  Don't do that. Use makepkg or devtools.


Agreed. It's time to learn how to use the devtools. I know how to use git and makepkg. That is how I install Pamac-AUR. That's ok for some applications but not for server systems. After you posted loqs provided the answer in the form of a patch. I will learn how to apply patches and try again.

Last edited by lenhuppe (2019-05-06 23:55:55)


Why do we drive on the parkway and then park in the driveway?

Offline

#6 2019-05-08 00:14:57

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 272
Website

Re: SOLVED: LXD fails to build

loqs wrote:

https://github.com/lxc/lxd/commit/76dd2 … 2983e30035 This successfully builds the package locally.  (it does not pin any of the dependencies)

diff --git a/PKGBUILD b/PKGBUILD
index 245ddb7..10b8028 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -59,6 +59,7 @@ build() {
   export GOPATH="${srcdir}/go"
   cd "${GOPATH}/src/${_lxd}"
   git checkout lxd-${pkgver}
+  git cherry-pick -n 76dd2a64582e021faca9ca4cf3b1642983e30035
   make deps
   export CGO_CFLAGS="-I${GOPATH}/deps/sqlite/ -I${GOPATH}/deps/dqlite/include/"
   export CGO_LDFLAGS="-L${GOPATH}/deps/sqlite/.libs/ -L${GOPATH}/deps/dqlite/.libs/"

Worked like a charm on my desktop where I tested my method but not on the target server. To create the patch file I copied your post verbatim. My method was as follows:

cd ~/build
git clone https://aur.archlinux.org/lxd.git
cd lxd
vim lxd.patch
git apply --check lxd.patch
git apply lxd.patch
makepkg -sc

ithub.com/miekg/dns (download)
github.com/mpvl/subtest (download)
github.com/juju/httprequest (download)
make: *** [Makefile:71: update] Error 1
==> ERROR: A failure occurred in prepare().
    Aborting...

Did I miss something?

Last edited by lenhuppe (2019-05-08 00:30:41)


Why do we drive on the parkway and then park in the driveway?

Offline

#7 2019-05-08 00:45:07

loqs
Member
Registered: 2014-03-06
Posts: 17,365

Re: SOLVED: LXD fails to build

I can not see any mistakes and the error is coming from prepare while the change I suggested was to build which it does not reach.
Does `makepkg -Cs` work?

Offline

#8 2019-05-08 01:16:12

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 272
Website

Re: SOLVED: LXD fails to build

loqs wrote:

I can not see any mistakes and the error is coming from prepare while the change I suggested was to build which it does not reach.
Does `makepkg -Cs` work?

That did it.

Last edited by lenhuppe (2019-05-08 09:57:46)


Why do we drive on the parkway and then park in the driveway?

Offline

Board footer

Powered by FluxBB