William Harrington | 7 Jun 15:32 2016

Re: Compiling multilib python

---------------------------- Original Message ----------------------------
Subject: Re: Compiling multilib python
From:    "William Harrington" <kb0iic <at> berzerkula.org>
Date:    Tue, June 7, 2016 13:27
To:      clfs-support <at> clfs.org
Cc:      "Anthony Jagers" <noonetinone <at> gmail.com>

On Tue, June 7, 2016 01:11, Anthony Jagers wrote:
> In the CBLFS book there are three sed's.  Did you happen to use them?
> Do you deem them necessary?
> These are ones(32-bit):
> sed -i "s <at> /usr/X11R6 <at> ${XORG_PREFIX} <at> g" setup.py &&
> sed -i 's <at> /lib64 <at> /lib <at> g' Modules/_ctypes/libffi/m4/libtool.m4 \
>     Modules/_ctypes/libffi/configure setup.py &&
> sed -i "s/'lib64'/'lib'/g" setup.py

They are when you have a 64 bit or multilib toolchain. It has been a long
time since I built Python with a multilib system, but at the time the
instructions and patches were created, they were proper. I doubt Python 3
has improved their system for multilib. Python 2.7 surely didn't from 2.6.
Python is a pain when it comes to multilib.


(Continue reading)

Chris Fowler | 17 May 17:32 2016

i586 target with cmov

I've just finished chapter 6 of Sysvinit 3.0.0.  My goal is to target an i586 processor that lacks features of i686. such as cmov.

I think I may have made a mistake during the initial builds.

Maybe I have not, I just want to validate before I move on.  Host is  Ubuntu 15.10 x86_64.
Target is a RDC3308 RISC, but it prefers to be x86. 

 have no name!:/# objdump /tools/bin/ls -D | grep cmov
    180d: 0f 44 1e             cmove  (%esi),%ebx
    31af: da cc                 fcmove %st(4),%st
    4e18: 0f 4e 00             cmovle (%eax),%eax
    59e6: 0f 4f 00             cmovg  (%eax),%eax
    5ddc: 0f 4f 00             cmovg  (%eax),%eax
    a836: db c5                 fcmovnb %st(5),%st
    e50a: 0f 4c 2a             cmovl  (%edx),%ebp
   1120f: 0f 4e 32             cmovle (%edx),%esi
   12e19: 0f 48 00             cmovs  (%eax),%eax
   1376b: 0f 4e 32             cmovle (%edx),%esi
   14068: db cc                 fcmovne %st(4),%st
   1cd7d: 0f 43 26             cmovae (%esi),%esp
   1fadd: da db                 fcmovu %st(3),%st
    25ef: 0f 4a 03             cmovp  (%ebx),%eax
      c7: da cc                 fcmove %st(4),%st
      d0: da cc                 fcmove %st(4),%st
     305: db cf                 fcmovne %st(7),%st
     30d: db cf                 fcmovne %st(7),%st
    6fb7: da c5                 fcmovb %st(5),%st
    799a: db c4                 fcmovnb %st(4),%st
    7a27: db c4                 fcmovnb %st(4),%st
    7a68: db c2                 fcmovnb %st(2),%st
     244: db da                 fcmovnu %st(2),%st
     450: db dc                 fcmovnu %st(4),%st
     478: db dc                 fcmovnu %st(4),%st
     4a0: db dc                 fcmovnu %st(4),%st
     4c0: db dc                 fcmovnu %st(4),%st
    22c4: db c4                 fcmovnb %st(4),%st
    2434: db c4                 fcmovnb %st(4),%st
I have no name!:/# 

Clfs-support mailing list
Clfs-support <at> lists.clfs.org
Montorsi, Francesco | 6 May 18:05 2016

Error when compiling glibc 2.22 (32 bit): incompatible libgcc.a being skipped

