FS#6208 - using makepkg with fakeroot gives an error

Attached to Project: Pacman
Opened by Roman Kyrylych (Romashka) - Saturday, 13 January 2007, 21:05 GMT
Last edited by Roman Kyrylych (Romashka) - Monday, 28 May 2007, 21:48 GMT
Task Type Bug Report
Category
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When using makepkg with fakeroot I always get:
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded: ignored.

makepkg from pacman3 shows this error too.

Everything seems to work OK, though.
This task depends upon

Closed by  Roman Kyrylych (Romashka)
Monday, 28 May 2007, 21:48 GMT
Reason for closing:  Fixed
Additional comments about closing:  in git
Comment by Jan de Groot (JGC) - Sunday, 14 January 2007, 12:39 GMT
According to DIYlinux documentation, adding a symlink /usr/lib/libfakeroot.so -> /usr/lib/libfakeroot/libfakeroot.so would fix this bug.
Comment by Roman Kyrylych (Romashka) - Sunday, 14 January 2007, 13:42 GMT
then it's a bug in fakeroot package
Comment by Roman Kyrylych (Romashka) - Sunday, 14 January 2007, 13:44 GMT
Hmm, I have /usr/lib/libfakeroot in ld.so.conf - why it doesn't work?
Comment by Roman Kyrylych (Romashka) - Sunday, 14 January 2007, 13:47 GMT
and symlinking doesn't help either
Comment by Xilon (Xilon) - Friday, 19 January 2007, 17:44 GMT
When using yaourt to build from PKGBUILDs (AUR), it gives the same error about fakeroot:

$ yaourt -S firefox-nightly
...
==> Making package: firefox-nightly 3.0a1-3 (Sun Jan 21 01:14:05 WST 2007)
==> Checking Runtime Dependencies...
==> Missing Dependencies:
==>
requires: libstdc++5
==>
==> Installing missing dependencies...
ERROR: ld.so: object 'libfakeroot.so' from LD_PRELOAD cannot be preloaded: ignored.
Password:

I think this happens for all packages built from AUR. I have not seen this error come up anywhere else
Comment by Jan de Groot (JGC) - Friday, 19 January 2007, 23:47 GMT
I guess I know where these messages come from then, it's sudo that ignores LD_PRELOAD because that's not safe to pass through.
Comment by Aaron Griffin (phrakture) - Monday, 22 January 2007, 16:08 GMT
The best option I can think of is to save and unset LD_PRELOAD before calling sudo, then restore it afterward. I can't really think of any case where makepkg would NEED LD_PRELOAD libs before calling sudo pacman...

Opinions?
Comment by Jan de Groot (JGC) - Monday, 22 January 2007, 17:52 GMT
the point is that makepkg executes itself within fakeroot. Actually, fakeroot is only required when running the make install step, the rest can be done as the real user that is building the package. As we only have build(), this is nearly impossible to implement.

Another thing: when you give options like -S to install dependencies using sudo, why bother using fakeroot at all for that step? What about checking dependencies, install missing ones if -S is given and then restart the process with fakeroot?
Comment by Aaron Griffin (phrakture) - Monday, 12 February 2007, 00:15 GMT
For the moment this is just an annoyance. While there is a quick fix, fixing this properly (by only running small parts under fakeroot) will take longer and can wait until 3.1
Comment by Andrew Fyfe (space-m0nkey) - Saturday, 24 March 2007, 07:16 GMT
I've just sent 6 patches (it's not as bad as it sounds) to the pacman-dev mailing list. They reduce the use of fakeroot to the bare minimum (just to build and create the package).

(http://www.archlinux.org/pipermail/pacman-dev/2007-March/002349.html)

Loading...