You are not logged in.

#1 2010-06-23 20:34:19

flakedave
Member
Registered: 2010-06-23
Posts: 21

[Solved] Makepkg aborting after last pacman update

Hi all,

firing makepkg yields:

$ makepkg

==> ERROR: An unknown error has occurred. Exiting...

And therefore this happens also when I try building packages of the AUR with yaourt.
The problem showed up with last pacman update.

What I am I doing wrong?

Thanks for you patience,

Davide

Last edited by flakedave (2010-06-23 22:46:39)

Offline

#2 2010-06-23 20:37:31

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [Solved] Makepkg aborting after last pacman update

did you merged .pacnew files? especially makepkg.conf.pacnew


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2010-06-23 21:13:34

flakedave
Member
Registered: 2010-06-23
Posts: 21

Re: [Solved] Makepkg aborting after last pacman update

After reading your message I did... n00bism.
I had no makepkg.conf.pacnew in /etc though.
As for the others, I ran pacdiff and merged or used them as replacements.
No improvement though.

Offline

#4 2010-06-23 21:21:30

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: [Solved] Makepkg aborting after last pacman update

It's very likely that several PKGBUILDs are broken now, because makepkg will immediately abort if a command returns a non-zero code. Do you have an example that does not build?

Last edited by xduugu (2010-06-23 21:22:05)

Offline

#5 2010-06-23 21:35:46

flakedave
Member
Registered: 2010-06-23
Posts: 21

Re: [Solved] Makepkg aborting after last pacman update

Hi, thanks for replying.

Actually I have that error simply if I fire makepkg in a dir that doesn't contain a PKGBUILD file. Is that normal?

yaourt -Syu --aur gets the same error when trying to build bin32-skype with the default PKGBUILD from the AUR.
lib32-flashplugin fails to build also with the same "unknown error".

I hope this answers your question. Do you mean that PKGBUILDS in the AUR are not OK? Sorry for the naive questions...

Last edited by flakedave (2010-06-23 21:43:25)

Offline

#6 2010-06-23 21:50:27

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: [Solved] Makepkg aborting after last pacman update

At least bin32-skype is fine.

I guess makepkg -h and makepkg -V still work? If so, it could be a configuration problem indeed. Could you post your makepkg.conf?

Offline

#7 2010-06-23 21:58:42

flakedave
Member
Registered: 2010-06-23
Posts: 21

Re: [Solved] Makepkg aborting after last pacman update

Yeah, version and help are fine.

$ cat /etc/makepkg.conf 
#
# /etc/makepkg.conf
#

#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
#  Format: 'protocol::agent'
DLAGENTS=('ftp::/usr/bin/wget -c --passive-ftp -t 3 --waitretry=3 -O %o %u'
          'http::/usr/bin/wget -c -t 3 --waitretry=3 -O %o %u'
          'https::/usr/bin/wget -c -t 3 --waitretry=3 --no-check-certificate -O %o %u'
          'rsync::/usr/bin/rsync -z %u %o'
          'scp::/usr/bin/scp -C %u %o')

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

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

#-- Exclusive: will only run on x86_64
# -march (or -mcpu) builds exclusively for an architecture
# -mtune optimizes for an architecture, but builds for whole processor family
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
CXXFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
LDFLAGS="-Wl,--hash-style=gnu -Wl,--as-needed"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"

#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Defaults: BUILDENV=(fakeroot !distcc color !ccache)
#  A negated environment option will do the opposite of the comments below.
#
#-- fakeroot: Allow building packages as a non-root user
#-- distcc:   Use the Distributed C/C++/ObjC compiler
#-- color:    Colorize output messages
#-- ccache:   Use ccache to cache compilation
#
BUILDENV=(fakeroot !distcc color !ccache)
#
#-- 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=""

#########################################################################
# GLOBAL PACKAGE OPTIONS
#   These are default values for the options=() settings
#########################################################################
#
# Default: OPTIONS=(strip docs libtool emptydirs zipman purge)
#  A negated option will do the opposite of the comments below.
#
#-- strip:     Strip symbols from binaries/libraries in STRIP_DIRS
#-- docs:      Save doc directories specified by DOC_DIRS
#-- libtool:   Leave libtool (.la) 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
#
OPTIONS=(strip docs libtool emptydirs zipman purge)

#-- File integrity checks to use. Valid: md5, sha1, sha256, sha384, sha512
INTEGRITY_CHECK=(md5)
#-- 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})
#-- Directories to be searched for the strip option (if strip is specified)
STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)

#########################################################################
# 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
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"

#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
# WARNING: Do NOT modify these variables unless you know what you are
#          doing.
#
PKGEXT='.pkg.tar.xz'
SRCEXT='.src.tar.gz'

# vim: set ft=sh ts=2 sw=2 et:

Offline

#8 2010-06-23 22:27:09

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: [Solved] Makepkg aborting after last pacman update

Your config is fine. Do you use a ~/.makepkg.conf and does "makepkg --nocolor" work?

Offline

#9 2010-06-23 22:36:17

flakedave
Member
Registered: 2010-06-23
Posts: 21

Re: [Solved] Makepkg aborting after last pacman update

does "makepkg --nocolor" work?

It does! You people look like magicians to me... is this a known problem? And no, I had no conffile in my home dir.
So flagging color with a ! in the makepkg.conf like

