LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   jhalfs fails at 040-expect (http://www.linuxquestions.org/questions/linux-from-scratch-13/jhalfs-fails-at-040-expect-845710/)

fmillion 11-21-2010 08:55 PM

jhalfs fails at 040-expect
 
Hi,

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

Code:

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?

Advice?

Thanks

fm

business_kid 11-22-2010 07:44 AM

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.

fmillion 11-23-2010 07:56 AM

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.

fm

fmillion 11-27-2010 04:52 PM

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:

Code:


040-expect:  039-tcl
        @$(call echo_message, Building)
        @export BASHBIN=$(SHELL) && $(SHELL) progress_bar.sh $@ $$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.

fm


All times are GMT -5. The time now is 01:07 PM.