Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-25 Thread Peter Humphrey
On Tuesday, 24 April 2018 20:02:37 BST Walter Dnes wrote:
> On Tue, Apr 24, 2018 at 09:40:52AM +0100, Peter Humphrey wrote
> 
> > Anyway, this all leaves unanswered the question whether getting the
> > -march setting right in a chroot matters to the operation of the
> > chroot itself, as distinct from building good code for the target
> > machine. Personally, I can't see how it can have any such effect.
> 
>   "-march" obviously has to match the target machine that the compiled
> code will run on.  You have to run the query...
> 
> gcc -c -Q -march=native --help=target | grep march=
> 
> ...on the "target machine" to get the necessary value.  That's true,
> regardless of whether the "target machine" is physical hardware, or a
> chroot, or a VM like QEMU/VMWare/etc.  Things can get ugly in some edge
> cases if the final code (-march=) cannot run in the
> build environment (-march=).

--->8

Yes, I understand all that. In my case, the chroot is only used as a build 
environment; nothing ever runs in it except as part of the build process.

Thanks for the extra detail.

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-24 Thread Peter Humphrey
On Monday, 23 April 2018 18:53:09 BST Walter Dnes wrote:

>   https://en.wikipedia.org/wiki/Celeron
> 
> > Celeron is a brand name given by Intel to a number of different
> > low-end IA-32 and x86-64 computer microprocessor models targeted
> > at budget personal computers.
> 
>   Looking at that page, "Celeron" can be a cheap, low end version any
> one of a whole slew of Intel CPUs.  You have to check the cpu to get the
> exact model that it's the low end version of.

..and it doesn't even mention silvermont. The page is 15 months old since its 
last update, which is about the same age as the box in question.

Anyway, this all leaves unanswered the question whether getting the -march 
setting right in a chroot matters to the operation of the chroot itself, as 
distinct from building good code for the target machine. Personally, I can't 
see how it can have any such effect.

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-23 Thread Walter Dnes
On Mon, Apr 23, 2018 at 04:23:18PM +0100, Peter Humphrey wrote

> Ah, that was it. My searching didn't turn that one up - thanks.
> 
> $ gcc -c -Q -march=native --help=target | grep march=
>   -march=   silvermont

  https://en.wikipedia.org/wiki/Celeron

> Celeron is a brand name given by Intel to a number of different
> low-end IA-32 and x86-64 computer microprocessor models targeted
> at budget personal computers.

  Looking at that page, "Celeron" can be a cheap, low end version any
one of a whole slew of Intel CPUs.  You have to check the cpu to get the
exact model that it's the low end version of.

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-23 Thread Peter Humphrey
On Monday, 23 April 2018 11:57:27 BST Mick wrote:
> On Monday, 23 April 2018 10:52:57 BST Peter Humphrey wrote:
> > On Sunday, 22 April 2018 12:13:53 BST Mick wrote:
> > > On Sunday, 22 April 2018 10:21:16 BST Peter Humphrey wrote:
> > > > That first thought was prompted by the instruction to "mount -o bind
> > > > /lib/
> > > > modules /foo/lib/modules" in this page:
> > > > 
> > > > https://wiki.gentoo.org/wiki/Project:X86/Chroot_Guide
> > > 
> > > I didn't do a detailed comparison, but you may want to take a look at
> > > the
> > > Handbook, the chroot mounts appear to be different.
> > 
> > I think I've found the problem. It's in the -march setting, which of
> > course
> > has to be specific in the chroot, not "native." I had it set to
> > "silvermont," but now I can't see why I did that. The target CPU is a
> > celeron N3150, which according to an Intel site is "Products formerly
> > Braswell" [1]. None of the Gentoo or GCC optimisation sites I could find
> > even mention braswell, silvermont or model 76.
> 
> If you check 'man gcc' you will find "silvermont" is mentioned as a cpu_type
> you could set for march, but not the graphics core Braswell.

Yes, so it is, but I couldn't tell which arch I needed for this CPU.

