Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Compiling over SSH
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
skiwarz
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2014
Posts: 128

PostPosted: Wed Mar 26, 2014 11:18 pm    Post subject: Compiling over SSH Reply with quote

I'm trying to build linux starting from what I believe is stage 1. However, the live CD and the files I have do not have a compiler for some reason. Now, I have a couple other PCs running gentoo. Is it possible to SSH from one of those IN TO my installation computer and us one of those other computers' compiler over SSH to compile code?
In other words, I have computer A with a full, complete gentoo installation on it. Then I have computer B with a very basic live CD and no compiler. Can I use the compiler on computer A to compile code on computer B over ssh or some other protocol?
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Thu Mar 27, 2014 12:11 am    Post subject: Reply with quote

you need a compiler to compile a compiler. no compiler no dice.

you could have a live cd with compiler compile a compiler for a stage1 that does not have a compiler. idk i havent touched gentoo in that way. i have done LFS in that way before though so i know its possible. ssh to live cd should be possible so long as live cd has ssh & a passwd on root, and a means to connect to it, ie networking.
Back to top
View user's profile Send private message
skiwarz
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2014
Posts: 128

PostPosted: Thu Mar 27, 2014 12:21 am    Post subject: Reply with quote

So in other words, the compiler that compiles the compiler MUST be located on the "new" machine?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13842

PostPosted: Thu Mar 27, 2014 1:34 am    Post subject: Reply with quote

The compiler that compiles the compiler must have filesystem access to the source files for the compiler being compiled. Usually this means that the sources are on the computer doing the compilation, but you could use a network filesystem. The easiest solution would be for you to use a binpkg to bootstrap.
Back to top
View user's profile Send private message
vaxbrat
l33t
l33t


Joined: 05 Oct 2005
Posts: 731
Location: DC Burbs

PostPosted: Thu Mar 27, 2014 5:40 am    Post subject: possible cheat Reply with quote

First off, I assume your new box is the same arch as the existing gentoo boxes. Otherwise you are asking about how to do cross compiling (eg building a PowerPC target on an amd64 host).

One possible cheat is to sneak the files for gcc from one of the existing gentoo boxes to the new box. Do an

Code:
equery files gcc


on an existing box and then gather up all of the files listed to copy over to the target. This will be a mess that can't be trusted initially for anything other than compiling basic C sources, but you will end up re-emerging everything at least one while bootstrapping yourself up to a stage3.

The last time I did a stage1 was probably 10 years ago. I'm surprised there wasn't an existing gcc in the stage1 tarball tho.
Back to top
View user's profile Send private message
skiwarz
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2014
Posts: 128

PostPosted: Thu Mar 27, 2014 2:38 pm    Post subject: Reply with quote

Yes, same arch. Thanks for the suggestions. I think what I'm going to do is just forget about this whole approach. Going to install gentoo completely on this box from stage3, then try installing LFS in another partition. Same end result, I guess, and I think LFS would offer considerably more learning potential than going from stage1.
Yeah, maybe I missed something or downloaded the wrong thing, but no compiler in here.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Mar 27, 2014 6:46 pm    Post subject: Reply with quote

skiwarz,


You can use a stage3 tarball to do a stage1 install if you wish.
There are only a few extra steps.

After you are in the chroot with your snapshot unpacked, do the following

Code:
emerge --sync
/usr/portage/scripts/bootstrap.sh
emerge -e @system


Thats stage1 and stage2 ... now go back to the handbook.
_________________
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
skiwarz
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2014
Posts: 128

PostPosted: Thu Mar 27, 2014 7:06 pm    Post subject: Reply with quote

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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