BUILDENV=(fakeroot !distcc !color !ccache)

does it. Thanks!

Last edited by flakedave (2010-06-23 22:40:27)

Offline

#10 2010-06-23 22:40:14

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

Re: [Solved] Makepkg aborting after last pacman update

wonder wrote:

did you merged .pacnew files? especially makepkg.conf.pacnew

Is there a formal program to accomplish the merge?  I manually edited the .pacnew and copied it over.  Is there an easier way?

Offline

#11 2010-06-23 22:43:43

flakedave
Member
Registered: 2010-06-23
Posts: 21

Re: [Solved] Makepkg aborting after last pacman update

Is there a formal program to accomplish the merge?  I manually edited the .pacnew and copied it over.  Is there an easier way?

I used pacdiffviewer.
Its usage is pretty straighforward, you choose a file and then it opens with vimdiff.
Then I used the tips on http://amjith.blogspot.com/2008/08/quic … orial.html to navigate and update the file.

Offline

#12 2010-06-23 22:46:49

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: [Solved] Makepkg aborting after last pacman update

flakedave wrote:

is this a known problem?

No...  it is not known...

Offline

#13 2010-06-23 22:50:33

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: [Solved] Makepkg aborting after last pacman update

graysky wrote:
wonder wrote:

did you merged .pacnew files? especially makepkg.conf.pacnew

Is there a formal program to accomplish the merge?  I manually edited the .pacnew and copied it over.  Is there an easier way?

You can use any diff program. pacdiff (from pacman-contrib) uses vimdiff by default.


flakedave wrote:

does "makepkg --nocolor" work?

It does! You people look like magicians to me... is this a known problem?

No, would be great if we could find a fix. This is the section that fails:

unset ALL_OFF BOLD BLUE GREEN RED YELLOW
if [[ -t 2 && ! $USE_COLOR = "n" && $(check_buildenv color) = "y" ]]; then
    ALL_OFF="$(tput sgr0)"
    BOLD="$(tput bold)"
    BLUE="${BOLD}$(tput setaf 4)"
    GREEN="${BOLD}$(tput setaf 2)"
    RED="${BOLD}$(tput setaf 1)"
    YELLOW="${BOLD}$(tput setaf 3)"
fi

So, it seems that tput (provided by ncurses) is the culprit. When I look at the list of packages that require ncurses on my system, it should be installed on your system as well. Could you post the result of "type tput"? It should be: "tput is /bin/tput".

Offline

#14 2010-06-23 22:55:12

flakedave
Member
Registered: 2010-06-23
Posts: 21

Re: [Solved] Makepkg aborting after last pacman update

Indeed I get

$ type tput
tput is /bin/tput

Offline

#15 2010-06-23 23:04:53

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: [Solved] Makepkg aborting after last pacman update

Could you run this script?

#!/bin/bash -e

trap -- 'echo $LINENO' ERR

ALL_OFF="$(tput sgr0)"
BOLD="$(tput bold)"
BLUE="${BOLD}$(tput setaf 4)"
GREEN="${BOLD}$(tput setaf 2)"
RED="${BOLD}$(tput setaf 1)"
YELLOW="${BOLD}$(tput setaf 3)"

Offline

#16 2010-06-23 23:07:40

andresp
Member
Registered: 2010-05-29
Posts: 62

Re: [Solved] Makepkg aborting after last pacman update

It will error if it can't recognize TERM.

Offline

#17 2010-06-23 23:22:50

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: [Solved] Makepkg aborting after last pacman update

But wouldn't it print an error message then?

$ TERM=asdf tput
tput: unknown terminal "asdf"

@flakedave
The output of "tput sgr0; echo $?" would be interesting as well.

Offline

#18 2010-06-23 23:30:04

flakedave
Member
Registered: 2010-06-23
Posts: 21

Re: [Solved] Makepkg aborting after last pacman update

The script yielded

7

Sad story follows... I rebooted. I don't know why i did it. Now turns out that i messed up with the .pacnew above, like I changed... fstab.
Looks like I have learnt a lesson. I can't find my homedir anymore... any suggestions? I think I'll have to play a bit before I put things into order... I'm using another machine at the moment, so experiments are postponed for a while, sorry...

Offline

#19 2010-06-23 23:49:32

andresp
Member
Registered: 2010-05-29
Posts: 62

Re: [Solved] Makepkg aborting after last pacman update

Ok i think I now why. If it's dumb or mono, tput will fail setaf silently:

TERM=dumb tput setaf 2; echo $?
1

Because the terminal does not support the colors.

So those lines have to be modifed to || true. tput's stdout will be blank if it fails, so the assignments do not hurt.


edit:

Note that "dumb" is an example. He's not using dumb because then the LINENO would be the first; dumb simply doesn't support anything.

However there are terminals that support bold but do not support colors (setaf). This exception would be handled by making tput non-fatal.

Last edited by andresp (2010-06-23 23:57:34)

Offline

#20 2010-06-24 09:01:01

flakedave
Member
Registered: 2010-06-23
Posts: 21

Re: [Solved] Makepkg aborting after last pacman update

Restored the box...

The output of "tput sgr0; echo $?" would be interesting as well.

Gives
0

Offline

Board footer

Powered by FluxBB