You are not logged in.

#1 2016-06-20 16:09:07

thirdjaruda
Member
Registered: 2016-06-20
Posts: 4

makepkg error

Hi, arch noob here...

just recently whenever I use yaourt or compile something manually from AUR this error appears:

/usr/bin/makepkg: line 98: @libmakepkgdir@/*.sh: No such file or directory
/usr/bin/makepkg: line 1156: syntax error near unexpected token `library/parseopts.sh'
/usr/bin/makepkg: line 1156: `m4_include(library/parseopts.sh)'

I wonder if this is caused by some updates that made some of my packages to not fit together.

this are some of the lines from my makepkg file:

96         # Import libmakepkg
97         for lib in "$LIBRARY"/*.sh; do
98	         source "$lib"
99         done
1156    m4_include(library/parseopts.sh)

I wonder if this would help:

Pacman v5.0.1 - libalpm v10.0.1
x86_64 Linux 4.6.2-1-ARCH

Offline

#2 2016-06-20 16:12:56

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,772

Re: makepkg error

Moving to AUR issues


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-06-20 16:21:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,541

Re: makepkg error

Do you have an environmental variable set for "LIBRARY"? Is so, why?

Offline

#4 2016-06-20 16:23:50

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

Re: makepkg error

You have a broken pacman package.

For some reason, your /usr/bin/makepkg (and possibly more things as well, depending on how this occurred) contains the contents of the original makepkg.sh.in source file. As evidenced by the presence of m4 macros where there should have been bash code...

...

Did you try installing a not-from-the-main-repos pacman package? Have you tried installing pacman from source, by hand? What is the output of `pacman -Qkk pacman`?


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

Offline

#5 2016-06-21 00:34:24

thirdjaruda
Member
Registered: 2016-06-20
Posts: 4

Re: makepkg error

this is the output of  `pacman -Qkk pacman`

backup file: pacman: /etc/pacman.conf (Modification time mismatch)
backup file: pacman: /etc/pacman.conf (Size mismatch)
warning: pacman: /usr/bin/makepkg (Modification time mismatch)
warning: pacman: /usr/bin/makepkg (Size mismatch)
pacman: 349 total files, 1 altered file

I bet the mismatch are the ones causing the problem now,
the modified file is I guess the a result of me copying the makepkg file from the repo during the time that I'm trying to solve the problem on my own thinking that I might have a broken makepkg file.
I wonder if the mismatch is caused by an interupted update since my internet service not so dependable.
also how to I correct my pacman package in this case? btw when using pacman to install packages I have no problem at all.

Offline

#6 2016-06-21 00:45:03

mis
Member
Registered: 2016-03-16
Posts: 234

Re: makepkg error

thirdjaruda wrote:

also how to I correct my pacman package in this case? btw when using pacman to install packages I have no problem at all.

Just reinstall pacman.

Offline

#7 2016-06-21 01:37:43

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

Re: makepkg error

m4_include(library/parseopts.sh)

Have you just copied makepkg from the pacman source code without actually building it?

Offline

#8 2016-06-21 04:35:57

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

Re: makepkg error

thirdjaruda wrote:
backup file: pacman: /etc/pacman.conf (Modification time mismatch)
backup file: pacman: /etc/pacman.conf (Size mismatch)
warning: pacman: /usr/bin/makepkg (Modification time mismatch)
warning: pacman: /usr/bin/makepkg (Size mismatch)
pacman: 349 total files, 1 altered file

I bet the mismatch are the ones causing the problem now,
the modified file is I guess the a result of me copying the makepkg file from the repo during the time that I'm trying to solve the problem on my own thinking that I might have a broken makepkg file.

Wait, so you had some problem you haven't mentioned yet? Because the only error you did mention is the syntax error caused by copying the makepkg file from the source repo.

Which is a terrible idea by the way. Blindly copying random files without knowing what you're doing in the hope that it will magically fix things? Assuming packages are broken, without knowing or following the procedure for actually determining that is the case? Terrible idea.

There is no makepkg file in the repo, there is a makepkg.sh.in file which is completely and totally different. You might as well have copied a picture of a cat instead, it would have been just as useful plus provided a more useful error message.

I wonder if the mismatch is caused by an interupted update since my internet service not so dependable.
also how to I correct my pacman package in this case? btw when using pacman to install packages I have no problem at all.

No, the mismatch is not caused by interrupted updates. You cannot have an interrupted update due to internet service, since updates do not actually use the internet in the first place. Packages are downloaded from the internet, then get checked via checksums/gpg signatures for integrity locally, before being applied, locally.
An update system that relied on a strong internet connection would be a really, really, really, really stupid system, and Arch Linux is not really, really, really, really stupid. wink wink wink

...

Since you broke the makepkg part of the pacman package by doing strange things without firm knowledge of what you were doing... fix the package, by reinstalling it as stated above.

Last edited by eschwartz (2016-06-21 04:38:24)


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

Offline

#9 2016-06-21 08:26:54

thirdjaruda
Member
Registered: 2016-06-20
Posts: 4

Re: makepkg error

I guess I really messed up when I did copy the makepkg thing. Thanks guys, I'll learn form this and be more careful in the future. smile

Offline

Board footer

Powered by FluxBB