On Tue, Jul 3, 2018 at 12:40 PM Bruce Dubbs <[email protected]> wrote:
> On 06/29/2018 07:32 PM, Don Cross wrote: > > I wasn't sure whether to send this to lfs-support or lfs-dev. Since I'm > > not a developer on LFS, I guessed the former. Apologies if my guess is > > unhelpful. > > > > I built LFS using jhalfs and the 8.2 version of the book on a machine > > with an Intel G860 processor. The configure script for libffi guessed > > wrong about the processor's capabilities, causing Python 3 to crash with > > an invalid instruction exception. > > > > I fixed this by changing the jhalfs script 115_libffi to let gcc > > determine the architecture rather than the configure script itself: > > > > ./configure --prefix=/usr --disable-static --with-gcc-arch=native > > In the libffi source directory, can you pelease tell us what the output > of ./config.guess > > In my case it is x86_64-unknown-linux-gnu. > > -- Bruce > Hi Bruce, I see the same thing: don@neptune:/sources/libffi-3.2.1 $ ./config.guess x86_64-unknown-linux-gnu However, I believe the smoking gun is in the output of ./configure when I leave out the --with-gcc-arch=native. If I diff the output of ./configure without that native option (bad.txt) against the output with that option (good.txt) I get: don@neptune:/sources/libffi-3.2.1 $ ./configure --prefix=/usr --disable-static > bad.txt don@neptune:/sources/libffi-3.2.1 $ ./configure --prefix=/usr --disable-static --with-gcc-arch=native > good.txt don@neptune:/sources/libffi-3.2.1 $ diff bad.txt good.txt 106,110c106,108 < checking for x86 cpuid 0 output... d:756e6547:6c65746e:49656e69 < checking for x86 cpuid 1 output... 206a7:2100800:d9ae3bf:bfebfbff < checking whether C compiler accepts -march=corei7-avx... yes < checking for gcc architecture flag... -march=corei7-avx < checking whether C compiler accepts -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=corei7-avx... yes --- > checking whether C compiler accepts -march=native... yes > checking for gcc architecture flag... -march=native > checking whether C compiler accepts -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=native... yes I'm not sure how ./configure comes up with corei7-avx, but the Intel G860 does not support Advanced Vector eXtension instructions. I think --with-gcc-arch=native is going to give the vast number of LFS builders the correct output. If they are cross-compiling, they are going to have to go through the pain of figuring out the target architecture settings anyway, so they will be no worse off. Don
-- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
