Sela Selah | 13 Feb 13:59 2014

issue about gcc and e2fsprogs

In chapter 6.10, after modify the Makefile by sed:

If xxxLIBS & xxxINC = /tools/, make will results the header error.

If xxxLIBS & xxxINC = /cross-tools/, make will results the wrong lib format error.

Only xxxLIBS = /tools/ && xxxINC=/cross-tools/, the compiling could complete.

This issue I had meet ever. Now I do the compiling in a new platform (hardware and os), the same issue remains.

 

In chapter 7.7

The compiling results error: conflict type.

in the build/lib/ext2fs/ext2_type.h, the _u64 typedef with unsigned long long,

but in the kernel header, the _u64 typedef with unsigned long.

The type _s64 has similar comfliction

Maybe it’s a e2fsprogs bug:

In file root/lib/ext2fs/ext2_types.h.in

Line 89, the comment about SIZEOF_LONG_LONG/SIZEOF_LONG is *NOT* consists with the if-else branch:

#ifdef __U64_TYPEDEF

typedef __U64_TYPEDEF __u64;

#else

#if ( <at> SIZEOF_INT <at> == 8)

typedef unsigned int        __u64;

#else

#if ( <at> SIZEOF_LONG_LONG <at> == 8) // < ------- should long branch

typedef unsigned long long      __u64;

#else

#if ( <at> SIZEOF_LONG <at> == 8)

typedef unsigned long     __u64;  // < ------- should long long branch

#endif /* SIZEOF_LONG_LONG == 8 */

#endif /* SIZEOF_LONG == 8 */

#endif /* SIZEOF_INT == 8 */

#endif /* __U64_TYPEDEF */

 

#ifdef __S64_TYPEDEF

typedef __S64_TYPEDEF __s64;

#else

#if ( <at> SIZEOF_INT <at> == 8)

typedef int                 __s64;

#else

#if ( <at> SIZEOF_LONG_LONG <at> == 8)

#if defined(__GNUC__)    // < --------------- should long branch

typedef __signed__ long long __s64;

#else

typedef signed long long __s64;

#endif /* __GNUC__ */

#else

#if ( <at> SIZEOF_LONG <at> == 8)

typedef long              __s64; // < ------------ should long long branch

#endif /* SIZEOF_LONG_LONG == 8 */

#endif /* SIZEOF_LONG == 8 */

#endif /* SIZEOF_INT == 8 */

#endif /* __S64_TYPEDEF */

 

After I exchange the inconsist branches, all things work fine.

 

_______________________________________________
Clfs-support mailing list
Clfs-support <at> lists.cross-lfs.org
http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org
Alexey Orishko | 12 Feb 20:57 2014
Picon

Test failed for 10.7. EGLIBC-2.18

Hi all,

