On 10/1/15 7:20 AM, Pierre Labastie wrote:
I am not sure, but it seems that the recent thread about this problem pointed to cc1plus (the c++ front end in libexec), see http://lists.linuxfromscratch.org/pipermail/blfs-support/2015-September/077082.html

It may be that GMP is at fault, but if so, it has been statically linked into cc1plus. So, after recompiling gmp, it would be necessary to recompile gcc.

Pierre

First, thanks for helping out a newb. I appreciate your patience and substantive responses. Second, I truly appreciate your and Douglas Reno's responses. Both were correct. The thread http://lists.linuxfromscratch.org/pipermail/blfs-support/2015-September/077082.html covers the issue in detail, but I will summarize for posterity:

There appears to be a dependency on the Virtualbox Host's CPU in the GMP code. Mike Shell points to the correct test for the issue in http://lists.linuxfromscratch.org/pipermail/blfs-support/2015-September/077091.html, this is the hack that I used:

echo '#include <limits>' > dummy.c && g++ -c dummy.c

Which, on a broken toolchain, results in:

In file included from dummy.c:1:0:
/usr/include/c++/5.2.0/limits:1598:7: internal compiler error: Illegal instruction
       min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
       ^
0xa527df crash_signal
    ../../gcc-5.2.0/gcc/toplev.c:383
0x7fa191d9e64f ???
/sources/7.8-rc1/glibc-2.22/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

The solution that I used was pointed out by William Harrington in http://lists.linuxfromscratch.org/pipermail/blfs-support/2015-September/077094.html. In order to apply the solution, I reverted my mac-arch vm to just after 6.16 (pre GCC, ideally, you would go back to 6.14, but I only had snapshots for just after 6.10 where the tool chain is adjusted and just after 6.16 before GCC). This brings the LFS machine to a state, just prior to the big honking build of GCC. I then redid the GMP build described in 6.14, but as follows (ala William Harrington's solution):

== 6.14. GMP-6.0.0a

tar xvf gmp-6.0.0a.tar.xz
cd gmp-6.0.0

# added the next two steps to avoid cpu issues while moving between
# the mac host and the dell host - basically using a generic configuration
# rather than an optimized version... or somesuch

cp -v  config{fsf,}.guess
# ‘configfsf.guess’ -> ‘config.guess’

cp -v config{fsf,}.sub
# ‘configfsf.sub’ -> ‘config.sub’


./configure --prefix=/usr    \
            --enable-cxx     \
            --disable-static \
            --docdir=/usr/share/doc/gmp-6.0.0a

make && make html

make check 2>&1 | tee gmp-check-log

awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log
# should return 188

make install && make install-html

cd ..
rm -fr ./gmp-6.0.0

==

I then rebuilt GCC following the steps in the book and exported the VM from my mac host to the dell host. I brought the dell VM up and retried the offending code - success!

Bruce noted in http://lists.linuxfromscratch.org/pipermail/blfs-support/2015-September/077108.html that he would be updating the book, but I wanted to summarize as this was a related, but not identical thread.

Thanks all.
--
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

Reply via email to