Hi all,
This is my first post to this list.
I’m trying to follow the CLFS guide “Version SYSVINIT-20160313-x86_64-Multilib”. I did manage to successfully achieve all steps of an older guide, employing older compiler/glibc/kernel header versions… now I need to update the cross-compile tools but I get an error when following the latest CLFS book:
In particular I managed to:
1) compile all required libs for GCC
2) compile GCC 5.3.0 statically for creating the temporary toolchain in /cross-tools
Next step 3) would be building glibc in 32 bits but it fails… the error I get is:
x86_64-unknown-linux-gnu-gcc -m32 -B/cross-tools/bin/   -nostdlib -nostartfiles -r -o /home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map.o '-Wl,-(' /home/clfs/sources/gcc_glibc/glibc-build/elf/dl-allobjs.os /home/clfs/sources/gcc_glibc/glibc-build/libc_pic.a -lgcc '-Wl,-)' -Wl,-Map,/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.mapT
/cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/libgcc.a when searching for -lgcc
/cross-tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../x86_64-unknown-linux-gnu/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status
Makefile:322: recipe for target '/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map' failed
make[3]: *** [/home/clfs/sources/gcc_glibc/glibc-build/elf/librtld.map] Error 1
make[3]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-2.22/elf'
Makefile:213: recipe for target 'elf/subdir_lib' failed
make[2]: *** [elf/subdir_lib] Error 2
make[2]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-2.22'
Makefile:9: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/clfs/sources/gcc_glibc/glibc-build'
makefile:274: recipe for target 'glibc_32bit' failed
make: *** [glibc_32bit] Error 2
The problem IMHO is that the libgcc.a created in step 2) is a 64bit library, while glibc 32 bit perhaps needs it in 32 bit architecture.
Note that for my setup "export" returns:
declare -x CLFS_HOST="x86_64-cross-linux-gnu"
declare -x CLFS_TARGET="x86_64-unknown-linux-gnu"
declare -x CLFS_TARGET32="i686-pc-linux-gnu"
What do you suggest? What else can I post to get help J ?
Francesco Montorsi
Clfs-support mailing list
Clfs-support <at> lists.clfs.org
Gary Greene | 24 Apr 22:07 2016

CBLFS broken links for svn.cross-lfs.org....


I'm currently working through adding a few extra bits to my CLFS build, and found that various links on the CBLFS wiki are broken for patch files, as they point to svn.cross-lfs.org, which drops you to a hosting provider landing page.

Can anyone point me to where these moved to?

Clfs-support mailing list
Clfs-support <at> lists.clfs.org
Ronaldo Antonio Carballo | 23 Mar 18:42 2016

Error #1 & #2 on tests for GLIBC

I'm at step 10.7 of the CLFS book. I just ran the tests but I'm getting errors 1 & 2 on a few tests...

The tests are math-testfloat.out, test-ifloat.out, and tst-ftell-partial-wide.out. I'm not sure whether these errors are showstoppers but I'd like to get the opinion of those more experienced with GLIBC tests. Thank you again for your help.

Antonio C.

Clfs-support mailing list
Clfs-support <at> lists.clfs.org
sfeebots454 | 6 Feb 10:54 2016

Completed CLFS the kernel is now well behaved

Tested Binutils after completing Chapter 10 it tested good (3 known failures). 40 minutes into testing GCC
had a power failure with no UPS installed, so I just skipped testing and continued on to he end of the book. 

Running Kernel version 4.0.0 (needed for skylake) the new OS is working but does not have ethernet.
Journalctl shows firmware blobs not handled nicely and udev does not rename eth0. Need to set kernel
parameters correctly. Found that Sparky has a kernel config file saved so I will use kernel 3.4 stable and
use that config as a starting point. 

Ncurses still had funky behavior in menuconfig. First time it worked correctly but on subsequent uses the
bottom bar did not highlight in chroot or boot. A recompile cured that.

Am restarting using Sparky. Found that Ncurses 6.0 requires AWK=gawk to avoid the compilation errors in
Chapter 6.10. I understand that this exact problem started in Ncurses 5.9 with GCC 5.x. The developers
think perhaps GCC 5.x causes a timing problem in mawk/gawk and that the problem was solved in 6.0, but it
still remains.

The Debian distro installs both gawk and mawk then uses an /etc/alternatives/awk file to prioritize gawk.
If Ncurses .configure finds mawk installed it does not look for gawk. Using Fedora (which has only gawk
installed) the problem never occurred.

Thank you for CLFS it is a great learning tool,     Leon
sfeebots454 | 28 Jan 13:10 2016

Binutils Chapter 10.25 Tests

Installed BC out of order and the relro_test.sh passed but the other 10 failures remained.

Noticed that during the tests my Fedora 23 produced an SELinux AVC message.

I read online that Fedora is not the friendliest distro for LFS/CLFS. So before I started I ran # restorecon
-R /mnt. I thought at the time that any files added after this command would not be subject to that command. I
should have been disabling SELinux with # echo 0 > /selinux/enforce before I entered a CLFS build session.

Disabled SELinux and got the same results.

Have used both Fedora 23 and Sparky Linux with the same results, so I do not think SELinux is a real problem. I
have "switched horses in mid stream" to use Sparky and restart at the beginning of Chapter 10. 

The book said to not skip the tests for GCC, Binutils, and Glibc. I will keep the uncompressed directories in
which these packages were built and run the testsuites just before Chapter 11.

This last course sounds more correct. Will get back to you with the results.