I'm building i686-pc-linux-gnu-gcc target on Ubuntu 64-bit (intel).
While running test suite for EGLIBC ch.10.7 I've got some errors:
....
make[2]: Leaving directory `/sources/eglibc-2.18/elf'
scripts/check-c++-types.sh sysdeps/unix/sysv/linux/i386/nptl/c++-types.data g++
-march=i686
...
      > /sources/eglibc-build/c++-types-check.out
AWK='gawk' scripts/check-local-headers.sh \
  "/usr/include" "/sources/eglibc-build/" >
/sources/eglibc-build/check-local-headers.out
/usr/bin/perl scripts/begin-end-check.pl argp/argp.h assert/assert.h
...
wctype/wctype.h > /sources/eglibc-build/begin-end-check.out
make[1]: Target `check' not remade because of errors.
make[1]: Leaving directory `/sources/eglibc-2.18'
make: *** [check] Error 2
make[2]: *** [/sources/eglibc-build/posix/tst-getaddrinfo4.out] Error 1
make[2]: [/sources/eglibc-build/posix/annexc.out] Error 1 (ignored)
make[1]: *** [posix/tests] Error 2
make[2]: [/sources/eglibc-build/conform/run-conformtest.out] Error 1 (ignored)
make[2]: *** [/sources/eglibc-build/debug/tst-backtrace6.out] Error 1
make[1]: *** [debug/tests] Error 2
make: *** [check] Error 2

posix/annexc.out has a lot of messages:
Tested files:
=== aio.h ===
*  invalid macro `SIGEV_THREAD_ID'
*  invalid macro `sigev_notify_function'
*  invalid macro `sigev_notify_attributes'
** macro `FD_CLOEXEC' not defined
** macro `F_DUPFD' not defined
....
=== dirent.h ===
*  invalid macro `d_fileno'
=== errno.h ===
=== fcntl.h ===
*  invalid macro `F_EXLCK'
=== limits.h ===
*  invalid macro `SSIZE_MAX'
*  invalid macro `XATTR_SIZE_MAX'
*  invalid macro `HOST_NAME_MAX'
...

I'm building clfs exactly as book says for x86 on x86_64, so should I really
worry about these negative test results or simply ignore them?

Regards,
Alexey
thomas kaeding | 12 Feb 02:30 2014
Picon

typos+

These refer to git-20140202, x86_64 multilib

1.  sec 10.37: the patch makes 'make get' unnecessary

2.  sec 10.36:  "check" is missing from "make NON_ROOT_USERNAME=dummy"

3.  sec 10.26 & 27:  the symlinks and includes make an
     infinite loop involving libcurses.so & libcursesw.so
thomas kaeding | 10 Feb 06:02 2014
Picon

final gcc build failing in git-20140202 x86_64 multilib

Help!

final gcc build failing in git-20140202 x86_64 multilib in section 10.23

configure: error: in `/sources/gcc-build/x86_64-unknown-linux-gnu/32/libgcc':
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
Makefile:14626: recipe for target 'configure-stage1-target-libgcc' failed
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory '/sources/gcc-build'
Makefile:18767: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/sources/gcc-build'
Makefile:885: recipe for target 'all' failed
make: *** [all] Error 2

