You are not logged in.

#1 2021-08-22 19:56:13

br0tatos
Member
Registered: 2021-08-22
Posts: 5

Global PKGBUILD Failing on Install

I'm trying to compile Global with exuberant-ctags support, and the package fails to install at the very last step with the following error:

error: failed to commit transaction (conflicting files)
global: /usr/local/share/man exists in filesystem (owned by filesystem)
Errors occurred, no packages were upgraded.

Here's the PKGBUILD:

# Maintainer: Robin Choudhury <meditation1@pm.me>
pkgname=global
pkgver=6.6.7
pkgrel=1
pkgdesc="Global compiled with ctags set"
arch=('any')
url="https://www.gnu.org/software/global/"
license=('GPL')
conflicts=('global')
depends=('emacs' 'ctags' 'libltdl' 'perl' 'python' 'sqlite')
#install=$pkgname.install
source=("https://ftp.gnu.org/pub/gnu/global/global-${pkgver}.tar.gz")
md5sums=('b55bee959c826dc3cb844144e4d56ef4')



prepare() {
   tar -xvf "global-${pkgver}.tar.gz"
}

build() {
   echo 'build'
   cd $srcdir/$pkgname-$pkgver
   sh reconf.sh
   ./configure --prefix="$pkgdir/usr/local/" --with-exuberant-ctags="$(which ctags)"
   make
}

package() {
   cd $srcdir/$pkgname-$pkgver
   make DESTDIR="$pkgdir/usr/local/" install
}

Offline

#2 2021-08-22 20:04:54

loqs
Member
Registered: 2014-03-06
Posts: 18,788

Re: Global PKGBUILD Failing on Install

https://github.com/archlinux/svntogit-c … k/PKGBUILD is already built with exuberant-ctags support.
PKGBUILDs must not install files under $pkgdir/usr/local,  use the standard prefix /usr or /opt.

Offline

#3 2021-08-22 20:45:04

br0tatos
Member
Registered: 2021-08-22
Posts: 5

Re: Global PKGBUILD Failing on Install

Universal ctags don't appear to work with the community provided package:

➜ gtags -v                                                                                                                             13:34:22
[Sun Aug 22 13:34:31 PDT 2021] Gtags started.
 Using configuration file '/home/robin/.globalrc'.
 Using configuration label 'default'.
 Using plug-in parser.
[Sun Aug 22 13:34:31 PDT 2021] Creating 'GTAGS' and 'GRTAGS'.
 [1] extracting tags of foo.py
 [2] extracting tags of main.c
gtags: Universal Ctags not found. Please see ./configure --help

And here's a link to my global rc (note that the C parser is set to Universal whereas the rest use exuberant) - http://sprunge.us/9ylYK3

Exuberant tags work but universal doesn't for whatever reason.

Offline

#4 2021-08-22 21:27:17

loqs
Member
Registered: 2014-03-06
Posts: 18,788

Re: Global PKGBUILD Failing on Install

Are you using a custom ctags package built from the exuberant source to provide /usr/bin/ctags?

Offline

#5 2021-08-22 21:57:29

br0tatos
Member
Registered: 2021-08-22
Posts: 5

Re: Global PKGBUILD Failing on Install

Nope, I'm just using ctags installed via `sudo pacman -S ctags`

➜ ctags --version
Universal Ctags 5.9.0(p5.9.20210110.0), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jan 15 2021, 00:04:58
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc

Last edited by br0tatos (2021-08-22 21:59:51)

Offline

#6 2021-08-22 22:14:28

loqs
Member
Registered: 2014-03-06
Posts: 18,788

Re: Global PKGBUILD Failing on Install

If you rebuild ctags with the changes below (check currently fails so you may have to disable it)

diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index 0e720c5..2c36a8d 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -32,11 +32,12 @@ build() {
     --prefix=/usr \
     --sysconfdir=/etc \
     --localstatedir=/var \
-    --libexecdir=/usr/lib
+    --libexecdir=/usr/lib \
+    --enable-etags
   make
 }
 

then rebuild global with the rebuilt ctags and the following changes to the PKGBUILD

diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index d243819..f1d1a7f 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -32,7 +32,8 @@ build() {
   autoreconf -fi
   ./configure \
     --prefix=/usr \
-    --with-exuberant-ctags=/usr/bin/ctags \
+    --with-universal-ctags=/usr/bin/ctags \
+    --with-exuberant-ctags=/usr/bin/etags \
     --with-sqlite3
   make
 }

Does that add exuberant support to global?

Offline

#7 2021-08-22 22:51:54

br0tatos
Member
Registered: 2021-08-22
Posts: 5

Re: Global PKGBUILD Failing on Install

Yup, that works! How do we submit a patch for this support?

Offline

#8 2021-08-22 23:06:58

loqs
Member
Registered: 2014-03-06
Posts: 18,788

Re: Global PKGBUILD Failing on Install

I would suggest opening a bug report against global.

Offline

Board footer

Powered by FluxBB