Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#11002 - Installation fails due to permissions when compiling a package using ./configure though ./c works

Attached to Project: Pacman
Opened by Colin Shea (FriarFoaly) - Thursday, 24 July 2008, 12:48 GMT
Last edited by Allan McRae (Allan) - Friday, 09 January 2009, 11:20 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.1.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Whenever I attempt to compile a package that uses ./configure I always get the following errors: (though the 22327 varies with each run)

rm: cannot remove `conf22327.sh'
rm: cannot remove `conf22327'
rm: cannot remove `conf22327.file'
./configure: line 935: cannot create temp file for here document: Success
./configure: line 946: cannot create temp file for here document: Success
./configure: line 980: cannot create temp file for here document: Success
rm: cannot remove `conftest.c'
rm: cannot remove `conftest.file'
rm: cannot remove `conftest.make'
rm: cannot remove `confdefs.h'
./configure: line 1132: cannot create temp file for here document: Success
./configure: line 1137: cannot create temp file for here document: Success
./configure: line 1142: cannot create temp file for here document: Success
./configure: line 1147: cannot create temp file for here document: Success
./configure: line 1152: cannot create temp file for here document: Success
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... rm: cannot remove `conftest.file'
yes
./configure: line 1424: cannot create temp file for here document: Success
sed: couldn't open file conftest.sed: No such file or directory
rm: cannot remove `conftest.sed': No such file or directory
checking for gawk... gawk
checking whether make sets $(MAKE)... ./configure: line 1490: cannot create temp file for here document: Success
rm: cannot remove `conftest.make'
no
./configure: line 1545: cannot create temp file for here document: Success
./configure: line 1550: cannot create temp file for here document: Success
checking for gcc... gcc
./configure: line 2005: cannot create temp file for here document: Success
./configure: line 2010: cannot create temp file for here document: Success
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.
./configure: line 2079: cannot create temp file for here document: Success
./configure: line 2102: cannot create temp file for here document: Success
./configure: line 2131: cannot create temp file for here document: Success
rm: cannot remove `conftest.c'
rm: cannot remove `conftest.file'
rm: cannot remove `conftest.make'
rm: cannot remove `confdefs.h'
rm: cannot remove `conf22327'
rm: cannot remove `conf22327.file'
rm: cannot remove `conf22327.sh'
rm: cannot remove `a.out'
make: *** No targets specified and no makefile found. Stop.

All files in extract_dir/ are rwxr-xr-x, user:user. Adding a "chmod -R 777 *" call to the beginning of build() in the PKGBUILD doesn't seem to affect the outcome at all. If I enter src/pkg-ver/ and run ./configure myself (as user) then it works fine and I can run make, etc and it all works. Running makepkg as root also works fine, but then the pkg/, src/ dirs are root:root.
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 09 January 2009, 11:20 GMT
Reason for closing:  Duplicate
Additional comments about closing:  See final comment.
Comment by Allan McRae (Allan) - Thursday, 24 July 2008, 13:08 GMT
My guess, fix your /tmp folder permissions: "chmod 1777 /tmp".
Comment by Colin Shea (FriarFoaly) - Thursday, 24 July 2008, 16:11 GMT
That doesn't work either, same errors. :/
Comment by Allan McRae (Allan) - Thursday, 24 July 2008, 23:08 GMT
I am low on ideas... Do you have fakeroot installed?
Comment by Allan McRae (Allan) - Friday, 25 July 2008, 03:05 GMT
Also, what do you mean by installation fails in the title?
Comment by Colin Shea (FriarFoaly) - Saturday, 26 July 2008, 15:27 GMT
Sorry for the late reply...

I do have fakeroot installed. When makepkg calls build(), which then calls ./configure, which fails. makepkg sees that it returns non-0 (dunno how) and it errors out with "==> ERROR: Build failed, Aborting" stoping it from progressing any further.
Comment by Allan McRae (Allan) - Sunday, 27 July 2008, 02:59 GMT
This seems to be a permissions error of some variety...

