On linux, the output of CP rule was try to write to / which is - of course, forbidden for write. This solution adds to each part of lib correct pointer to the root of lib where the libs should be written. Bug found by Kuldeep Singh Dhaka.