Opened 16 years ago

Closed 16 years ago

#2188 closed task (fixed)

Addition to Host System Prequisites - check for ability to compile

Reported by: Chris Staub Owned by: bdubbs@…
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 (6)

comment:2 by bdubbs@…, 16 years ago

Resolution: wontfix
Status: newclosed

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.

comment:3 by Matthew Burgess, 16 years ago

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!

comment:5 by bdubbs@…, 16 years ago

Milestone: 7.06.4
Resolution: wontfix
Status: closedreopened

OK. I'll do it.

comment:6 by bdubbs@…, 16 years ago

Owner: changed from lfs-book@… to bdubbs@…
Status: reopenednew

comment:7 by bdubbs@…, 16 years ago

Status: newassigned

comment:8 by bdubbs@…, 16 years ago

Resolution: fixed
Status: assignedclosed

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.

Note: See TracTickets for help on using tickets.