Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Delegating link phase to cross linker
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Mon Sep 03, 2012 6:28 pm    Post subject: Delegating link phase to cross linker Reply with quote

Hi.
I help my G4 mac mini with a chrooted gentoo on a i7 cross-toolchain for compile phase with distcc.
It saves me a lot of time but there is a bottleneck with link phase for big packages as libreoffice and (lately often) mozilla apps as G4 mac mini can only be stuffed till 1Go of RAM.
With the 1.7 Go swap, it achieves a result but link phase can last for hours !
Has anyone a hint on how to get around this ?
A kind of link delegation as, in my mind, distcc is a compile delegation ?
How do you cope with this limitation ?
Qemu ? Smth else ?

Thx in advance.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54033
Location: 56N 3W

PostPosted: Mon Sep 03, 2012 6:45 pm    Post subject: Reply with quote

sno35,

Have you tried cross compiling the entire package on the i7?
That does everything there.

Not everything is cross compile friendly though. If you set FEATURES="buildpkg" you would end up with a binary package, which you would install using emerge -K on the mac mini.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Mon Sep 03, 2012 6:53 pm    Post subject: Reply with quote

http://google-opensource.blogspot.fr/2008/08/distccs-pump-mode-new-design-for.html

you got the feature name, dig it

Try search the forum for pump mode, or google it. You might also try add me as author in the search to see plenty distcc answers i have gave to everyone for many aspects of distcc, in fact, it could be a good idea to add that to gentoo wiki, but it will take time and that's something i don't have for now.
Back to top
View user's profile Send private message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Thu Sep 06, 2012 7:44 pm    Post subject: Reply with quote

Thank you for being so quick to answer :)
But ...
Krinn, as I understand pump-mode is about compile and pre-compile phases and I need link step cure for the lack of RAM on my mac mini.
NeddySeagoon, I had the idea of doing everything on the i7 but when it came to libraries (or was it a built ppc-binary that was not easily understood by the i7 ? I don't remember well) it failed.
Could I forward objs.o, libs.so and libs.a to the i7 cross-linker from the ppc mini via a linker proxy ? Or is it hopeless ?
Thanks for reading, at least.
Back to top
View user's profile Send private message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Sun Sep 16, 2012 8:37 pm    Post subject: Reply with quote

@NeddySeagoon : I've tried again
Code:
powerpc-unknown-linux-gnu-emerge firefox
which got no further than a failure on gettext. Far from the end, so ;-)
I guess I am not smart enough to use cross-emerge.
Would it have succeeded, I would have prefered to let the mac-mini autonomous for things smaller than biggies as mozillas or libreoffice.
Keeping in sync portage configuration between the mini and the i7 is something I guess I will not be able to cope with efficiently.
I thought about having nfs serving my / on the mini but I guess (yes, lot of potentially bad guessing, sorry) this is dangerous.

PS
checking for working acl_get_file... cross-compiling
checking for acl... no
checking for getacl... no
checking for aclx_get... no
checking for statacl... no
configure: error: ACLs enabled but support not detected
configure: error: ./configure failed for gettext-tools
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54033
Location: 56N 3W

PostPosted: Sun Sep 16, 2012 8:41 pm    Post subject: Reply with quote

sno35,

Does your target have USE=acl enabled?
Check its emerge --info
If not, turn it off in your cross environment too
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Sun Sep 16, 2012 9:11 pm    Post subject: Reply with quote

Yes, it does. Though I don't remember why or even if I did anything on purpose about that.
Code:
eix -e gettext
gives
Code:
[I] sys-devel/gettext
     Available versions:  0.18.1.1-r1 (~)0.18.1.1-r2 0.18.1.1-r3 {{acl -cvs +cxx doc elibc_FreeBSD elibc_glibc emacs git java nls openmp static-libs}}
     Installed versions:  0.18.1.1-r3(21:55:53 07/09/2011)(acl elibc_glibc git java nls openmp -doc -elibc_FreeBSD -emacs -nocxx -static-libs)
Back to top
View user's profile Send private message
sno35
Guru
Guru


Joined: 15 May 2004
Posts: 334
Location: Paris, France

PostPosted: Tue Sep 18, 2012 8:49 pm    Post subject: Reply with quote

Krinn,
As an after thought, I tried setting gold as the linker on the ppc mac mini and got :
Code:
/var/tmp/portage/mail-client/thunderbird-15.0.1/work/comm-release/mozilla/memory/jemalloc/jemalloc.c:6141: error: unsupported reloc 75
../../dist/lib/libmemory.a(jemalloc.o)(.debug_loc+0x23bf): error: unsupported reloc 78
../../dist/lib/libmemory.a(jemalloc.o)(.debug_loc+0x23cf): error: unsupported reloc 78

I am not sure I've done things right, as I selected gold as linker while thunderbird was compiled (not link phase yet, of course!), but googling around this I read that gold support for powerpc is poor. So my bet is I can not yet use ld.gold as my linker on this platform. What could I do about it ?

My next try : nfs + cross-ld.bfd by hand on the i7. No nuts, no glory.
EDIT: not even this I know how to do it : shared libraries and rpath while not in a chroot around the nfs mount :/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum