Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 11-21-2010, 08:55 PM   #1
Registered: Nov 2006
Posts: 91

Rep: Reputation: 27
jhalfs fails at 040-expect


I am using jhalfs to compile LFS. I get a failure at 040-expect:

Mon Nov 22 02:49:12 CET 2010

KB: 641900      /mnt/sda/lfs

/mnt/sda/lfs/jhalfs/lfs-commands/chapter05/040-expect: line 5: cd: /mnt/sda/lfs/sources/tcl8.5.9: No such file or directory
040-expect (END)
It looks like expect requires the tcl sources, but jhalfs is removing the build directory after each build!

Maybe this was an oversight, but it seems that many people have built LFS successfully recently...

Am I missing something? I can modify the makefile to eliminate the build directory removal, but can I expect other problems like this further on in the compilation?



Old 11-22-2010, 07:44 AM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,400

Rep: Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847Reputation: 847
The book is nearly always right, and the lfs luser is nearly always wrong in these situations.

As someone who has built a few (and had my own share of troubles) the main sources of these are

1. A dodgy base system
2. mistakes in typing
3. With scripts, sometimes unfortunate global settings are made.

I suspect 3.
Old 11-23-2010, 07:56 AM   #3
Registered: Nov 2006
Posts: 91

Original Poster
Rep: Reputation: 27
After digging into the makefile for a bit, I discovered the problem:

1. The TCL sources probably are not actually needed. It attempts to use them because variables are still set for TCL during the expect step, so it tries to "cd" into the TCL sources directory during the expect step.
2. The makefile never actually extracts the sources for expect prior to attempting to compile them! Also as I said it never changes the variables to point to the sources it should have extracted.

I corrected #2 and the entire process worked to completion. Might be a bug in JHALFS, will report it to them to see what they say. This step is the only step in the entire book that failed. After correcting 040-expect everything else worked exactly as expected and I ended up with a finished, working LFS.

Old 11-27-2010, 04:52 PM   #4
Registered: Nov 2006
Posts: 91

Original Poster
Rep: Reputation: 27
For the benefit of others who may encounter this problem, I edited the makefile at the root jhalfs directory. Search for the "040-expect:" section, and replace the entire section with this:

040-expect:  039-tcl
        @$(call echo_message, Building)
        @export BASHBIN=$(SHELL) && $(SHELL) $@ $$PPID &
        @echo "$(nl_)`date`$(nl_)" >logs/$@
        @$(PRT_DU) >>logs/$@
        @$(call remove_existing_dirs,expect5.45.tar.gz)
        @$(call unpack,expect5.45.tar.gz)
        @$(call get_pkg_root_LUSER)
        @source ~/.bashrc && \
        $(CMDSDIR)/chapter05/$@ >> logs/$@ 2>&1 && \
        $(PRT_DU) >>logs/$@
        @$(call housekeeping)
After doing so, save and try making again.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] /usr/bin/expect : Script to check server load using both expect and bash Soji Antony Programming 1 07-27-2010 11:27 PM
Expect script fails to show file exist failure edomingox Programming 3 03-29-2009 07:11 PM
unknown escape sequence: '\040' jiikka Linux - General 1 03-09-2009 07:48 AM
chmod fails to do what I expect timsch75 Linux - Newbie 3 03-30-2004 11:10 PM
apache 2.040 dkhat Linux - General 0 02-26-2003 10:56 PM > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:45 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration