William Harrington | 16 May 02:01 2014

Sysvinit Branch BOok


the Systemd book and Sysvinit books are pretty much neck and neck with  
much needed changes which never had made it to the master book for a  
long time.

It will be much easier to maintain both in their current state.  Most  
of the editing we did has made it into the sysvinit book with the help  
of Chris Staub.

Let the testing begin!

By the way, has anyone been successful in using qemu for sparc64 or  
ppc64? I can't find any good combinations of images or command line  
options for qemu to test those books.

Jonathan Norman got a replacement board for his dual G5, but not sure  
on the status of the repair.


William Harrington
William Harrington | 15 May 04:08 2014

CLFS Systemd and Sysvinit Books


Chris and I have updated the site.

Our system will render the systemd and sysvinit books as changes occur  
in git.

Trac download and read online sections have been updated.

Please report any broken links or any other issues which affect  
viewing the book or downloads and broken links.

Note that for git, the master branch is now the systemd book and the  
sysvinit book is in the sysvinit branch.

Also, the sysvinit book is the 2.x dev book and the systemd book is  
the 3.x dev book as for now.


William Harrington
Gary Greene | 10 May 09:42 2014

Having issues building GLIBC 32bit

I’m currently working through building a version of CLFS from the 2.x development book (x86_64,
multilib). I’ve gotten through building GCC 4.8.2 static from chapter 5, and am working on getting
GLibC 2.19 32-bit built.

Unfortunately, I cannot get it to build. Originally, I was having an issue getting it to find errno.h when
building the stuff in sunrpc. After doing some digging, I found this was due to libtirpc 32bit being
installed on the host system. After removing that library and it’s headers from the system, I run into
the following odd error when the system looks to be linking libresolv: 

x86_64-altimatos-linux-gnu-gcc -m32 -shared -static-libgcc -Wl,-O1  -Wl,-z,refs
 -Wl,-soname=libresolv.so.2 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both

 -o /home/builder/sources/glibc-build-32/resolv/libresolv.so
 -T /home/builder/sources/glibc-build-32/shlib.lds /home/builder/sources/glibc-build-32/csu/abi-note.o
 -Wl,--whole-archive /home/builder/sources/glibc-build-32/resolv/libresolv_pic.a
 -Wl,--no-whole-archive /home/builder/sources/glibc-build-32/elf/interp.os
(Continue reading)

Koornstra, Reinoud | 7 May 22:34 2014

your gcc patch

Hi William,

I looked in the patch you wrote for gcc in gcc/config/aarch64/aarch64-linux.h for example

#define GLIBC_DYNAMIC_LINKER "/tools/lib/ld-linux-aarch64.so.1"

You added /tools in front of /lib
Does this only work, because you did:

ln -sv ${CLFS}/tools /

if you didn't make this link you'd have to change this with: 

#define GLIBC_DYNAMIC_LINKER "/mnt/clfs/tools/lib/ld-linux-aarch64.so.1"


Koornstra, Reinoud | 6 May 22:16 2014

Re: What am i forgetting?

Thanks William,

That was the issue indeed, I just downloaded isl from their website and ended up with 0.13.
I obtained 0.12.1 from your site and that worked.
So now everything that depends on isl needs to change or?
Need to know what the substitute is for isl_int or otherwise how that want it.
Not sure what their motivation was to get rid of this def.


-----Original Message-----
From: William Harrington [mailto:kb0iic <at> berzerkula.org] 
Sent: Monday, May 05, 2014 5:51 PM
To: Koornstra, Reinoud
Cc: clfs-support
Subject: Re: [Clfs-support] What am i forgetting?

On May 5, 2014, at 6:28 PM, Koornstra, Reinoud wrote:

> Hi Everyone,
> Following the recipe from the powerpc crossbook 2.1 I run into a 
> problem compiling clog:
> I get: source/isl/domain.c:1697:2: error: unknown type name 'isl_int'
> So it doesn't seem to get the libraries from isl that we previously 
> compiled.

(Continue reading)

Michael D Labriola | 24 Mar 15:51 2014

Strange cross-tools eglibc failure

I'm can't seem to get past the cross-tools eglibc installtion...  I'm 
following the instructions from the 2.1.0 book, and I'm assuming I've 
misread something or typod something.  Here's what I get:

/cross-tools/include/gmp.h:324:33: error: expected declaration specifiers 
or '...' before '(' token

It looks like my cross-gcc doesn't like the __GMP_CAST macro definition in 
gmp.h?  Surely this has to be a bogus error?

My last build was using the dev book just prior to 2.1.0's release, 
mid-September timeframe.  I didn't have any problems then.  Looks like 
gmp, gcc, and eglibc have been updated slightly since then.