Can you do this just to check it works:
1) create a temporary directory in your home directory.
2) copy over PKGBUILD and any install file and patches needed - nothing else including the source.
3) run makepkg as normal user.

If that does not work, attach the PKGBUILD and needed files here.
Comment by Colin Shea (FriarFoaly) - Sunday, 27 July 2008, 21:55 GMT
Still does not work.

This is the dlume package from AUR (version 0.2.4) and I've been using it as my main test package for this issue. I can point you to other packages which use ./configure. So far as I've found, this is not a permissions issue, but I have no clue.
Comment by Allan McRae (Allan) - Monday, 28 July 2008, 03:12 GMT
That builds fine on my end, and if this is happening on multiple packages then it is a problem with permissions on your system.

What is your umask (just type umask at a terminal)? 0022 is good.

Also, please post the output of running "ls -l" in $startdir/src and $startdir/src/dlume-0.2.4 after trying to run makepkg from a clean directory (i.e. remove src/ and pkg/ first).
Comment by Aaron Griffin (phrakture) - Monday, 28 July 2008, 17:22 GMT
All those files are the temp files generated by ./configure for checking things. This is a permission issue, but not where you're running makepkg - it is a permissions issue wherever configure is generating these files. For conciseness, please attach the configure script that is failing.
Comment by Colin Shea (FriarFoaly) - Monday, 28 July 2008, 18:39 GMT
Mu umask is 022.

$ ls -l src/
colin/home/test/src/ ll [2:37pm 28Jul2008]
total 4.0K
drwxr-xr-x 4 colin colin 4.0K 2008-07-28 14:37 dlume-0.2.4
lrwxrwxrwx 1 colin colin 29 2008-07-28 14:37 dlume-0.2.4.tar.gz -> /home/test/dlume-0.2.4.tar.gz
lrwxrwxrwx 1 colin colin 24 2008-07-28 14:37 dlume.desktop -> /home/test/dlume.desktop

$ ls -l src/dlume-0.2.4/
total 680K
-rw-r--r-- 1 colin colin 45K 2004-07-18 08:33 aclocal.m4
-rw-r--r-- 1 colin colin 5.4K 2008-07-28 14:37 a.out
-rw-r--r-- 1 colin colin 281 2004-07-18 08:33 AUTHORS
-rw-r--r-- 1 colin colin 1.9K 2004-07-18 08:33 ChangeLog
-rwxr-xr-x 1 colin colin 2.8K 2004-07-18 08:34 compile
lrwxrwxrwx 1 colin colin 13 2008-07-28 14:37 conf5091 -> conf5091.file
-rw-r--r-- 1 colin colin 1 2008-07-28 14:37 conf5091.file
-rwxr-xr-x 1 colin colin 18 2008-07-28 14:37 conf5091.sh
-rw-r--r-- 1 colin colin 1 2008-07-28 14:37 confdefs.h
-rwxr-xr-x 1 colin colin 41K 2004-07-18 08:33 config.guess
-rw-r--r-- 1 colin colin 3.0K 2004-07-18 08:34 config.h.in
-rw-r--r-- 1 colin colin 4.8K 2008-07-28 14:37 config.log
-rwxr-xr-x 1 colin colin 30K 2004-07-18 08:33 config.sub
-rwxr-xr-x 1 colin colin 197K 2004-07-18 08:34 configure
-rw-r--r-- 1 colin colin 773 2004-07-18 08:33 configure.in
-rw-r--r-- 1 colin colin 1 2008-07-28 14:37 conftest.c
-rw-r--r-- 1 colin colin 10 2008-07-28 14:37 conftest.file
-rw-r--r-- 1 colin colin 0 2008-07-28 14:37 conftest.make
-rw-r--r-- 1 colin colin 18K 2004-07-18 08:33 COPYING
-rwxr-xr-x 1 colin colin 13K 2004-07-18 08:34 depcomp
-rw-r--r-- 1 colin colin 980 2004-07-18 08:33 dlume.1
-rw-r--r-- 1 colin colin 4.3K 2004-07-18 09:36 dlume.png
-rwxr-xr-x 1 colin colin 7.0K 2004-07-18 08:34 install-sh
-rw-r--r-- 1 colin colin 176K 2004-07-18 08:33 ltmain.sh
-rw-r--r-- 1 colin colin 135 2004-07-18 08:33 Makefile.am
-rw-r--r-- 1 colin colin 19K 2004-07-18 08:34 Makefile.in
-rwxr-xr-x 1 colin colin 11K 2004-07-18 08:34 missing
-rwxr-xr-x 1 colin colin 2.0K 2004-07-18 08:34 mkinstalldirs
-rw-r--r-- 1 colin colin 19 2004-07-18 08:33 NEWS
drwxr-xr-x 2 colin colin 4.0K 2004-07-18 08:33 po
-rw-r--r-- 1 colin colin 999 2004-07-18 08:33 README
drwxr-xr-x 2 colin colin 4.0K 2004-07-18 08:34 src
-rw-r--r-- 1 colin colin 17 2004-07-18 08:33 TODO

