FS#13375 - [PATCH] PKGBUILD for fakeroot to support both fakeroot[-tcp]

Attached to Project: Arch Linux
Opened by Gerardo Exequiel Pozzi (djgera) - Thursday, 19 February 2009, 14:23 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 09 March 2009, 14:34 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
fakeroot-1.12.1 (compiled with sysv ipc[by default]) is broken is some scenarios:

* Running applications that use libGL from nvidia.  FS#12592   FS#12653   FS#12766  [#1]
* Multithreaded applications (using pthread)  FS#13214 
* Running under realtime-preempt kernel

For fix this, exist another version of fakeroot that runs fine, this is when compiled with tcp support.

Then I patched the PKGBUILD to make both fakeroot with default sysv ipc and fakeroot-tcp.

The result is:
usr/bin/fakeroot-tcp
usr/bin/fakeroot
usr/bin/faked-tcp
usr/bin/faked
usr/lib/libfakeroot/libfakeroot-tcp-0.so
usr/lib/libfakeroot/libfakeroot.so
usr/lib/libfakeroot/libfakeroot-0.so
usr/lib/libfakeroot/libfakeroot-tcp.so

Maybe a good idea is add a flag for makepkg (options=) that can select between the classic fakeroot and fakeroot-tcp.


[#1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516024


PS: I don't know what is broken under TCP version.
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Monday, 09 March 2009, 14:34 GMT
Reason for closing:  Won't implement
Comment by Aaron Griffin (phrakture) - Thursday, 19 February 2009, 16:53 GMT
I don't know if we want to do this - what would be wrong with using tcp no matter what? Does that break anything if we just stop using the IPC version in favor of TCP?
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 19 February 2009, 17:24 GMT
Exactly, I do not know what they may break the TCP version. It seemed to me a good idea to have both versions in case of problems.
At least in the documentation of fakeroot, no references to problems with the TCP version. As far as I understand it, the TCP version was used to solve the problem of multi-threads [#1] and kernel-rt [#2]

Anyway, I am sending a mail to the author of fakeroot, asking about it.

[#1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=229050
[#2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=319474
Comment by Attila (attila) - Friday, 20 February 2009, 06:13 GMT
If i run makepkg with this lines i can't see any difference in the output of "ldd pkg/usr/lib/libfakeroot/libfakeroot-*.so" but if i do the same steps from the PKGBUILD without makepkg than there is a difference. I don't know what is better, the plan to use fakeroot only for packaging or to offer fakeroot-tcp too, but i suggest to take a deeper view of it.
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 20 February 2009, 13:29 GMT
oops, fixed the symlink (libfakeroot-tcp.so -> libfakeroot-tcp-0.so) thanks Attila

-rwxr-xr-x root/root 37102 2009-02-20 11:20 usr/lib/libfakeroot/libfakeroot-tcp-0.so
lrwxrwxrwx root/root 0 2009-02-20 11:20 usr/lib/libfakeroot/libfakeroot-tcp.so -> libfakeroot-tcp-0.so

-rwxr-xr-x root/root 35528 2009-02-20 11:20 usr/lib/libfakeroot/libfakeroot-0.so
lrwxrwxrwx root/root 0 2009-02-20 11:20 usr/lib/libfakeroot/libfakeroot.so -> libfakeroot-0.so

Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 20 February 2009, 14:47 GMT
Well, I think have the answer. I tried to compile glibc and mplayer(@) with fakeroot-tcp and it was stopped in the middle of a step in the compilation (childrens of make go to Zombie state). Not in any particular step, it is random. Also note that it is a bit slower than the classic fakeroot.

I tried two different ways and both failed:
* One was simply the fakeroot package with the option for TCP (only this version), and without --program-suffix. (Like the original pkg but instead of sysvipc -> tcp ;))
* The other was to have both versions of fakeroot (the proposed above patch), adding a patch to makepkg[#1] and using the new option.


(@) Apparently for attila it's works without problems the compilation of mplayer with tcp version.

[#1] The patch is attached if any are interested to test it. But as you can read, at least I did not have good results.
Comment by Attila (attila) - Friday, 20 February 2009, 17:21 GMT
I test only the "./configure" of mplayer-svn because with the normal fakeroot i got segmentations faults and with fakeroot-tcp not, this is what i mean if i said that it works. Sorry and i don't think that i will got other results as you with compiling.
Comment by Aaron Griffin (phrakture) - Friday, 20 February 2009, 17:33 GMT
Out of curiosity, has this been reported upstream?

EDIT: Ignore me - upstream bug linked in the original report :)
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 20 February 2009, 17:41 GMT
oooh!, I understood that they tried compiling also, thanks for the clarification.

Apparently the fakeroot-tcp fails executions in parallel make (-jN). Recently I removed this flag and compile glibc with no problems. But the fact that this is quite annoying.
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 20 February 2009, 18:17 GMT
@Attila: A temp workaround if your compiling packages that uses libGL and in system have Nvidia propietary drivers, with the fakeroot-1.12.1-1, outside a CHROOT env, is to use:

LD_PRELOAD=/xyz/usr/lib/libGL/libGL.so.1.2 makepkg #where "xyz" is the path to a extracted libgl package from Arch Linux for example /home/attila/libgl ;)
Comment by Attila (attila) - Saturday, 21 February 2009, 08:33 GMT
@Gerardo The workaround works fine, thanks a lot. I find this better than fakeroot-tcp because i have a "make -j4" in my makepkg.conf and compiling mplayer with '!makeflags' take a little bit longer. -)

Would it be there a negative effect if i put a alias for this in my ~/.bashrc (alias makepkg='LD_PRELOAD=/home/packages/libgl/libGL.so.1.2 makepkg') and use it even for all other packages?
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 24 February 2009, 17:31 GMT
I do not think, as a preload library in memory should not affect the compilation of soft.
But even if you still have doubts, it might be better to create an alias "makepkg-preload" and use only in the cases that makepkg fails;)
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 04 March 2009, 21:40 GMT
The problem is now solved with the new nvidia drivers 180.35

[CHROOT][djgera@gerardo libGL]$ LD_LIBRARY_PATH="./NVIDIA-Linux-x86-180.29-pkg0/usr/lib" fakeroot ./hola
/usr/bin/fakeroot: line 178: 11836 Segmentation fault FAKEROOTKEY=$FAKEROOTKEY LD_LIBRARY_PATH="$PATHS" LD_PRELOAD="$LIB" "$@"
[CHROOT][djgera@gerardo libGL]$ LD_LIBRARY_PATH="./NVIDIA-Linux-x86-180.35-pkg0/usr/lib" fakeroot ./hola
Hola aqui estoy!
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 04 March 2009, 21:43 GMT
OOPS ignore me, nvidia 180.35, don't solve this problem.

Loading...