Package Details: lazydocker 0.23.1-2

Git Clone URL: https://aur.archlinux.org/lazydocker.git (read-only, click to copy)
Package Base: lazydocker
Description: A simple terminal UI for docker and docker-compose, written in Go with the gocui library.
Upstream URL: https://github.com/jesseduffield/lazydocker
Keywords: docker lazydocker
Licenses: MIT
Submitter: mswift
Maintainer: mswift
Last Packager: mswift
Votes: 39
Popularity: 3.63
First Submitted: 2019-06-30 07:43 (UTC)
Last Updated: 2024-05-04 22:32 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

1 2 3 Next › Last »

mswift commented on 2024-05-04 22:32 (UTC)

Thanks for the fix @applebloom , and apologies for the slow resolution on this.

applebloom commented on 2024-05-04 21:06 (UTC)

The package fails to build with flag provided but not defined error message as reported earlier. This is happens when LDFLAGS contains a space (which it usually does), if you set e.g. only Wl,-O1 or -Wl,--sort-common it builds, but not if you set -Wl,-O1 -Wl,--sort-common. This is because of improper quoting it seems. Changing the last line of build function to go build -o ${pkgname} -ldflags "-extldflags \"${LDFLAGS}\" -s -w -X main.version=${pkgver}" main.go solves this issue. Here's a patch for PKGBUILD:

diff -u lazydocker/PKGBUILD lazydocker.fixed/PKGBUILD
--- lazydocker/PKGBUILD 2024-05-04 22:57:48.813575391 +0200
+++ lazydocker.fixed/PKGBUILD   2024-05-04 22:54:56.911773236 +0200
@@ -16,7 +16,7 @@
     export CGO_CFLAGS="${CFLAGS}"
     export CGO_CXXFLAGS="${CXXFLAGS}"
     export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
-    go build -o ${pkgname} -ldflags "-extldflags ${LDFLAGS} -s -w -X main.version=${pkgver}" main.go
+    go build -o ${pkgname} -ldflags "-extldflags \"${LDFLAGS}\" -s -w -X main.version=${pkgver}" main.go
 }

 package() {

vini.nu commented on 2024-05-01 12:51 (UTC)

Doesn't build.

go: downloading github.com/docker/go-units v0.4.0
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/docker/distribution v2.8.2+incompatible
go: downloading golang.org/x/net v0.17.0
# command-line-arguments
flag provided but not defined: -Wl,--sort-common
usage: link [options] main.o
  -B note
        add an ELF NT_GNU_BUILD_ID note when using ELF; use "gobuildid" to generate it from the Go build ID
  -E entry
        set entry symbol name
  -H type
        set header type
  -I linker
        use linker as ELF dynamic linker
  -L directory
        add specified directory to library path
  -R quantum
        set address rounding quantum (default -1)
  -T int
        set the start address of text symbols (default -1)
  -V    print version and exit
  -X definition
        add string value definition of the form importpath.name=value
  -a    no-op (deprecated)
  -asan
        enable ASan interface
  -aslr
        enable ASLR for buildmode=c-shared on windows (default true)
  -benchmark string
        set to 'mem' or 'cpu' to enable phase benchmarking
  -benchmarkprofile base
        emit phase profiles to base_phase.{cpu,mem}prof
  -buildid id
        record id as Go toolchain build id
  -buildmode mode
        set build mode
  -c    dump call graph
  -capturehostobjs string
        capture host object files loaded during internal linking to specified dir
  -compressdwarf
        compress DWARF if possible (default true)
  -cpuprofile file
        write cpu profile to file
  -d    disable dynamic executable
  -debugnosplit
        dump nosplit call graph
  -debugtextsize int
        debug text section max size
  -debugtramp int
        debug trampolines
  -dumpdep
        dump symbol dependency graph
  -extar string
        archive program for buildmode=c-archive
  -extld linker
        use linker when linking in external mode
  -extldflags flags
        pass flags to external linker
  -f    ignore version mismatch
  -g    disable go package data checks
  -h    halt on error
  -importcfg file
        read import configuration from file
  -installsuffix suffix
        set package directory suffix
  -k symbol
        set field tracking symbol
  -libgcc string
        compiler support lib for internal linking; use "none" to disable
  -linkmode mode
        set link mode
  -linkshared
        link against installed Go shared libraries
  -memprofile file
        write memory profile to file
  -memprofilerate rate
        set runtime.MemProfileRate to rate
  -msan
        enable MSan interface
  -n    no-op (deprecated)
  -o file
        write output to file
  -pluginpath string
        full path name for plugin
  -pruneweakmap
        prune weak mapinit refs (default true)
  -r path
        set the ELF dynamic linker search path to dir1:dir2:...
  -race
        enable race detector
  -s    disable symbol table
  -strictdups int
        sanity check duplicate symbol contents during object file reading (1=warn 2=err).
  -tmpdir directory
        use directory for temporary files
  -v    print link trace
  -w    disable DWARF generation
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: lazydocker-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
lazydocker - exit status 4
$

tutteplutt commented on 2024-03-28 21:47 (UTC)

I also could not build the package initially, just as @andy5995 and @FichteFoll.

I managed to get it working by omitting ${LDFLAGS} in the build function of the PKGBUILD file. Don't know what I am doing though :)

andy5995 commented on 2024-03-19 09:01 (UTC)

On Manjaro, this doesn't build due to the same error mentioned by FichteFoll below.

FichteFoll commented on 2024-02-26 11:18 (UTC) (edited on 2024-02-26 11:18 (UTC) by FichteFoll)

…
go: downloading github.com/gogo/protobuf v1.3.2
go: downloading github.com/docker/distribution v2.8.2+incompatible
go: downloading golang.org/x/net v0.17.0
# command-line-arguments
flag provided but not defined: -Wl,--sort-common
usage: link [options] main.o
  -B note
        add an ELF NT_GNU_BUILD_ID note when using ELF; use "gobuildid" to generate it from the Go build ID
…
==> ERROR: A failure occurred in build().
    Aborting...

SunRed commented on 2023-04-04 10:14 (UTC)

Please add options=('!lto') to the PKGBUILD as it doesn't build with LTO enabled.

flipee commented on 2020-12-16 22:10 (UTC)

There may be multiple versions of GCC installed. I think -fno-plt is supported starting GCC 6.

mswift commented on 2020-12-16 21:36 (UTC)

I was attempting to track down the issues @Posi was experiencing, and as part of it I looked to reproduce the build being done in lazydocker's Dockerfile.

However, I've just found that in their CI/CD pipeline they are building with CGO enabled, so I am willing to re-enable CGO in this build process.

flipee commented on 2020-12-16 21:22 (UTC)

What is the purpose of disabling CGO?