You are not logged in.

#1 2018-09-04 17:15:14

aleksandar2810
Member
Registered: 2015-02-16
Posts: 7

[SOLVED]makepkg won't work; ERROR: arch should be an array

Hey guys,

For some time now (a few months for sure, I hoped some update would repair it), my makepkg won't work. When I run it on any PKGBUILD it says:

 ==> ERROR: arch should be an array 

I didn't change any of the PKGBUILDs.  And today I downloaded fresh arch install and made live usb to reinstall base and base-devel packages just to be sure. Didn't work.


This is currently running on my laptop:

 Linux alek 4.18.5-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 24 12:48:58 UTC 2018 x86_64 GNU/Linux 

This is makepkg.conf  https://pastebin.com/2XhzQaAC/

Btw, pacman works correctly.
Thanks

Last edited by aleksandar2810 (2018-09-04 19:34:38)

Offline

#2 2018-09-04 17:28:22

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

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

Please post a PKGBUILD you have the issue with and the full output of makepkg.

Offline

#3 2018-09-04 17:28:57

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2018-09-04 17:38:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,655

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

The error is pretty clear. The "arch" variable in the PKGBUILD has to be a bash array.

Offline

#5 2018-09-04 17:44:32

aleksandar2810
Member
Registered: 2015-02-16
Posts: 7

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

Yes, sorry...

It's aurman's PKGBUILD https://pastebin.com/9Ews0zPi. (Also yay and proton)

Whole output I get in console is what I posted, and it's:

 ==> ERROR: arch should be an array 

Offline

#6 2018-09-04 17:52:19

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

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

In that directory what is the output of the following?

type makepkg
which makepkg
cat PKGBUILD
bash -x /usr/bin/makepkg

Offline

#7 2018-09-04 18:07:55

aleksandar2810
Member
Registered: 2015-02-16
Posts: 7

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

type makepkg:

 makepkg is hashed (/usr/bin/makepkg) 

which makepkg:

/usr/bin/makepkg 

cat PKGBUILD:
https://pastebin.com/3hEamhMG

bash -x /usr/bin/makepkg:
https://pastebin.com/kXPzBVFD

Offline

#8 2018-09-04 19:04:17

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

Well, for some reason bash -x makepkg claims that the `arch=('any')` is not what it's seeing, instead it sees `export arch='x86_64'`

+ [[ declare -x arch="x86_64" == declare\ -*([[:alnum:]])a*([[:alnum:]])\ * ]]
+ return 1
++ gettext '%s should be an array'
+ error '%s should be an array' arch

Sooooo.

Where is that getting set? I'm guessing in your bashrc or something.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#9 2018-09-04 19:22:02

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

Also, this error is technically because of a bug in makepkg, see https://lists.archlinux.org/pipermail/p … 22807.html

That being said, it's wrong to export such generic variables.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#10 2018-09-04 19:33:58

aleksandar2810
Member
Registered: 2015-02-16
Posts: 7

Re: [SOLVED]makepkg won't work; ERROR: arch should be an array

Thank you!

Yeah, I know I shouldn't do that, but who knows what was in my mind back then...

Offline

Board footer

Powered by FluxBB