Opened 10 years ago

Closed 10 years ago

#3507 closed task (worksforme)

LFS 7.5 rc 1 gcc breaks during cvs blfs install

Reported by: mike campbell Owned by: lfs-book@…
Priority: normal Milestone: 7.6
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

Building gcc-4.8.2 according to lfs 7.5-rc1 instructions results in a broken compiler after install of libffi in blfs. I was able to repeat this error multiple times. I finally figured out to reinstall gcc with blfs instructions before libffi.

Change History (9)

comment:1 by Pierre Labastie, 10 years ago

I build and install libffi very early after LFS, and have built numerous packages with this configuration without problem. What do you mean your compiler is broken? What is the exact error? Correcting the error by reinstalling the compiler may just mean that the compiler is somehow broken independently of libffi (and that libffi exposes the breakage).

comment:2 by mike campbell, 10 years ago

Can't remember the exact error, but something along the lines of not have a compiler capable of C code compilation. There is no reinstalling GCC, I have had to rebuild from a saved image first, then start over. It seems that GCC includes a copy of libffi and there may be a conflict. From the BLFS book - " The first two sed commands prevent the installation of the libffi library bundled with GCC, since it is outdated compared to libffi-3.0.13."

comment:3 by bdubbs@…, 10 years ago

I'm tempted to mark this 'worksforme'. We've had several satisfactory reports of -rc1 and this is the only report of this problem. We need to be able to reproduce it.

comment:4 by mike campbell, 10 years ago

It may just be me, to admit I am self taught and prone to mistakes. Lfs works fine, I am able to build it start to end and boot into it. It breaks during the Blfs installation. I install libffi to satisfy a dependency, then try to compile next package and it faults during configure phase, finds gcc then tells me it is unable to generate c code. If I install gcc using the sed's in blfs, then libffi, everything is fine. I only install the c and cxx during that recompile. This is on a AMD Phenom 3 laptop, approx 3 years old compiling 64 bit if that helps.

Last edited 10 years ago by mike campbell (previous) (diff)

comment:5 by ken@…, 10 years ago

I assume you have now gone past this stage, which means you would need to do a fresh build to replicate the error. If you are willing to do that, then look at what config.log says (search for the error message - I suppose something like 'C compiler cannot create executables' - in 'less' or 'view' using '/' to search, and escaping any space with \ ).

Then look at the lines _above_ that, to see what error message came from compiling or linking.

If the problem isn't apparent when you have the detailed error, please take it to the -support list. FWIW, I'm another "works for me" - I build libffi in chroot before I reboot, and I've so far done that in three 7.5 builds without any problems (and successfully built many packages after rebooting).

I had a somewhat similar problem once, but that was when my scripts passed some ppc64 CFLAGS to an x86 or x86_64 compile - yeah, most of us also make mistakes.

I also note that you haven't said _which_ package causes the error, apparently libffi itself built and installed without a problem. But then, you said that reinstalling gcc _before_ libffi fixed this. That does not make sense.

comment:6 by mike campbell, 10 years ago

To clarify, GCC "C compiler cannot create executables" error is received on next package after libffi is installed, then I restored to a fresh LFS from back up and tried again. Again after libffi is installed next package errors during configure. Different package this time. Again restored to fresh LFS from back up. This time did a google search which led me to the BLFS mention of libffi on their GCC install, with the two sed commands to inhibit GCC from installing internal copy. So this time I installed GCC from BLFS with the sed commands (just the C and CXX compilers) and continued on, libffi installed no issue and all packages afterward installed no issue. Each time I began from the same image of LFS, the one I had backed up after the kernel install in the book.

comment:7 by bdubbs@…, 10 years ago

Severity: blockernormal

comment:8 by bdubbs@…, 10 years ago

Milestone: 7.57.6
Priority: highnormal

comment:9 by bdubbs@…, 10 years ago

Resolution: worksforme
Status: newclosed

We've tested and can't reproduce the problem. Marking worksforme, but reopen if this can be duplicated by a completely fresh build of LFS-7.5.

Note: See TracTickets for help on using tickets.