Error making mozc-ut-common when using yay

I’m trying to install ibus-mozc-ut which required mozc-ut-common, but mozc-ut-common failed to build when using yay or makepkg -sric in yay .cache directory (/home/non/.cache/yay/mozc-ut-common).

Here’s the weird thing. If I manually git clone https://aur.archlinux.org/mozc-ut-common.git in other directory (e.g. ~/.cache/mozc-ut-common or ~/Downloads/buildpkg/mozc-ut-common) then run makepkg -sric it start building without problem.

From the error it’s seem that the build is trying to use ccache but it’s not available. I had enabled ccache in the past trying to improve kernel compiling time but found no benefit so I disabled ccache in makepkg.conf and already uninstalled ccache. But maybe I’m missing something?

Other packages from AUR like linux-xanmod or pamac can be built and installed with no problem.

Other thing I have tried

  • delete yay .cache directory (/home/non/.cache/yay)

The error.

[non@nephren ~]$ yay -S mozc-ut-common
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1]  mozc-ut-common-2.26.4538.102.20211031-1

  1 mozc-ut-common                   (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: PKGBUILD up to date, Skipping (1/0): mozc-ut-common
  1 mozc-ut-common                   (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
:: (1/1) Parsing SRCINFO: mozc-ut-common
==> Making package: mozc-ut-common 2.26.4538.102.20211031-1 (Fri Nov 19 14:28:11 2021)
==> Retrieving sources...
  -> Updating mozc-ut-common-git git repo...
Fetching origin
  -> Found mozcdic-ut-20211031.tar.bz2
==> Validating source files with sha256sums...
    mozc-ut-common-git ... Skipped
    mozcdic-ut-20211031.tar.bz2 ... Passed
==> Making package: mozc-ut-common 2.26.4538.102.20211031-1 (Fri Nov 19 14:28:13 2021)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating mozc-ut-common-git git repo...
Fetching origin
  -> Found mozcdic-ut-20211031.tar.bz2
==> Validating source files with sha256sums...
    mozc-ut-common-git ... Skipped
    mozcdic-ut-20211031.tar.bz2 ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of mozc-ut-common-git git repo...
Cloning into 'mozc-ut-common-git'...
done.
Switched to a new branch 'makepkg'
  -> Extracting mozcdic-ut-20211031.tar.bz2 with bsdtar
==> Starting prepare()...
Submodule 'src/third_party/abseil-cpp' (https://github.com/abseil/abseil-cpp.git) registered for path 'src/third_party/abseil-cpp'
Submodule 'src/third_party/breakpad' (https://chromium.googlesource.com/breakpad/breakpad) registered for path 'src/third_party/breakpad'
Submodule 'src/third_party/gtest' (https://github.com/google/googletest.git) registered for path 'src/third_party/gtest'
Submodule 'src/third_party/gyp' (https://chromium.googlesource.com/external/gyp) registered for path 'src/third_party/gyp'
Submodule 'src/third_party/japanese_usage_dictionary' (https://github.com/hiroyuki-komatsu/japanese-usage-dictionary.git) registered for path 'src/third_party/japanese_usage_dictionary'
Submodule 'src/third_party/jsoncpp' (https://github.com/open-source-parsers/jsoncpp.git) registered for path 'src/third_party/jsoncpp'
Submodule 'src/third_party/protobuf' (https://github.com/google/protobuf.git) registered for path 'src/third_party/protobuf'
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/abseil-cpp'...
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/breakpad'...
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/gtest'...
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/gyp'...
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/japanese_usage_dictionary'...
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/jsoncpp'...
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/protobuf'...
Submodule path 'src/third_party/abseil-cpp': checked out 'e1d388e7e74803050423d035e4374131b9b57919'
Submodule path 'src/third_party/breakpad': checked out '216cea7bca53fa441a3ee0d0f5fd339a3a894224'
Submodule path 'src/third_party/gtest': checked out '703bd9caab50b139428cea1aaff9974ebee5742e'
Submodule path 'src/third_party/gyp': checked out 'caa60026e223fc501e8b337fd5086ece4028b1c6'
Submodule path 'src/third_party/japanese_usage_dictionary': checked out 'e5b3425575734c323e1d947009dd74709437b684'
Submodule path 'src/third_party/jsoncpp': checked out '11086dd6a7eba04289944367ca82cea71299ed70'
Submodule path 'src/third_party/protobuf': checked out 'fde7cf7358ec7cd69e8db9be4f1fa6a5c431386a'
Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'src/third_party/protobuf/third_party/benchmark'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'src/third_party/protobuf/third_party/googletest'
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/protobuf/third_party/benchmark'...
Cloning into '/home/non/.cache/yay/mozc-ut-common/src/mozc-ut-common-git/src/third_party/protobuf/third_party/googletest'...
Submodule path 'src/third_party/protobuf/third_party/benchmark': checked out '5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8'
Submodule path 'src/third_party/protobuf/third_party/googletest': checked out '5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081'
==> Sources are ready.
==> Making package: mozc-ut-common 2.26.4538.102.20211031-1 (Fri Nov 19 14:28:46 2021)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
Starting local Bazel server and connecting to it...
INFO: Analyzed 2 targets (99 packages loaded, 4044 targets configured).
INFO: Found 2 targets...
ERROR: /home/non/.cache/bazel/_bazel_non/c12af9d35e7f4434741b97dad0c0dbc7/external/zlib/BUILD.bazel:31:11: Compiling inffast.c failed: (Exit 1): gcc failed: error executing command /usr/lib/ccache/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 28 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
src/main/tools/linux-sandbox-pid1.cc:403: "execvp(/usr/lib/ccache/bin/gcc, 0x557d3f8e2070)": No such file or directory
INFO: Elapsed time: 4.410s, Critical Path: 0.06s
INFO: 7 processes: 7 internal.
FAILED: Build did NOT complete successfully
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: mozc-ut-common

current /etc/makepkg.conf

#!/hint/bash
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
          'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
          'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
          'rsync::/usr/bin/rsync --no-motd -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget

#-- The package required by makepkg to download VCS sources
#  Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
            'fossil::fossil'
            'git::git'
            'hg::mercurial'
            'svn::subversion')

#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
#CPPFLAGS=""
CFLAGS="-march=native -mtune=native -O3 -pipe -fno-plt -fexceptions \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
RUSTFLAGS="-C opt-level=3 -C target-cpu=native"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j9"
#-- Debugging flags
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
#DEBUG_RUSTFLAGS="-C debuginfo=2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
#  A negated environment option will do the opposite of the comments below.
#
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#-- check:    Run the check() function if present in the PKGBUILD
#-- sign:     Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
#  A negated option will do the opposite of the comments below.
#
#-- strip:      Strip symbols from binaries/libraries
#-- docs:       Save doc directories specified by DOC_DIRS
#-- libtool:    Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs:  Leave empty directories in packages
#-- zipman:     Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge:      Remove files specified by PURGE_TARGETS
#-- debug:      Add debugging flags as specified in DEBUG_* variables
#-- lto:        Add compile flags for building with link time optimization
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)

#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"

#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""

#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSZST=(zstd -c -z -q -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'

#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
#PACMAN_AUTH=()

I found solution… delete ~/.cache/bazel solve the issues.

Feeling weird finding the solution right after posting this. When I was trying to solve the problem by myself for 2 days. LOL.

Still confused why git clone and makepkg in other directory worked without problem.

1 Like

You’re finding out that building with an AUR helper can be affected by what’s currently on your system. Arch packages are normally built in a “clean chroot” to avoid this sort of issue, e.g. using makechrootpkg (or aurutils if you want some automation).

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.