I'm getting this error on an AVLinux host (based off debian 6, I believe) 
and on a really ancient Red Hat box, both are 32bit operating systems 
running on 64bit capable hardware, so I specified the GMP API following 
the NOTE in the GMP section.  I don't think it's related to the host 
sytstem's compiler (at least not directly), because the failure is coming 
from the cross-gcc that I've already compiled.  I feel like I must be 
missing something silly, but I just don't see it.

The problem also happens on the 32bit portion of cross eglibc when 
building for x86_64 multilib and the also happens when building for x86_64 
pure64 or for x86.

Anyone else seen this problem?  Thanks!


(Continue reading)

Alexey Orishko | 19 Mar 16:21 2014

bootscripts-cross-lfs issue

Hi guys,

If I use bootscripts-cross-lfs-2.1-pre1 while building CLFS-2.1.0,
several packages from BLFS won't start...
The difference is obvious: corresponding directories are not created in /run.

Should these dirs be created by corresponding scripts from
/etc/rc.d/init.d or by some other magic way?

Vlastimil Slintak | 18 Mar 19:00 2014

CLFS embedded and shared libraries


For last two weeks I am working on my CLFS embedded system for Raspberry Pi. My system is already running, but I had to disable shared libraries for all application (busybox, dropbear and e2fsprogs). When I compile busybox with enabled shared libraries, I get “Kernel panic - not syncing: No init found.” from kernel. When I compile dropbear or e2fsprogs with shared libraries, I get “-ash: dropbearkey: not found”.

Dropbear (for example) needs three libraries (I run this command on my host system):

$ readelf -d targetfs/usr/bin/dropbearmulti 
Dynamic section at offset 0x3400c contains 26 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so]

And the content of my CLFS /lib is (I run this on my target system):

$ ls /lib
firmware   libgomp.so     libitm.so.1.0.0  libstdc++.so.6 libz.so.1.2.8
ld-musl-arm.so.1  libgomp.so.1     libssp.so     libstdc++.so.6.0.17 modules
libc.so   libgomp.so.1.0.0  libssp.so.0      libstdc++.so.6.0.17-gdb.py
libgcc_s.so   libitm.so     libssp.so.0.0.0  libz.so
libgcc_s.so.1   libitm.so.1     libstdc++.so     libz.so.1

So I am sure, I have all needed libraries. I compiled them with CLFS gcc. What am I missing? Do you think there is some problem with my lib-musl library or with GCC?

Vlastimil S.
Clfs-support mailing list
Clfs-support <at> lists.cross-lfs.org
Robin | 15 Mar 19:24 2014

10.66. Gzip-1.6 test error "zgrep-signal" "chroot method"

Google threw up https://lists.debian.org/debian-68k/2013/06/msg00056.html

