You are not logged in.

#1 2010-10-21 21:02:21

stiffy420
Member
Registered: 2009-12-11
Posts: 99

Weird error when installing caps from AUR

I get this error:

==> Starting build()...
Traceback (most recent call last):
  File "./configure.py", line 30, in <module>
    store()
  File "./configure.py", line 20, in store
    print >> f, "_CFLAGS=" + ' '.join (CFLAGS)
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'
    Aborting...
==> ERROR: Makepkg was unable to build caps

Am i missing some package or something?

I need caps for alsaequal.

Offline

#2 2010-10-21 21:35:54

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: Weird error when installing caps from AUR

Does this help?

Offline

#3 2010-10-22 22:27:39

stiffy420
Member
Registered: 2009-12-11
Posts: 99

Re: Weird error when installing caps from AUR

I emailed the author of alsaequal.
He said "...maybe they have a way to temporarily point to Python 2 and then change it back"

can someone please help me figure this out? im pretty new on arch.

Offline

#4 2010-10-22 23:42:32

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Weird error when installing caps from AUR

According to the PKGBUILD, python is an optional dependency for this package, only required for a CFLAGS check. If you were to build the package in a clean chroot, the error would not occur, because python would not be installed. As you are presumably not doing that, you could remove python from your system, build the package, then reinstall python.

Or, if you want to do it the right way, change 'python' to 'python2' on line 20 of the PKGBUILD and use either sed or a patch to change the configure.py script to use python2.

Offline

#5 2010-10-23 09:50:07

stiffy420
Member
Registered: 2009-12-11
Posts: 99

Re: Weird error when installing caps from AUR

Ok. i tried removing python and then installing caps. went fine first but i still get an error and the package will not install.

could you please explain how to use "sed" or a patch to the change configure.py?

Offline

#6 2010-10-23 13:46:53

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 454

Re: Weird error when installing caps from AUR

after the download open PKGBUILD and in the build section

add 2 or 2.7 after the word python.

type -p python 1>/dev/null && ./configure.py 

to

type -p python2 1>/dev/null && ./configure.py

or

type -p python2.7 1>/dev/null && ./configure.py

Offline

#7 2010-10-23 21:10:39

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Weird error when installing caps from AUR

stiffy420 wrote:

Ok. i tried removing python and then installing caps. went fine first but i still get an error

What error? yikes

Offline

#8 2010-10-25 06:41:34

Pafrapé
Member
Registered: 2010-10-25
Posts: 17

Re: Weird error when installing caps from AUR

Hello, I have exactly the same problem.
So I replaced
type -p python 1>/dev/null && ./configure.py 
by
type -p python2.7 1>/dev/null && ./configure.py

The compilation does not work and I have the following error message:

Lancer la compilation de caps ? [O/n]
==> -------------------------------------
==>
==> Construction et installation du paquet
==> Création du paquet caps 0.4.4-1 (lun. oct. 25 08:28:06 CEST 2010)
==> Vérification des dépendances...
==> Vérification des dépendances pour la compilation...
==> Récupération des sources...
  -> caps_0.4.4.tar.gz trouvé
==> Validation des fichiers sources avec md5sums...
    caps_0.4.4.tar.gz ... Réussite
==> Validation des fichiers sources avec sha256sums...
    caps_0.4.4.tar.gz ... Réussite
==> Extraction des sources...
  -> Extraction de caps_0.4.4.tar.gz avec bsdtar
==> Suppression du répertoire pkg/ existant...
==> Lancement de build()...
Traceback (most recent call last):
  File "./configure.py", line 30, in <module>
    store()
  File "./configure.py", line 20, in store
    print >> f, "_CFLAGS=" + ' '.join (CFLAGS)
TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'
    Abandon...
==> ERROR: Makepkg n'a pas pu construire caps.

Offline

#9 2010-10-25 16:06:33

shulamy
Member
From: israel
Registered: 2010-09-11
Posts: 454

Re: Weird error when installing caps from AUR

i've just downloaded caps-0.4.4-2 from AUR and it compield with no error.

(with no change in the files)

maybe it because i changed the python symlink

to point to python2.7 instead of python3.

ezik

Offline

#10 2010-10-25 21:16:16

Pafrapé
Member
Registered: 2010-10-25
Posts: 17

Re: Weird error when installing caps from AUR

Indeed, following an update of caps, it compiles perfectly.
There are no more error.

Thank you for your help.

Offline

Board footer

Powered by FluxBB