Package Details: phrase-cli 2.28.1-1

Git Clone URL: https://aur.archlinux.org/phrase-cli.git (read-only, click to copy)
Package Base: phrase-cli
Description: Phrase CLI tool
Upstream URL: https://phrase.com/cli
Licenses: MIT
Submitter: lautat
Maintainer: lautat
Last Packager: lautat
Votes: 4
Popularity: 0.016018
First Submitted: 2021-08-24 13:03 (UTC)
Last Updated: 2024-06-18 14:00 (UTC)

Latest Comments

1 2 Next › Last »

lautat commented on 2024-02-12 18:50 (UTC)

The build should now work with lto option enabled. It is now using cgo, and that seemed to be the way that some go apps were built in official repositories. Thanks for reporting the issue!

lautat commented on 2024-02-12 18:28 (UTC)

I see that my /etc/makepkg.conf file contains a line with LTOFLAGS="-flto=auto", I have no idea where this could be coming from.

When the OPTIONS array contains lto, makepkg will append LTOFLAGS to LDFLAGS. In addition to /etc/makepkg.conf, the array could be declared in your home folder, either ~/.makepkg.conf or ~/.config/pacman/makepkg.conf.

Adding quotes around LDFLAGS seems to fix the build, but I guess that could break if LDFLAGS may contain quotes. I'll try to check what options could be used to pass flags to the linker.

gouvinb commented on 2024-02-12 16:00 (UTC)

I usually use aur/yay 12.2.0-1, but I get the same error with aur/paru 2.0.1-1.

I see that my /etc/makepkg.conf file contains a line with LTOFLAGS="-flto=auto", I have no idea where this could be coming from.

I'll investigate on my side too.

lautat commented on 2024-02-12 15:19 (UTC)

Thanks! I found the reason why the issue happens. I guess you have enabled lto option in makepkg configuration (or maybe the package manager you seem to be using has enabled it). With lto enabled, I get the same error. If you disable it temporarily (add an "!" before the option), you should be able to build the package. man 5 makepkg.conf has more information on the configuration.

I think this PKGBUILD should work with lto enabled, so I'll try to check how the issue could be fixed. Maybe the variable just needs quotes or something similar.

gouvinb commented on 2024-02-12 14:40 (UTC) (edited on 2024-02-12 14:40 (UTC) by gouvinb)

Hi!

I cloned the repository to display the _LDFLAGS variable at build time, here's what I got:

_LDFLAGS=-X github.com/phrase/phrase-cli/cmd.PHRASE_CLIENT_VERSION=2.22.0 -extldflags -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto

Checking my environment, I don't have any LDFLAGS variable set and I use extra/go 2:1.22.0-1.

lautat commented on 2024-02-12 11:43 (UTC)

Hello @gouvinb!

Thanks for reporting the issue. However, I'm struggling to reproduce it. I just tried rebuilding the package and it works for me. In case it matters, I'm using go-2:1.22.0-1 from the official extra repo. Based on the log, I suspect that the error could be related to LDFLAGS environment variable. I tried some values for the variable, but none of them resulted in build errors.

Could you share more details of your makepkg configuration, at least the LDFLAGS variable? That could help me to reproduce an fix the issue. You could also try to temporarily modify your config to remove the key or set it back to the default value, and see if that fixes the build.

gouvinb commented on 2024-02-12 10:01 (UTC) (edited on 2024-02-12 10:04 (UTC) by gouvinb)

I cannot build the 2.22.0-1 version.

Log...
        
:: Synchronizing package databases...
 core is up to date
 extra is up to date
:: Searching AUR for updates...
:: Checking development packages...
:: Searching databases for updates...
:: 1 package to upgrade/install.
1  aur/phrase-cli  2.21.2-1 -> 2.22.0-1
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==> 
AUR Explicit (1): phrase-cli-2.22.0-1
:: PKGBUILD up to date, skipping download: phrase-cli
  1 phrase-cli                       (Installed) (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
  1 phrase-cli                       (Installed) (Build Files Exist)
==> PKGBUILDs to edit?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
==> Making package: phrase-cli 2.22.0-1 (Mon Feb 12 10:56:23 2024)
==> Retrieving sources...
  -> Found phrase-cli-2.22.0.tar.gz
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with b2sums...
    phrase-cli-2.22.0.tar.gz ... Passed
:: (1/1) Parsing SRCINFO: phrase-cli
==> Making package: phrase-cli 2.22.0-1 (Mon Feb 12 10:56:23 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found phrase-cli-2.22.0.tar.gz
==> Validating source files with b2sums...
    phrase-cli-2.22.0.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting phrase-cli-2.22.0.tar.gz with bsdtar
==> Sources are ready.
==> Making package: phrase-cli 2.22.0-1 (Mon Feb 12 10:56:25 2024)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
# github.com/phrase/phrase-cli
flag provided but not defined: -flto
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: phrase-cli-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
phrase-cli - exit status 4
        
    

lautat commented on 2021-08-24 13:11 (UTC)

The upstream project has been renamed so I created a new package and the latest version is available here: https://aur.archlinux.org/packages/phrase-cli/. I will now request this package to be merged to the new one.

saveman71 commented on 2018-08-23 16:08 (UTC)

Thanks a bunch for the ultra-fast update!

lautat commented on 2018-08-23 10:47 (UTC)

Latest version, 1.9.1, still warns about outdated version when invoked: "Please consider updating the PhraseApp CLI client (1.9.0 < 1.9.1)". This seems to be a bug in 1.9.1. There is no need to worry about it.