ERROR: zgrep-signal
++ initial_cwd_=/sources/gzip-1.6/tests
++ fail=0
+++ testdir_prefix_
+++ printf gt
++ pfx_=gt
+++ mktempd_ /sources/gzip-1.6/tests gt-zgrep-signal.XXXX
+++ case $# in
+++ destdir_=/sources/gzip-1.6/tests
+++ template_=gt-zgrep-signal.XXXX
+++ MAX_TRIES_=4
+++ case $destdir_ in
+++ case $template_ in
++++ unset TMPDIR
+++ d=/sources/gzip-1.6/tests/gt-zgrep-signal.x2ZU
+++ case $d in
+++ test -d /sources/gzip-1.6/tests/gt-zgrep-signal.x2ZU
++++ ls -dgo /sources/gzip-1.6/tests/gt-zgrep-signal.x2ZU
++++ tr S -
+++ perms='drwx------ 2 4096 Mar 15 17:59
+++ case $perms in
+++ test 0 = 0
+++ echo /sources/gzip-1.6/tests/gt-zgrep-signal.x2ZU
+++ return
++ test_dir_=/sources/gzip-1.6/tests/gt-zgrep-signal.x2ZU
++ cd /sources/gzip-1.6/tests/gt-zgrep-signal.x2ZU
++ gl_init_sh_nl_='
++ IFS='
++ for sig_ in 1 2 3 13 15
+++ expr 1 + 128
++ eval 'trap '\''Exit 129'\'' 1'
+++ trap 'Exit 129' 1
++ for sig_ in 1 2 3 13 15
+++ expr 2 + 128
++ eval 'trap '\''Exit 130'\'' 2'
+++ trap 'Exit 130' 2
++ for sig_ in 1 2 3 13 15
+++ expr 3 + 128
++ eval 'trap '\''Exit 131'\'' 3'
+++ trap 'Exit 131' 3
++ for sig_ in 1 2 3 13 15
+++ expr 13 + 128
++ eval 'trap '\''Exit 141'\'' 13'
+++ trap 'Exit 141' 13
++ for sig_ in 1 2 3 13 15
+++ expr 15 + 128
++ eval 'trap '\''Exit 143'\'' 15'
+++ trap 'Exit 143' 15
++ trap remove_tmp_ 0
+ path_prepend_ ..
+ test 1 '!=' 0
+ path_dir_=..
+ case $path_dir_ in
+ abs_path_dir_=/sources/gzip-1.6/tests/..
+ case $abs_path_dir_ in
+ PATH=/sources/gzip-1.6/tests/..:/sources/gzip-1.6:/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
+ create_exe_shims_ /sources/gzip-1.6/tests/..
+ case $EXEEXT in
+ return 0
+ shift
+ test 0 '!=' 0
+ export PATH
+ echo a
+ gzip -c
+ test x = x
+ PERL=perl
++ write_to_dangling_pipe cat f.gz f.gz
++ exec
++ :
++ exec_with_SIGPIPE_SIG_DFL cat f.gz f.gz
++ program=cat
++ shift
++ args=
++ for arg in '"$ <at> "'
++ args=', '\''f.gz'\'''
++ for arg in '"$ <at> "'
++ args=', '\''f.gz'\'', '\''f.gz'\'''
++ perl -e '$SIG{PIPE} = '\''DEFAULT'\''; exec '\''cat'\'',
'\''f.gz'\'', '\''f.gz'\'''
++ echo 0
+ signal_status=0
+ test 128 -lt 0
+ framework_failure_ 'signal handling busted on this host'
+ warn_ 'zgrep-signal: set-up failure: signal handling busted on this host'
+ case $IFS in
+ printf '%s\n' 'zgrep-signal: set-up failure: signal handling busted
on this host'
zgrep-signal: set-up failure: signal handling busted on this host
+ test 9 = 2
+ printf '%s\n' 'zgrep-signal: set-up failure: signal handling busted
on this host'
+ sed 1q
+ Exit 99
+ set +e
+ exit 99
+ exit 99
+ remove_tmp_
+ __st=99
+ cleanup_
+ :
+ cd /sources/gzip-1.6/tests
+ chmod -R u+rwx /sources/gzip-1.6/tests/gt-zgrep-signal.x2ZU
+ rm -rf /sources/gzip-1.6/tests/gt-zgrep-signal.x2ZU
+ exit 99

Testsuite summary for gzip 1.6
# TOTAL: 15
# PASS:  14
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 1
See tests/test-suite.log
Please report to bug-gzip <at> gnu.org
Makefile:1576: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1
make[4]: Leaving directory '/sources/gzip-1.6/tests'
Makefile:1682: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 2
make[3]: Leaving directory '/sources/gzip-1.6/tests'
Makefile:1853: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/sources/gzip-1.6/tests'
Makefile:1669: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/sources/gzip-1.6'
Makefile:1943: recipe for target 'check' failed
make: *** [check] Error 2
root:/sources/gzip-1.6# cat tests/test-suite.log | grep -i error
# ERROR: 1
ERROR: zgrep-signal



Robin | 14 Mar 14:55 2014

Info: 10.37. Iana-Etc-2.30 Version GIT-20140311-x86_64-Multilib

Make get fails as there is no internet yet.

I used the instructions from Version 2.1.0-x86_64-Multilib to continue


Robin | 11 Mar 17:02 2014

10.7.1. Eglibc tests.

I haven't changed anything from the book though  I may have missed something.
No optimisations were applied to the build

make[2]: *** [/sources/eglibc-build/math/test-ldouble.out] Error 1
make[2]: *** [/sources/eglibc-build/math/test-ildoubl.out] Error 1
make[1]: *** [math/tests] Error 2
make[2]: [/sources/eglibc-build/posix/annexc.out] Error 1 (ignored)
make[2]: *** [/sources/eglibc-build/posix/tst-getaddrinfo4.out] Error 1
make[1]: *** [posix/tests] Error 2
make[2]: *** [/sources/eglibc-build/debug/tst-backtrace6.out] Error 1
make[1]: *** [debug/tests] Error 2
make: *** [check] Error 2

The math/test errors and the tst-getaddrinfo4 I can ignore?

What about tst-backtrace6?


Obtained backtrace with 7 functions
Function 0: /sources/eglibc-build/debug/tst-backtrace6(handle_signal+0x1a)
Function 1: linux-gate.so.1(__kernel_sigreturn+0) [0x55577400]
Function 2: /sources/eglibc-build/debug/tst-backtrace6(noreturn_func+0)
Function 3: /sources/eglibc-build/debug/tst-backtrace6() [0x80497fd]
Function 4: /sources/eglibc-build/debug/tst-backtrace6(fn+0x1e) [0x804974e]
Function 5: /sources/eglibc-build/debug/tst-backtrace6(fn+0x1e) [0x804974e]
Function 6: /sources/eglibc-build/debug/tst-backtrace6() [0x804980f]
Failure on line 96