Ticket #2188 (closed task: fixed)

Opened 6 months ago

Last modified 2 months ago

Addition to Host System Prequisites - check for ability to compile

Reported by: chris@linuxfromscratch.org Assigned to: bdubbs@linuxfromscratch.org
Priority: normal Milestone: 6.4
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

The Host Sys. Reqs. page does already list various programs needed, but I don't think that's really enough - it is entirely possible to be using a host system that meets all these requirements and is still unable to compile anything. I know the page does say to make sure you have the "development" packages, but I think there should be some actual test to make sure it's all really there. Perhaps, in addition to the list of required software, there should also be a test similar to the toolchain sanity test in the book - something like "echo 'main(){}' > dummy.c && gcc dummy.c" to verify that the host system actually has a usable toolchain.

Change History

10/05/08 15:23:26 changed by bdubbs@linuxfromscratch.org

  • status changed from new to closed.
  • resolution set to wontfix.

I'm going to mark this as wontfix because the requirements checks do actually exercise all the programs, including gcc and ld. This means that they are present. If a system is so broken that it can't link an object program, it probably means that standard libraries are missing.

The broken system will become evident with the very first package that is built.

The purpose of the host system requirements is really to check for mismatches like old versions of executables or symlinks that could cause problems.

10/05/08 15:33:12 changed by matthew@linuxfromscratch.org

Just for info, this happens on Ubuntu systems where one has to do an 'apt-get install lib6-dev' in order to get a toolchain that will actually compile something, despite gcc, glibc & binutils being installed on an out-of-the-box install. crt1.o is required for even the above simple compiler invocation to work, but comes from libc6-dev which isn't installed by default. I've not yet trawled Ubuntu's bug tracker to see whether this has been reported and/or fixed already. I'm not bothered about this being re-opened, but hopefully this little note might act as a workaround for folks with broken hosts like Ubuntu!

10/05/08 15:41:32 changed by bdubbs@linuxfromscratch.org

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 7.0 to 6.4.

OK. I'll do it.

10/05/08 15:41:39 changed by bdubbs@linuxfromscratch.org

  • owner changed from lfs-book@linuxfromscratch.org to bdubbs@linuxfromscratch.org.
  • status changed from reopened to new.

10/05/08 15:42:36 changed by bdubbs@linuxfromscratch.org

  • status changed from new to assigned.

10/05/08 17:18:44 changed by bdubbs@linuxfromscratch.org

  • status changed from assigned to closed.
  • resolution set to fixed.

Added a simle gcc compile test to host requirements script:

echo 'main(){}' > dummy.c && gcc -o dummy dummy.c
if [ -x dummy ]; then echo "Compilation OK"; else echo "Compilation failed"; fi
rm -f dummy.c dummy

Fixed in revision 8583.