Thanks to you both.

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-23 Thread Peter Humphrey
On Monday, 23 April 2018 11:57:12 BST Walter Dnes wrote:
> > I think I've found the problem. It's in the -march setting, which of
> > course has to be specific in the chroot, not "native." I had it set
> > to "silvermont," but now I can't see why I did that. The target CPU
> > is a celeron N3150, which according to an Intel site is "Products
> > formerly Braswell" [1]. None of the Gentoo or GCC optimisation sites
> > I could find even mention braswell, silvermont or model 76.
> > 
> > So I changed make.conf to braswell, and now I get "error: bad
> > value (braswell) for -march= switch" from the compiler during any
> > emerge.
> 
>   Sounds like an invalid value.  To find out what gcc thinks the machine
> really is, *ON THE CELERON*, execute the command...
> 
> gcc -c -Q -march=native --help=target | grep march=

Ah, that was it. My searching didn't turn that one up - thanks.

$ gcc -c -Q -march=native --help=target | grep march=
  -march=   silvermont

>   On my ancient core2, I get...
> 
>   -march=   core2
> 
>   Use whatever value the above query returns on the Celeron.  Silvermont
> is a recent 64 bit Atom.  For a big list of gcc-7.3 supported cpus, see
> https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/x86-Options.html#x86-Options

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-23 Thread Mick
On Monday, 23 April 2018 10:52:57 BST Peter Humphrey wrote:
> On Sunday, 22 April 2018 12:13:53 BST Mick wrote:
> > On Sunday, 22 April 2018 10:21:16 BST Peter Humphrey wrote:
> > > That first thought was prompted by the instruction to "mount -o bind
> > > /lib/
> > > modules /foo/lib/modules" in this page:
> > > 
> > > https://wiki.gentoo.org/wiki/Project:X86/Chroot_Guide
> > 
> > I didn't do a detailed comparison, but you may want to take a look at the
> > Handbook, the chroot mounts appear to be different.
> 
> I think I've found the problem. It's in the -march setting, which of course
> has to be specific in the chroot, not "native." I had it set to
> "silvermont," but now I can't see why I did that. The target CPU is a
> celeron N3150, which according to an Intel site is "Products formerly
> Braswell" [1]. None of the Gentoo or GCC optimisation sites I could find
> even mention braswell, silvermont or model 76.

If you check 'man gcc' you will find "silvermont" is mentioned as a cpu_type 
you could set for march, but not the graphics core Braswell.

-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-23 Thread Walter Dnes
> I think I've found the problem. It's in the -march setting, which of
> course has to be specific in the chroot, not "native." I had it set
> to "silvermont," but now I can't see why I did that. The target CPU
> is a celeron N3150, which according to an Intel site is "Products
> formerly Braswell" [1]. None of the Gentoo or GCC optimisation sites
> I could find even mention braswell, silvermont or model 76.
> 
> So I changed make.conf to braswell, and now I get "error: bad
> value (braswell) for -march= switch" from the compiler during any
> emerge.

  Sounds like an invalid value.  To find out what gcc thinks the machine
really is, *ON THE CELERON*, execute the command...

gcc -c -Q -march=native --help=target | grep march=

  On my ancient core2, I get...

  -march=   core2

  Use whatever value the above query returns on the Celeron.  Silvermont
is a recent 64 bit Atom.  For a big list of gcc-7.3 supported cpus, see
https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/x86-Options.html#x86-Options

-- 
Walter Dnes 
I don't run "desktop environments"; I run useful applications



Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-23 Thread Peter Humphrey
On Sunday, 22 April 2018 12:13:53 BST Mick wrote:
> On Sunday, 22 April 2018 10:21:16 BST Peter Humphrey wrote:
> > That first thought was prompted by the instruction to "mount -o bind /lib/
> > modules /foo/lib/modules" in this page:
> > 
> > https://wiki.gentoo.org/wiki/Project:X86/Chroot_Guide
> 
> I didn't do a detailed comparison, but you may want to take a look at the
> Handbook, the chroot mounts appear to be different.

I think I've found the problem. It's in the -march setting, which of course 
has to be specific in the chroot, not "native." I had it set to "silvermont," 
but now I can't see why I did that. The target CPU is a celeron N3150, which 
according to an Intel site is "Products formerly Braswell" [1]. None of the 
Gentoo or GCC optimisation sites I could find even mention braswell, 
silvermont or model 76.