even after doing `ln -s /tools/bin/cpp /lib/' and rerunning the configuration:

In file included from /usr/include/features.h:388:0,
                 from /usr/include/stdio.h:27,
                 from ../../../../gcc-4.8.2/libgcc/../gcc/tsystem.h:87,
                 from ../../../../gcc-4.8.2/libgcc/libgcc2.c:27:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such
file or directory
 # include <gnu/stubs-32.h>
                           ^
compilation terminated.
Makefile:460: recipe for target '_muldi3.o' failed
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory
'/sources/gcc-build/x86_64-unknown-linux-gnu/32/libgcc'
Makefile:1104: recipe for target 'multi-do' failed
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory '/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc'
Makefile:113: recipe for target 'all-multi' failed
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory '/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc'
Makefile:14905: recipe for target 'all-stage1-target-libgcc' failed
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/sources/gcc-build'
Makefile:18767: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/sources/gcc-build'
Makefile:885: recipe for target 'all' failed
make: *** [all] Error 2
Alexey Orishko | 9 Feb 16:21 2014
Picon

Errata for CLFS 2.1.0

Hi Guys,

I have a couple of questions regarding errata for CLFS 2.1

1. While reading ch.8.2 and errata "Boot and Chroot method Util-Linux"
" ..Hosts with Pkg-config installed Add PKG_CONFIG= before ./configure
PKG_CONFIG= ./configure ... "

I'm a bit confused about errata meaning. Having space after equal sign and
no `` signs, what are we supposed to do in bash with PKG_CONFIG env var?

2. In 8.4.1 it was suggested to extract the "Automake-1.12.4" tarball and cd
into the created directory. Then execute the following to see what the
detected target triplet is by config.guess:
build-aux/config.guess

Well, I don't see build-aux in extracted tar ball.
After extracting tar ball and cd into extracted dir I found
./lib/config.guess

Should command in ch. 8.4.1 be corrected?

Regards,
Alexey
Kevyn-Alexandre Paré | 7 Feb 01:25 2014

Fwd: CLFS support

FWI

---------- Forwarded message ----------
From: Kevyn-Alexandre Paré <kapare <at> rogue-research.com>
Date: Thu, Feb 6, 2014 at 6:54 PM
Subject: Re: [Clfs-support] CLFS support
To: Andrew Bradford <andrew <at> bradfordembedded.com>

Andrew,

On Thu, Feb 6, 2014 at 2:17 PM, Andrew Bradford
<andrew <at> bradfordembedded.com> wrote:
> On 02/06/2014 02:08 PM, Kevyn-Alexandre Paré wrote:
>
>> no symlink for /lib/ld-musl-armhf.so.1 in the target. When this
>> symlink is suppose to be created?
>
> In section 4.8 (musl-libc), the 'make install' should create it for you
> properly as long as you're using DESTDIR as specified in the book.
>

Here what I'm using in my script:
CC=${CLFS_TARGET}-gcc ./configure \
  --prefix=/ \
  --target=${CLFS_TARGET}
CC=${CLFS_TARGET}-gcc make
DESTDIR=${CLFS}/cross-tools/${CLFS_TARGET} make install

> So long as you're using a book newer than 20131023, this should work.
> Books prior to 20131023 which were musl based required a manual creation
> of this symlink due to incorrect 'make install' instructions for the way
> musl's install works.

I'm using your git repo directly:

Version GIT-20131024-arm

thx

-KA
Andrew Bradford | 6 Feb 20:17 2014

Re: CLFS support

On 02/06/2014 02:08 PM, Kevyn-Alexandre Paré wrote:

> no symlink for /lib/ld-musl-armhf.so.1 in the target. When this
> symlink is suppose to be created?

In section 4.8 (musl-libc), the 'make install' should create it for you
properly as long as you're using DESTDIR as specified in the book.

So long as you're using a book newer than 20131023, this should work.
Books prior to 20131023 which were musl based required a manual creation
of this symlink due to incorrect 'make install' instructions for the way
musl's install works.

-Andrew
Kevyn-Alexandre Paré | 6 Feb 17:04 2014

CLFS support

Trying to boot my board with the CLFS procedure and I'm stuck at
init/main.c : Kernel panic - not syncing: No init found.

Here my kernel parameters:

[    0.000000] Kernel command line: console=ttyO2,115200n8
init=/sbin/init debug mpurate=500 vram=12M
omapfb.mode=lcd43:480x272MR-24 <at> 60 omapdss.def_disp=lcd43
root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait

Here we see the problem is that kernel_execve return code: -2 ?

[    4.784484] EXT3-fs (mmcblk0p2): using internal journal
[    4.790039] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[    4.798065] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    4.810119] devtmpfs: mounted
[    4.814239] Freeing init memory: 232K
[    4.818115] [KA]: args_init[0]: (null)
[    4.835113] usb 1-2.2: skipped 1 descriptor after interface
[    4.841217] usb 1-2.2: skipped 1 descriptor after interface
[    4.851226] usb 1-2.2: default language 0x0409
[    4.856445] [KA]: kernel_execve return code: -2
[    4.861602] Failed to execute /sbin/init.  Attempting defaults...
[    4.878021] usb 1-2.2: udev 3, busnum 1, minor = 2
[    4.883087] usb 1-2.2: New USB device found, idVendor=05ac, idProduct=0220
[    4.891632] [KA]: kernel_execve return code: -2
[    4.905212] usb 1-2.2: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[    4.913513] usb 1-2.2: Product: Apple Keyboard
[    4.918945] usb 1-2.2: Manufacturer: Apple, Inc
[    4.924072] [KA]: kernel_execve return code: -2
[    4.939453] usb 1-2.2: usb_probe_device
[    4.943511] usb 1-2.2: configuration #1 chosen from 1 choice
[    4.949768] [KA]: kernel_execve return code: -2
[    4.963806] usb 1-2.2: adding 1-2.2:1.0 (config #1, interface 0)
[    4.971282] usbtest 1-2.2:1.0: usb_probe_interface
[    4.977386] [KA]: kernel_execve return code: -2
[    4.982421] usbtest 1-2.2:1.0: usb_probe_interface - got id
[    4.988708] Kernel panic - not syncing: No init found.  Try passing
init= option to kernel. See Linux Documentation/init.txt for guidance.

I see that /sbin/init exist have right permissions:
knight <at> knight:/media/sdc/rootfs$ ls -al sbin/init
lrwxrwxrwx 1 root root 14 Feb  4 14:50 sbin/init -> ../bin/busybox
knight <at> knight:/media/sdc/rootfs$ ls -al bin/busybox
-rwxr-xr-x 1 root root 879500 Feb  4 14:50 bin/busybox
file bin/busybox
bin/busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV),
dynamically linked (uses shared libs), stripped
file ./lib/libc.so
./lib/libc.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV),
dynamically linked, not stripped

Any recommendation ?

BR,

-KA
Alexey Orishko | 6 Feb 00:17 2014
Picon

CLFS 2.1: ISL-0.12.1 configure failed for x86

Hi guys,

I'm building clfs 2.1 on 64-bit host (Ubuntu) for 32-bit Atom target.

While building gmp in ch.5.9  I have to add ABI=32 as stated in the book:
configure: summary of build options:
  Version:           GNU MP 5.1.3
  Host type:         core2-unknown-linux-gnu
  ABI:               32
  Install prefix:    /cross-tools
  Compiler:          gcc -std=gnu99
  Static libraries:  no
  Shared libraries:  yes

Later on in ch.5.12 configure failed for ISL-0.12.1.
In the log I see:
...
configure:17164: checking for main in -lgmp
configure:17183: gcc -o conftest -O3 -fomit-frame-pointer
-malign-double -fstrict-aliasing -ffast-math -I/cross-tools/include
-L/cross-tools/lib -Wl,-rpath,/cross-tools/lib conftest.c -lgmp  -lgmp
 >&5
/usr/bin/ld: skipping incompatible /cross-tools/lib/libgmp.so when
searching for -lgmp
/usr/bin/ld: cannot find -lgmp
/usr/bin/ld: skipping incompatible /cross-tools/lib/libgmp.so when
searching for -lgmp
/usr/bin/ld: cannot find -lgmp
collect2: ld returned 1 exit status
...
configure:17192: result: no
configure:17202: error: gmp library not found

After googling found:
> I suspect that the problem may be that the libraries are for 32-bit
> when you are attempting to build a 64-bit compiler, or vice versa.
> I was able to build GCC 4.5.1 on MacOS X 10.6.4 recently, but I
> built and installed the GMP, MPFR and MPC libraries myself -
> in /usr/gnu64 (a non-standard location that I use for stuff that I install
> for my own benefit). I also used the configuration option:
> CC='gcc -m64'

Since there was a recommendation to set ABI=32 for configuring gmp,
is something needed for ISL as well in order to succeed?

Regards,
Alexey
Alexey Orishko | 2 Feb 22:45 2014
Picon

CLFS build selection

Hi guys,

After building LFS on Atom, I've decided to try building CLFS.
My target HW is Intel Atom 32-bit and I'm gonna use Ubuntu 12.04
64-bit to build it.

Do I understand it right, that for my configuration of the host and
target I need to pick version 2.1.0-x86_64-Multilib?

Regards,
Alexey
Charlie Brown | 2 Feb 03:59 2014
Picon

systemd branch build report

Hi,
I've been following the systemd branch book. It's great that the
maintainers have made so much progress, and thank you for providing
this guide on building linux systems.
Here is a report of problems I encountered upon finishing building and
rebooting the system, and possible solution. I would apologize if the
solution is indeed in the book and I missed that.

* bzip2 is using /usr not /usr/share for man pages
bzip2' makefile uses PREFIX/man for man pages. I wonder if I missed a
symlink for /usr/doc, but couldn't find it in the book. Anyway, a
simple sed would fix it:
sed -i "s <at> \(\$(PREFIX)/\)man <at> \1share/man <at> g" Makefile

* diffutils po files failed to install
This error is ignored. In case that po files are needed, a simple
patch (confirmed by this post:
http://lists.gnu.org/archive/html/bug-diffutils/2013-09/msg00003.html)
is attached. I guess a sed would do, too.

* expat 32 bit library test need CXX="g++ ${BUILD32}" set to past.

* systemd 64 bit install may need group adm,wheel to be present
This error is ignored. I know little about acl and systemd, so I don't
know if that would be a problem. Here are the commands that require
these groups:
setfacl -nm g:adm:rx,d:g:adm:rx /var/log/journal/
setfacl -nm g:wheel:rx,d:g:wheel:rx /var/log/journal/

* kbd's setfont location
I don't know if I got it wrong when building systemd, but during boot
systemd-vconsole-setup look for setfont in /usr/bin/setfont, not /bin.
It shouldn't do that, as the book seems to expect /usr not available
during early stage of booting. Anyway, I created a symlink in
/usr/bin.

* /etc/mtab
Systemd seems to require it to be a symlink to /proc/self/mounts.

Sincerely,
王文鑫
Charlie
_______________________________________________
Clfs-support mailing list
Clfs-support <at> lists.cross-lfs.org
http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org

Gmane