[gentoo-user] Re: emerge -e errors right after install

2013-08-17 Thread Michael Palimaka

On 17/08/2013 08:38, Walter Dnes wrote:


   I have the following in make.conf

CFLAGS=-O2 -march=native -fomit-frame-pointer -pipe -fno-unwind-tables 
-fno-asynchronous-unwind-tables
CXXFLAGS=${CFLAGS}

...where -march=native will always work correctly for a local build.
The only possible worry is if you're cross-compiling and or distributing
a binary to multiple machines.  It also saves me the headache of
figuring out the CFLAGS setting whenever I get a new machine.  You still
have to set up the correct processor in the kernel, however.



While -march=native is generally good advice, GCC is not perfect and on 
occasion it can flags to be enabled that are not supported, resulting in 
the invalid instruction error.





Re: [gentoo-user] Re: emerge -e errors right after install

2013-08-17 Thread Francisco Ares
2013/8/16 Walter Dnes waltd...@waltdnes.org

 On Fri, Aug 16, 2013 at 03:18:35PM -0300, Francisco Ares wrote

  You were right.  I have overlooked the type of the new machine's CPU (it
 is
  a Pentium(R) Dual-Core  CPU and the other one, already working, is a
  Intel(R) Core(TM)2 Duo CPU). So, a march=nocona instead of a
  march=core2 seems to have solved the problem.

   I have the following in make.conf

 CFLAGS=-O2 -march=native -fomit-frame-pointer -pipe -fno-unwind-tables
 -fno-asynchronous-unwind-tables
 CXXFLAGS=${CFLAGS}

 ...where -march=native will always work correctly for a local build.
 The only possible worry is if you're cross-compiling and or distributing
 a binary to multiple machines.  It also saves me the headache of
 figuring out the CFLAGS setting whenever I get a new machine.  You still
 have to set up the correct processor in the kernel, however.

 --
 Walter Dnes waltd...@waltdnes.org
 I don't run desktop environments; I run useful applications


Yes, that is the problem. I got the oldest CPU on witch the same binaries
will run. The newest uses an Intel I3, but the oldest ones run on a Dual
Core (not Core-2, as my first assumption).

Thanks for the other parameters though, I have never tried them. Gonna take
a look.

Francisco


Re: [gentoo-user] Re: emerge -e errors right after install

2013-08-17 Thread Francisco Ares
2013/8/17 Michael Palimaka kensing...@gentoo.org

 On 17/08/2013 08:38, Walter Dnes wrote:


I have the following in make.conf

 CFLAGS=-O2 -march=native -fomit-frame-pointer -pipe -fno-unwind-tables
 -fno-asynchronous-unwind-**tables
 CXXFLAGS=${CFLAGS}

 ...where -march=native will always work correctly for a local build.
 The only possible worry is if you're cross-compiling and or distributing
 a binary to multiple machines.  It also saves me the headache of
 figuring out the CFLAGS setting whenever I get a new machine.  You still
 have to set up the correct processor in the kernel, however.


 While -march=native is generally good advice, GCC is not perfect and on
 occasion it can flags to be enabled that are not supported, resulting in
 the invalid instruction error.



Thanks, that is a good point to be aware of.

Francisco


[gentoo-user] Re: emerge -e errors right after install

2013-08-16 Thread Michael Palimaka

On 16/08/2013 23:22, Francisco Ares wrote:

  26892 Illegal instruction | $AWK -f $ac_tmp/subs.awk 
  31167 Illegal instruction | $AWK -f $tmp/subs.awk  $tmp/out

 [...]

I have built binary packages for sed and gawk, created in a machine
with the same characteristics and configuration, and emerged those to
the new machine.  Even so, the errors keep coming.


It could be an issue with faulty memory, or problem with glibc.

Often though, illegal instruction is the result of a mismatch between 
the host, and the target for which the binary was compiled.

This could be checked by comparing /proc/cpuinfo with your CFLAGs.




Re: [gentoo-user] Re: emerge -e errors right after install

2013-08-16 Thread Francisco Ares
2013/8/16 Michael Palimaka kensing...@gentoo.org

 On 16/08/2013 23:22, Francisco Ares wrote:

   26892 Illegal instruction | $AWK -f $ac_tmp/subs.awk 
   31167 Illegal instruction | $AWK -f $tmp/subs.awk  $tmp/out

  [...]

  I have built binary packages for sed and gawk, created in a machine
 with the same characteristics and configuration, and emerged those to
 the new machine.  Even so, the errors keep coming.


 It could be an issue with faulty memory, or problem with glibc.

 Often though, illegal instruction is the result of a mismatch between the
 host, and the target for which the binary was compiled.
 This could be checked by comparing /proc/cpuinfo with your CFLAGs.



Thanks, gonna check that.

Francisco


Re: [gentoo-user] Re: emerge -e errors right after install

2013-08-16 Thread Francisco Ares
2013/8/16 Francisco Ares fra...@gmail.com


 2013/8/16 Michael Palimaka kensing...@gentoo.org

 On 16/08/2013 23:22, Francisco Ares wrote:

   26892 Illegal instruction | $AWK -f $ac_tmp/subs.awk 
   31167 Illegal instruction | $AWK -f $tmp/subs.awk  $tmp/out

  [...]

  I have built binary packages for sed and gawk, created in a machine
 with the same characteristics and configuration, and emerged those to
 the new machine.  Even so, the errors keep coming.


 It could be an issue with faulty memory, or problem with glibc.

 Often though, illegal instruction is the result of a mismatch between the
 host, and the target for which the binary was compiled.
 This could be checked by comparing /proc/cpuinfo with your CFLAGs.



 Thanks, gonna check that.

 Francisco



You were right.  I have overlooked the type of the new machine's CPU (it is
a Pentium(R) Dual-Core  CPU and the other one, already working, is a
Intel(R) Core(TM)2 Duo CPU). So, a march=nocona instead of a
march=core2 seems to have solved the problem.

Thank you!
Francisco


Re: [gentoo-user] Re: emerge -e errors right after install

2013-08-16 Thread Walter Dnes
On Fri, Aug 16, 2013 at 03:18:35PM -0300, Francisco Ares wrote

 You were right.  I have overlooked the type of the new machine's CPU (it is
 a Pentium(R) Dual-Core  CPU and the other one, already working, is a
 Intel(R) Core(TM)2 Duo CPU). So, a march=nocona instead of a
 march=core2 seems to have solved the problem.

  I have the following in make.conf

CFLAGS=-O2 -march=native -fomit-frame-pointer -pipe -fno-unwind-tables 
-fno-asynchronous-unwind-tables
CXXFLAGS=${CFLAGS}

...where -march=native will always work correctly for a local build.
The only possible worry is if you're cross-compiling and or distributing
a binary to multiple machines.  It also saves me the headache of
figuring out the CFLAGS setting whenever I get a new machine.  You still
have to set up the correct processor in the kernel, however.

-- 
Walter Dnes waltd...@waltdnes.org
I don't run desktop environments; I run useful applications