src/dlume-0.2.4/configure script attached.
   configure (196.2 KiB)
Comment by Aaron Griffin (phrakture) - Monday, 28 July 2008, 19:14 GMT
Ok, a few interesting points. The first couple of removes (the ones with the PID in them) are done with "rm -f". rm shouldn't complain about that at all:

aaron@gerolde:~$ rm ewfwefwefwe
rm: cannot remove `ewfwefwefwe': No such file or directory
aaron@gerolde:~$ rm -f sdvfwerfgrwg
aaron@gerolde:~$

Secondly, the "cannot create temp file for here document" thing looks a little silly, but I'm not sure if this is a bash issue or a cat issue. However, you claim it works fine as a user... can you verify by running (all three lines):

$ cat <<<ZOMGWTF
Hello there
ZOMGWTF

Also, at a random stab in the dark, could you run "cat --version" ? I want to verify that you don't have a goofed binary floating around.

Another random stab: do you have dash linked to /bin/sh ?
Comment by Colin Shea (FriarFoaly) - Monday, 28 July 2008, 19:16 GMT
Still does not work.

This is the dlume package from AUR (version 0.2.4) and I've been using it as my main test package for this issue. I can point you to other packages which use ./configure. So far as I've found, this is not a permissions issue, but I have no clue.
Comment by Colin Shea (FriarFoaly) - Monday, 28 July 2008, 19:20 GMT
$ cat --version
cat (GNU coreutils) 6.12

Uh, no-can-do on the cat heredoc bit, nor the dash link. It's linked to bash:
$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2008-01-30 00:45 /bin/sh -> bash

I'm running it within zsh.

PS: Sorry about the re-upload, I hit refresh on a old tab which FF still had a copy of the POST data.
Comment by Aaron Griffin (phrakture) - Monday, 28 July 2008, 19:30 GMT
The here doc works fine? Can you run bash first and try it? Maybe your bash binary is borked.
Comment by Colin Shea (FriarFoaly) - Monday, 28 July 2008, 19:33 GMT
The heredoc works fine, I was a shell slacker and copied your cat call above which contains an extra '<', cat <<ZOMGWTF; hi there; ZOMGWTF produces "hi there" as expected, both within Bash and within Zsh. About dash: I don't even have it installed.
Comment by Allan McRae (Allan) - Monday, 15 December 2008, 11:54 GMT
Did you ever figure this out?
Comment by Allan McRae (Allan) - Friday, 09 January 2009, 11:20 GMT
My guess is this was a fakeroot issue such as reported in  FS#12646 . I'm closing this in favour of the other bug report.

Loading...