So I changed make.conf to braswell, and now I get "error: bad value (braswell) 
for -march= switch" from the compiler during any emerge. Now, does that mean I 
can't switch from silvermont to braswell, or does it also imply that, if I 
start installing again from scratch, I won't be able to switch from whatever's 
in the stage-3 tarball to braswell either?

Perhaps I should just try it and see.

1.  https://ark.intel.com/products/codename/66094/Braswell

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-22 Thread Mick
On Sunday, 22 April 2018 10:21:16 BST Peter Humphrey wrote:
> That first thought was prompted by the instruction to "mount -o bind /lib/
> modules /foo/lib/modules" in this page:
> 
> https://wiki.gentoo.org/wiki/Project:X86/Chroot_Guide

I didn't do a detailed comparison, but you may want to take a look at the 
Handbook, the chroot mounts appear to be different.
-- 
Regards,
Mick

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-22 Thread Peter Humphrey
On Sunday, 22 April 2018 10:21:16 BST Peter Humphrey wrote:
> On Sunday, 22 April 2018 09:39:23 BST Peter Humphrey wrote:
> > On Sunday, 22 April 2018 07:20:28 BST Jonathan Callen wrote:
> > > Generally, this would indicate a problem resolving DNS.  This is
> > > normally caused by not having a correct /etc/resolv.conf inside the
> > > chroot (it generally will need to be the same as the file outside the
> > > chroot).
> > 
> > Yes, I'd already thought of that and found it to be right; it's why I
> > tried
> > www-client/links inside the chroot, which works just fine.
> 
> I forgot to add a couple of things:
> 
> 1.The chroot host (this box) is a multilib system, but the chroot client
> (the celeron box) is no-multilib. Could that make a difference?

That's wrong. They're both on the plain desktop profile. What I should have 
said is that the kernel config has modules disabled - on both client and host.

> 2.While the fetching is hung, /bin/ps shows two emerge processes: one with
> status S and the other with D. Am I right in thinking that portage spawns
> another process to do the fetching, and waits for it to finish? I hope it's
> so anyway.
> 
> That first thought was prompted by the instruction to "mount -o bind /lib/
> modules /foo/lib/modules" in this page:
> 
> https://wiki.gentoo.org/wiki/Project:X86/Chroot_Guide

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-22 Thread Peter Humphrey
On Sunday, 22 April 2018 09:39:23 BST Peter Humphrey wrote:
> On Sunday, 22 April 2018 07:20:28 BST Jonathan Callen wrote:
> > Generally, this would indicate a problem resolving DNS.  This is
> > normally caused by not having a correct /etc/resolv.conf inside the
> > chroot (it generally will need to be the same as the file outside the
> > chroot).
> 
> Yes, I'd already thought of that and found it to be right; it's why I tried
> www-client/links inside the chroot, which works just fine.

I forgot to add a couple of things:

1.  The chroot host (this box) is a multilib system, but the chroot client 
(the celeron box) is no-multilib. Could that make a difference?

2.  While the fetching is hung, /bin/ps shows two emerge processes: one 
with 
status S and the other with D. Am I right in thinking that portage spawns 
another process to do the fetching, and waits for it to finish? I hope it's so 
anyway.

That first thought was prompted by the instruction to "mount -o bind /lib/
modules /foo/lib/modules" in this page:

https://wiki.gentoo.org/wiki/Project:X86/Chroot_Guide

-- 
Regards,
Peter.






Re: [gentoo-user] Re: Can't fetch distfiles in chroot

2018-04-22 Thread Peter Humphrey
On Sunday, 22 April 2018 07:20:28 BST Jonathan Callen wrote:

> Generally, this would indicate a problem resolving DNS.  This is
> normally caused by not having a correct /etc/resolv.conf inside the
> chroot (it generally will need to be the same as the file outside the
> chroot).

Yes, I'd already thought of that and found it to be right; it's why I tried 
www-client/links inside the chroot, which works just fine.

-- 
Regards,
Peter.