Thanks,   Leon
sfeebots454 | 27 Jan 07:48 2016

Host system missing needed packages

On my eleventh attempt at CLFS/LFS the Binutils-2.25 produced using GIT-20160119-x86_64-Multilib
failed 11 tests as it did in the previous attempt.

11 of 213 tests failed
See testsuite/test-suite.log

Just dealing with the first failure:

FAIL: relro_test.sh

../../../binutils-2.25.1/gold/testsuite/relro_test.sh: line 63: dc: command not found
../../../binutils-2.25.1/gold/testsuite/relro_test.sh: line 64: dc: command not found
../../../binutils-2.25.1/gold/testsuite/relro_test.sh: line 66: test: : integer expression expected
PT_GNU_RELRO segment does not end at page boundary.

63  RELRO_END=`echo "16o 16i $RELRO_START $RELRO_LEN + p" | dc`
64  REM=`echo "16i $RELRO_END $LOAD_ALIGN % p" | dc`
66  if test "$REM" -eq 0; then

I believe my failed attempts all have to do with missing dependencies that break glibc, binutil, GCC and
others. In truth the core packages have always failed a few too many tests.

The developers of CLFS/LFS must not use "off the shelf" workstation distros. In that you add a developers
layer on top of the distro you must be adding background packages that are not commonly installed in binary distros.

Please recommend a distro that will support skylake hardware (kernel version 3.x or higher) which can be
configured at installation for software development which would have what is needed.
Failing that please instruct how to add a developers layer through meta package or in any manner to Fedora,
OpenSUSE tumbleweed, Manjaro, Sparky etc.

Thanks,   Leon
sfeebots454 | 23 Jan 09:17 2016

Ncurses 6.0 needed a recompile

Previously using GIT-20160119-x86_64-Multilib had to use AWK=gawk in Ncurses-6.0 configure (Chapter
10.34-35) to get past a compilation error.

Found that the kernel menuconfig had no blue highlighting to indicate where I was in bottom menu bar. I do
recall that it was also it was crippled in some way in the main menu.

After recompiling Ncurses menueconfig worked properly. The AWK=gawk parameter was not needed to do this
second compile.

Do I need to worry that subsequent programs were affected if the were dependent on Ncurses? 
sfeebots454 | 17 Jan 09:18 2016

Your fix for Ncurses works

Thank you for this solution: Adding AWK=gawk to Ncurses-6.0 Chapter 6.10 works for my system (Skylake and Debian-testing.)

I will be more exacting in the future and state which CLFS book is in use: Version
GIT-20160107-x86_64-Multilib. The stable book was a bust right out of the gate.

Learned a bit about how configure works by looking at the configure.log and searching the web.

Thanks,    Leon
sfeebots454 | 15 Jan 17:47 2016

Ncurses Chapter 6.10 compilation error

Going along swimmingly until 6.10 Ncurses:

x86_64-unknown-linux-gnu-gcc -m64 -DHAVE_CONFIG_H -I. -I../include  -D_GNU_SOURCE -DNDEBUG -O2
--param max-inline-insns-single=1200 -fPIC -c ../ncurses/lib_gen.c -o ../obj_s/lib_gen.o
In file included from ./curses.priv.h:325:0,
                 from ../ncurses/lib_gen.c:19:
_5082.c:843:15: error: expected ')' before 'int'
../include/curses.h:1631:56: note: in definition of macro 'mouse_trafo'
 #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
Makefile:976: recipe for target '../obj_s/lib_gen.o' failed
make[1]: *** [../obj_s/lib_gen.o] Error 1
make[1]: Leaving directory '/mnt/clfs/sources/ncurses-6.0/ncurses'
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2

At this point I am lost. Not a programmer but is this not a syntax error. Web search leads me to believe by
adding braces around a line of code containing "int", turning a declaration into a statement could solve
this. Are the numbers 5082.c:843:15 and 1631:56 pointing towards lines of code? Is Makefile:976 the
starting point to find the aforementioned line of code?

The file lib_gen.c has this to say, " * DO NOT EDIT THIS FILE BY HAND! * It is generated by ./base/MKlib_gen.sh
generated." Code generating code!

I compiled LFS 6 times on my old D945GNT Pentium D machine and every time ended up with an OS that dumped kernel
panic messages on the terminal prompt and inside nano and elinks. The old HW was the cause: plenty of
glitches and lockups. On this Skylake UEFI machine CLFS x86_64 Multi will produce a useful OS.

I have a Sams Teach Yourself book titled "C for Linux Programming". If somebody could point me towards an
open source API I might be able to self-help to some degree.

Tell me what you need to understand this problem and how to get large pieces of output to you outside of email.

Thanks,    Leon