Report on JHALFS with LiveCD 6.3 r2160

Mike McCarty Mike.McCarty at
Thu Apr 16 11:20:09 PDT 2009

Sorry this is longish, but I didn't want to post piecemeal
as I went, with "this failed" and what I did, then later
"oh, this failed, too" etc. Too much clutter.

Well, I have fiddled this and that, and somewhat gotten JHALFS
to work with the LiveCd as the host distribution. The first
hurdle is that the JHALFS furnished on the LiveCD is broken.
So, I installed the tarball from the release repository for
jhalfs-2.3.1. During the configuration run, some of the MD5
sums didn't match. Well, that is a known problem with the book,
I think.

I changed to $BUILD_DIR/jhalfs and

$ make mk_CHROOT

to get it to that point, I hoped.

It ran for some time, then failed trying to build Chapter 5
042-coreutils. After checking the logs, I found that it was running
the tests, including the expensive tests, though I configured
only to run the Chapter 6 tests, and only on the necessary parts
(gcc et al.). Anyway, all but one test passed, so I investigated
what happened. It was trying to verify that it could get name
resolution for	from	http	from	https	from	http	from	ldap

As this computer has no network connections at this time, this
is an understandable failure. It's not so clear why it was running
all the tests. I edited the
script to comment out the make for the tests, and restarted.

It then failed on 085-perl, again during make test, this time
during Chapter 6. In this case, the cause of the failure is
somewhat more obscure (at least to me). The log reports
	_test_tty Error 1
	Failed test 'setlogsock() should be true: '''
I didn't write down all of the second line. The syntax of the
third line above is exactly as printed, which looks a little
strange. It looks like it's failing some sort of socket attach
when trying to make sure it can issue system logs.

Anyway, the solution was as before, I edited the
$BUILD_DIR/jhalfs/lfs-commands/Chapter06/085-perl script to
omit the tests.

Then it ran to 115-udev, which tar failed insisting it couldn't
find ../udev-config-20081015.tar.bz2. That file exists in the
repository I told jhalfs to use ($BUILD_DIR/sources-6.4/). So,
it appears that the book parser didn't find that as a source
file to copy for some reason, because tar is right, it isn't
in $BUILD_DIR/sources. Anyway, I copied it by hand,
and now the system thinks it has completed Chapter 6.

However, as a quick check, I ran the tests on the compiler
suggested in the book. I $ sudo chrooted as instructed to do
in the "after this point use the modified chroot command"
and built the "dummy" program as instructed in section 6.14.1.
This failed in certain incompatibilities for some reason.

First, it complained about "-W1,--verbose" being unrecognized.
I changed that to "-W1 --verbose" (one), and it complained about "-W1".
I changed it to "-Wl --verbose" (ell), and it  complained also.
I changed it to "-Wall --verbose" and it was happier, and yielded
the a.out file.

I did the readelf command, and got the expected output.

However, the grep of the dummy.log file does not show the expected
"succeeded". In fact, nowhere in the file does that string occur. Those
files were the ones requested, and they do exist with
the path shown in the book. Also, I changed the file dummy.c
using the new vi to "hello world" with appropriate includes,
and that runs and does what we want. The grep for the include
file paths looks correct.

So, jhalfs-2.3.1 "almost" works with LFS 6.4, but not quite.

I don't understand why the dummy.log file does not contain
exactly the expected output, nor why cc doesn't like the
command string in the book.

Inside the chroot jail

# /usr/bin/cc --version
cc (GCC) 4.3.2

Outside the jail

$ /usr/bin/cc --version
cc (GCC) 4.1.2

So it appears that I'm running exactly the version specified,
but not getting the expected output. I rechecked the errata,
and there is nothing about that topic.

Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!

More information about the lfs-support mailing list