* [gentoo-user] Compiling for different CPU but same architecture
@ 2014-08-01 3:53 Nilesh Govindrajan
2014-08-01 5:46 ` Canek Peláez Valdés
0 siblings, 1 reply; 15+ messages in thread
From: Nilesh Govindrajan @ 2014-08-01 3:53 UTC (permalink / raw
To: Gentoo User Mailing List
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
What's the easiest way to compile Gentoo for another amd64 machine? I have
a i5 desktop, and the laptop I have seems to be a subset of corei7 as per
GCC native option.
The basic installation was done using distcc, but it's not as fast as
compiling completely on my machine. May be I should not put local host in
distcc configuration? (It's a Pentium quad core 2.6 GHz).
[-- Attachment #2: Type: text/html, Size: 403 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 3:53 [gentoo-user] Compiling for different CPU but same architecture Nilesh Govindrajan
@ 2014-08-01 5:46 ` Canek Peláez Valdés
2014-08-01 5:59 ` wraeth
0 siblings, 1 reply; 15+ messages in thread
From: Canek Peláez Valdés @ 2014-08-01 5:46 UTC (permalink / raw
To: gentoo-user
On Thu, Jul 31, 2014 at 10:53 PM, Nilesh Govindrajan <me@nileshgr.com> wrote:
> What's the easiest way to compile Gentoo for another amd64 machine? I have a
> i5 desktop, and the laptop I have seems to be a subset of corei7 as per GCC
> native option.
> The basic installation was done using distcc, but it's not as fast as
> compiling completely on my machine. May be I should not put local host in
> distcc configuration? (It's a Pentium quad core 2.6 GHz).
If you have enough disk space, simply use a chroot with a copy of the
target /etc directory, and create binary packages that the target
machine can use by simply passing -k to emerge.
If you are using systemd, even better, use systemd-nswpan.
Regards.
--
Canek Peláez Valdés
Profesor de asignatura, Facultad de Ciencias
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 5:46 ` Canek Peláez Valdés
@ 2014-08-01 5:59 ` wraeth
2014-08-01 7:53 ` Neil Bothwick
0 siblings, 1 reply; 15+ messages in thread
From: wraeth @ 2014-08-01 5:59 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 595 bytes --]
On Fri, 2014-08-01 at 00:46 -0500, Canek Peláez Valdés wrote:
> If you are using systemd, even better, use systemd-nswpan.
systemd-nspawn is quite a useful utility for working in a chroot -
almost a complete virtual machine without the overhead.
I also came across a handy introduction to it [1] too, by none other
than rich0 (one of our esteemed devs) - it's worth a read (particularly
when you try using it without DEVPTS_MULTIPLE_INSTANCES set - that was
fun!).
[1] http://rich0gentoo.wordpress.com/2014/07/14/quick-systemd-nspawn-guide/
--
wraeth <wraeth@wraeth.id.au>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 5:59 ` wraeth
@ 2014-08-01 7:53 ` Neil Bothwick
2014-08-01 8:01 ` Nilesh Govindrajan
0 siblings, 1 reply; 15+ messages in thread
From: Neil Bothwick @ 2014-08-01 7:53 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
On Fri, 01 Aug 2014 15:59:56 +1000, wraeth wrote:
> systemd-nspawn is quite a useful utility for working in a chroot -
> almost a complete virtual machine without the overhead.
>
> I also came across a handy introduction to it [1] too, by none other
> than rich0 (one of our esteemed devs) - it's worth a read (particularly
> when you try using it without DEVPTS_MULTIPLE_INSTANCES set - that was
> fun!).
>
> [1]
> http://rich0gentoo.wordpress.com/2014/07/14/quick-systemd-nspawn-guide/
I saw that a couple of weeks ago and thought "I'll try that when I get
time". The time needed turned out to be about 5 minutes, it's so much
easier than using a chroot.
--
Neil Bothwick
WinErr 014: Keyboard locked - Try anything you can think of.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 7:53 ` Neil Bothwick
@ 2014-08-01 8:01 ` Nilesh Govindrajan
2014-08-01 8:09 ` Neil Bothwick
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Nilesh Govindrajan @ 2014-08-01 8:01 UTC (permalink / raw
To: gentoo-user
On Fri, 2014-08-01 at 08:53 +0100, Neil Bothwick wrote:
> On Fri, 01 Aug 2014 15:59:56 +1000, wraeth wrote:
>
> > systemd-nspawn is quite a useful utility for working in a chroot -
> > almost a complete virtual machine without the overhead.
> >
> > I also came across a handy introduction to it [1] too, by none other
> > than rich0 (one of our esteemed devs) - it's worth a read (particularly
> > when you try using it without DEVPTS_MULTIPLE_INSTANCES set - that was
> > fun!).
> >
> > [1]
> > http://rich0gentoo.wordpress.com/2014/07/14/quick-systemd-nspawn-guide/
>
> I saw that a couple of weeks ago and thought "I'll try that when I get
> time". The time needed turned out to be about 5 minutes, it's so much
> easier than using a chroot.
>
>
systemd-nspawn seems to be interesting. But will it work on my i5?
Because I prefer to use -march=native. For using distcc I copied all the
flags that gcc selects in march=native mode to make.conf.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 8:01 ` Nilesh Govindrajan
@ 2014-08-01 8:09 ` Neil Bothwick
2014-08-01 8:23 ` wraeth
2014-08-01 11:45 ` Jc García
2 siblings, 0 replies; 15+ messages in thread
From: Neil Bothwick @ 2014-08-01 8:09 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
On Fri, 01 Aug 2014 13:31:09 +0530, Nilesh Govindrajan wrote:
> systemd-nspawn seems to be interesting. But will it work on my i5?
> Because I prefer to use -march=native. For using distcc I copied all the
> flags that gcc selects in march=native mode to make.conf.
.
Do the same for systemd-nspawn or chroot. Alternatively, set up CFLAGS
that are compatible with both systems and use packages built for the
faster machine on both.
--
Neil Bothwick
Bug: (n.) any program feature not yet described to the marketing
department.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 8:01 ` Nilesh Govindrajan
2014-08-01 8:09 ` Neil Bothwick
@ 2014-08-01 8:23 ` wraeth
2014-08-01 8:25 ` Nilesh Govindrajan
2014-08-01 11:45 ` Jc García
2 siblings, 1 reply; 15+ messages in thread
From: wraeth @ 2014-08-01 8:23 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]
On Fri, 2014-08-01 at 13:31 +0530, Nilesh Govindrajan wrote:
> systemd-nspawn seems to be interesting. But will it work on my i5?
> Because I prefer to use -march=native. For using distcc I copied all the
> flags that gcc selects in march=native mode to make.conf.
systemd-nspawn is described as "a chroot on steroids". It has no impact
on what flags you use for compiling packages.
The advantage of systemd-nspawn is the fact that it actually isolates
and executes the chroot's own init process, either systemd or (as I
understand - haven't tested myself) newer versions of OpenRC. Once
you're in the chroot, things work almost the same as if you had actually
booted the system itself (with some exceptions). It manages mounting the
virtual filesystems it needs, and has built-in functionality for
managing bind mounts if needed (such as binding your portage tree so you
don't have to re-download it).
As Neil said, once inside the chroot, you would still have to manually
set your CFLAGS - "-march=native" is a function of gcc to dynamically
detect the optimal flags to use *at the time it compiles*.
All this is rather meaningless, though, if you don't have systemd on
your host system anyway.
--
wraeth <wraeth@wraeth.id.au>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 8:23 ` wraeth
@ 2014-08-01 8:25 ` Nilesh Govindrajan
2014-08-01 8:37 ` wraeth
0 siblings, 1 reply; 15+ messages in thread
From: Nilesh Govindrajan @ 2014-08-01 8:25 UTC (permalink / raw
To: gentoo-user
On Fri, 2014-08-01 at 18:23 +1000, wraeth wrote:
> On Fri, 2014-08-01 at 13:31 +0530, Nilesh Govindrajan wrote:
> > systemd-nspawn seems to be interesting. But will it work on my i5?
> > Because I prefer to use -march=native. For using distcc I copied all the
> > flags that gcc selects in march=native mode to make.conf.
>
> systemd-nspawn is described as "a chroot on steroids". It has no impact
> on what flags you use for compiling packages.
>
> The advantage of systemd-nspawn is the fact that it actually isolates
> and executes the chroot's own init process, either systemd or (as I
> understand - haven't tested myself) newer versions of OpenRC. Once
> you're in the chroot, things work almost the same as if you had actually
> booted the system itself (with some exceptions). It manages mounting the
> virtual filesystems it needs, and has built-in functionality for
> managing bind mounts if needed (such as binding your portage tree so you
> don't have to re-download it).
>
> As Neil said, once inside the chroot, you would still have to manually
> set your CFLAGS - "-march=native" is a function of gcc to dynamically
> detect the optimal flags to use *at the time it compiles*.
>
> All this is rather meaningless, though, if you don't have systemd on
> your host system anyway.
I wouldn't have taken interest in that one if I didn't have systemd. I'm
using GNOME3 on both my desktop and the laptop, so systemd is a must.
--
Nilesh Govindrajan <me@nileshgr.com>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 8:25 ` Nilesh Govindrajan
@ 2014-08-01 8:37 ` wraeth
0 siblings, 0 replies; 15+ messages in thread
From: wraeth @ 2014-08-01 8:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 302 bytes --]
On Fri, 2014-08-01 at 13:55 +0530, Nilesh Govindrajan wrote:
> I wouldn't have taken interest in that one if I didn't have systemd. I'm
> using GNOME3 on both my desktop and the laptop, so systemd is a must.
Yes, well, I thought it prudent just to make sure ;)
--
wraeth <wraeth@wraeth.id.au>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 8:01 ` Nilesh Govindrajan
2014-08-01 8:09 ` Neil Bothwick
2014-08-01 8:23 ` wraeth
@ 2014-08-01 11:45 ` Jc García
2014-08-01 11:51 ` Neil Bothwick
2 siblings, 1 reply; 15+ messages in thread
From: Jc García @ 2014-08-01 11:45 UTC (permalink / raw
To: gentoo-user
2014-08-01 2:01 GMT-06:00 Nilesh Govindrajan <me@nileshgr.com>:
> On Fri, 2014-08-01 at 08:53 +0100, Neil Bothwick wrote:
>> On Fri, 01 Aug 2014 15:59:56 +1000, wraeth wrote:
>>
>> > systemd-nspawn is quite a useful utility for working in a chroot -
>> > almost a complete virtual machine without the overhead.
>> >
>> > I also came across a handy introduction to it [1] too, by none other
>> > than rich0 (one of our esteemed devs) - it's worth a read (particularly
>> > when you try using it without DEVPTS_MULTIPLE_INSTANCES set - that was
>> > fun!).
>> >
>> > [1]
>> > http://rich0gentoo.wordpress.com/2014/07/14/quick-systemd-nspawn-guide/
>>
>> I saw that a couple of weeks ago and thought "I'll try that when I get
>> time". The time needed turned out to be about 5 minutes, it's so much
>> easier than using a chroot.
>>
>>
>
> systemd-nspawn seems to be interesting. But will it work on my i5?
> Because I prefer to use -march=native. For using distcc I copied all the
> flags that gcc selects in march=native mode to make.conf.
>
>
I don't think what CFLAGS you are using matters for using
systemd-nspawn, but In my tests, It can be used for typical chroot and
installation of a stage3 with openrc, but if you want to use '-b' to
boot the container you need systemd on host and container.
Here's another guide[1] by a gentoo dev, but on CFLAGS, -march=native
and using distcc.
[1] http://blogs.gentoo.org/mgorny/2014/06/23/inlining-marchnative-for-distcc/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 11:45 ` Jc García
@ 2014-08-01 11:51 ` Neil Bothwick
2014-08-01 12:00 ` Jc García
0 siblings, 1 reply; 15+ messages in thread
From: Neil Bothwick @ 2014-08-01 11:51 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 608 bytes --]
On Fri, 1 Aug 2014 05:45:36 -0600, Jc García wrote:
> > systemd-nspawn seems to be interesting. But will it work on my i5?
> > Because I prefer to use -march=native. For using distcc I copied all
> > the flags that gcc selects in march=native mode to make.conf.
> >
> >
> I don't think what CFLAGS you are using matters for using
> systemd-nspawn.
If you are using a chroot to build packages for installation on another
machine, the CFLAGS should be appropriate for the target machine, not the
build host.
--
Neil Bothwick
The quickest way to a man's heart is through his sternum.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 11:51 ` Neil Bothwick
@ 2014-08-01 12:00 ` Jc García
2014-08-01 12:22 ` Nilesh Govindrajan
2014-08-01 12:29 ` Nilesh Govindrajan
0 siblings, 2 replies; 15+ messages in thread
From: Jc García @ 2014-08-01 12:00 UTC (permalink / raw
To: gentoo-user
2014-08-01 5:51 GMT-06:00 Neil Bothwick <neil@digimed.co.uk>:
> On Fri, 1 Aug 2014 05:45:36 -0600, Jc García wrote:
>
>> > systemd-nspawn seems to be interesting. But will it work on my i5?
>> > Because I prefer to use -march=native. For using distcc I copied all
>> > the flags that gcc selects in march=native mode to make.conf.
>> >
>> >
>> I don't think what CFLAGS you are using matters for using
>> systemd-nspawn.
>
> If you are using a chroot to build packages for installation on another
> machine, the CFLAGS should be appropriate for the target machine, not the
> build host.
>
Maybe I misinterpreted what he was asking, I was only thinking about
the part of using nspawn as a replacement for chroot, not beyond that,
but you're right.
>
> --
> Neil Bothwick
>
> The quickest way to a man's heart is through his sternum.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 12:00 ` Jc García
@ 2014-08-01 12:22 ` Nilesh Govindrajan
2014-08-01 13:04 ` Jc García
2014-08-01 12:29 ` Nilesh Govindrajan
1 sibling, 1 reply; 15+ messages in thread
From: Nilesh Govindrajan @ 2014-08-01 12:22 UTC (permalink / raw
To: gentoo-user
On Fri, 2014-08-01 at 06:00 -0600, Jc García wrote:
> 2014-08-01 5:51 GMT-06:00 Neil Bothwick <neil@digimed.co.uk>:
> > On Fri, 1 Aug 2014 05:45:36 -0600, Jc García wrote:
> >
> >> > systemd-nspawn seems to be interesting. But will it work on my i5?
> >> > Because I prefer to use -march=native. For using distcc I copied all
> >> > the flags that gcc selects in march=native mode to make.conf.
> >> >
> >> >
> >> I don't think what CFLAGS you are using matters for using
> >> systemd-nspawn.
> >
> > If you are using a chroot to build packages for installation on another
> > machine, the CFLAGS should be appropriate for the target machine, not the
> > build host.
> >
> Maybe I misinterpreted what he was asking, I was only thinking about
> the part of using nspawn as a replacement for chroot, not beyond that,
> but you're right.
> >
> > --
> > Neil Bothwick
> >
> > The quickest way to a man's heart is through his sternum.
>
Why it shouldn't matter? What if a package's building process depends on
some other package? Though the build process isn't for a completely
different arch, it might matter. That's my doubt.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 12:00 ` Jc García
2014-08-01 12:22 ` Nilesh Govindrajan
@ 2014-08-01 12:29 ` Nilesh Govindrajan
1 sibling, 0 replies; 15+ messages in thread
From: Nilesh Govindrajan @ 2014-08-01 12:29 UTC (permalink / raw
To: gentoo-user
On Fri, 2014-08-01 at 06:00 -0600, Jc García wrote:
> 2014-08-01 5:51 GMT-06:00 Neil Bothwick <neil@digimed.co.uk>:
> > On Fri, 1 Aug 2014 05:45:36 -0600, Jc García wrote:
> >
> >> > systemd-nspawn seems to be interesting. But will it work on my i5?
> >> > Because I prefer to use -march=native. For using distcc I copied all
> >> > the flags that gcc selects in march=native mode to make.conf.
> >> >
> >> >
> >> I don't think what CFLAGS you are using matters for using
> >> systemd-nspawn.
> >
> > If you are using a chroot to build packages for installation on another
> > machine, the CFLAGS should be appropriate for the target machine, not the
> > build host.
> >
> Maybe I misinterpreted what he was asking, I was only thinking about
> the part of using nspawn as a replacement for chroot, not beyond that,
> but you're right.
> >
> > --
> > Neil Bothwick
> >
> > The quickest way to a man's heart is through his sternum.
>
Why it shouldn't matter? What if a package's building process depends on
some other package? Though the build process isn't for a completely
different arch, it might matter. That's my doubt.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-user] Compiling for different CPU but same architecture
2014-08-01 12:22 ` Nilesh Govindrajan
@ 2014-08-01 13:04 ` Jc García
0 siblings, 0 replies; 15+ messages in thread
From: Jc García @ 2014-08-01 13:04 UTC (permalink / raw
To: gentoo-user
2014-08-01 6:22 GMT-06:00 Nilesh Govindrajan <me@nileshgr.com>:
>
> Why it shouldn't matter? What if a package's building process depends on
> some other package? Though the build process isn't for a completely
> different arch, it might matter. That's my doubt.
>
>
If you want to build packages(tbz2), especifically for one machine,
and you setup a container to do the building there you will have
everything you need and you can have /etc/portage in sync, the issue
might be if you want to reuse packages on both machines you would have
to ensure the package and dependencies use -mtune=generic, but you
still can have use flags differing that's more trouble.
I wanted to do the same as you, but my resources are more constrained,
I have an i3 desktop, where I have a container building for an
amd-e2100 netbook(mostly for large packages), I didn't use distcc
since building in the netbook doesn't really make the building much
faster, but if I had more resources I would try to use distcc in pump
mode.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2014-08-01 13:04 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-01 3:53 [gentoo-user] Compiling for different CPU but same architecture Nilesh Govindrajan
2014-08-01 5:46 ` Canek Peláez Valdés
2014-08-01 5:59 ` wraeth
2014-08-01 7:53 ` Neil Bothwick
2014-08-01 8:01 ` Nilesh Govindrajan
2014-08-01 8:09 ` Neil Bothwick
2014-08-01 8:23 ` wraeth
2014-08-01 8:25 ` Nilesh Govindrajan
2014-08-01 8:37 ` wraeth
2014-08-01 11:45 ` Jc García
2014-08-01 11:51 ` Neil Bothwick
2014-08-01 12:00 ` Jc García
2014-08-01 12:22 ` Nilesh Govindrajan
2014-08-01 13:04 ` Jc García
2014-08-01 12:29 ` Nilesh Govindrajan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox