You are not logged in.
Pages: 1
When I try to install aur packages with makepkg i get error
==> Creating package "package-query"...
/usr/bin/makepkg: line 1816: 79 . * 1024 : syntax error: invalid arithmetic operator (error token is ". * 1024 ")
It doesn't create the pkg file so I cant install packages with pacman.
I have tried several different packages from aur. System is up to date.
Thank you.
Offline
What does `which du` return? If it gives a result, go to a small directory (any dir will do, but small will be faster) and run the following command and report the output:
du -sk --apparent-size
EDIT: I'm not sure how helpful these will actually be - if du was not there, you would get a different error. The only thing that should lead to the results you see is if makepkg was modified. Post the output of the following:
head -1816 /usr/bin/makepkg | tail -2
Last edited by Trilby (2013-11-27 01:43:52)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
==> Creating package "package-query"...
/usr/bin/makepkg: line 1816: 79 . * 1024 : syntax error: invalid arithmetic operator (error token is ". * 1024 ")
There is somehow an extra '.' on that line in your makepkg which is not in the makepkg from the repos.
Edit: I didn't see the space after the '.' and so my suspicion is now with the output of du, as per Trilby's post.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
I have just tested makepkg with package-query and encountered no errors.
Please post the output of the following:
sed -n 1816p /usr/bin/makepkg
md5sum /usr/bin/makepkg
pacman -Q pacman
uname -a
While waiting for further replies, try switching mirrors and running "pacman -Syyu".
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Kelevra891 wrote:==> Creating package "package-query"...
/usr/bin/makepkg: line 1816: 79 . * 1024 : syntax error: invalid arithmetic operator (error token is ". * 1024 ")There is somehow an extra '.' on that line in your makepkg which is not in the makepkg from the repos.
Edit: I didn't see the space after the '.' and so my suspicion is now with the output of du, as per Trilby's post.
$ du -sk --apparent-size
4538305 .
Maybe the dot came from 'du'.
Offline
karol, read my edit.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
karol, read my edit.
Ooops, I wrote my reply and then just inserted the quote w/o looking.
Offline
I have just tested makepkg with package-query and encountered no errors.
Please post the output of the following:
sed -n 1816p /usr/bin/makepkg md5sum /usr/bin/makepkg pacman -Q pacman uname -a
While waiting for further replies, try switching mirrors and running "pacman -Syyu".
Here are the replies.
[kelevra@Archbox ~]$ sed -n 1816p /usr/bin/makepkg
size="$(( ${size%%[^0-9]*} * 1024 ))"
[kelevra@Archbox ~]$ md5sum /usr/bin/makepkg
ca9273ce2b30ef53b2704e7c27d39b60 /usr/bin/makepkg
[kelevra@Archbox ~]$ pacman -Q pacman
pacman 4.1.2-4
[kelevra@Archbox ~]$ uname -a
Linux Archbox 3.12.1-1-ARCH #1 SMP PREEMPT Thu Nov 21 08:18:42 CET 2013 x86_64 GNU/Linux
Which du returns, /usr/bin/du
[kelevra@Archbox Templates]$ du -sk --apparent-size
4 .
[kelevra@Archbox Templates]$ head -1816 /usr/bin/makepkg | tail -2
local size="$(/usr/bin/du -sk --apparent-size)"
size="$(( ${size%%[^0-9]*} * 1024 ))"
Last edited by Kelevra891 (2013-11-27 12:45:48)
Offline
Everything looks right there - so this error is very odd. This is a long shot test, but it seems like the only remaining piece:
size="$(du -sk --apparent-size)"
echo "${size%%[^0-9]*}"
If you enter those two lines in a terminal, the result should be to print out just a number. If you get anything else, it may indicate a problem with bash's uses of substring replacement or regexes. Neither of these are even remotely likely, but I can't see what else could lead to this error.
Last edited by Trilby (2013-11-27 13:42:02)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Everything looks right there - so this error is very odd. This is a long shot test, but it seems like the only remaining piece:
size="$(du -sk --apparent-size)" echo "${size%%[^0-9]*}"
If you enter those two lines in a terminal, the result should be to print out just a number. If you get anything else, it may indicate a problem with bash's uses of substring replacement or regexes. Neither of these are even remotely likely, but I can't see what else could lead to this error.
[kelevra@Archbox ~]$ size="$(du -sk --apparent-size)"
[kelevra@Archbox ~]$ echo "${size%%[^0-9]*}"
1989674 .
Offline
Well there's the problem - now the questions is *how* or why that could happen.
What about the following:
pacman -Q bash
ls -l /usr/bin/bash
md5sum /usr/bin/bash
Also if you could post the output of "set" in a pastebin-like site that would help:
set > logfille
then upload logfile and link to it here.
And perhaps to narrow down the issue a bit further (to see if it's the bash string function or the regex that is failing):
var="one and two"
echo "${var%%two}"
echo -e "first\n120\nthird" | grep "[^0-9]"
Last edited by Trilby (2013-11-28 12:30:58)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
The output of
bash --version
would also be informative.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
[kelevra@Archbox ~]$ pacman -Q bash
bash 4.2.045-5
[kelevra@Archbox ~]$ ls -l /usr/bin/bash
-rwxr-xr-x 1 root root 737952 25.8. 15:06 /usr/bin/bash
[kelevra@Archbox ~]$ md5sum /usr/bin/bash
5bb49ecb47509ec3aab01a2d13556088 /usr/bin/bash
Here is the logfile http://pastebin.com/XiQPwL7C
[kelevra@Archbox ~]$ var="one and two"
[kelevra@Archbox ~]$ echo "${var%%two}"
one and
[kelevra@Archbox ~]$ echo -e "first\n120\nthird" | grep "[^0-9]"
first
third
GNU bash, version 4.2.45(2)-release (x86_64-unknown-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Offline
Locale issue with the output of du, maybe? Try:
export LC_ALL=C
size="$(du -sk --apparent-size)"
echo "${size%%[^0-9]*}"
Offline
Locale issue with the output of du, maybe? Try:
export LC_ALL=C size="$(du -sk --apparent-size)" echo "${size%%[^0-9]*}"
[kelevra@Archbox ~]$ export LC_ALL=C
[kelevra@Archbox ~]$ size="$(du -sk --apparent-size)"
[kelevra@Archbox ~]$ echo "${size%%[^0-9]*}"
1991060
Offline
Huh, is this a makepkg bug? It does export LC_ALL itself in most functions, but it doesn't look like it does before running the lines on 1815-1816. It's an easy enough temporary hack to get it working, just put "LC_ALL=C" on line 1814. But this will get overwritten with the next update.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Yep, file a bug report in the Arch bugtracker then fix it locally as Trilby said. I would suggest putting a link to this thread in the bug report.
On a side note, I can't believe that worked. It shouldn't, AFAIK, but localization can do some strange things sometimes. Could be a bug in makepkg or a bug in du.
Offline
Pages: 1