[Aboriginal] Unable to use gcc inside chroot of latest aboriginal.

James McMechan james.w.mcmechan at gmail.com
Sun Jan 17 18:13:21 PST 2016


Hi Rob,

I decided to follow the example given:

#more/chroot-splice.sh x86_64 /tmp
mount: /home/mcmechan/Downloads/aboriginal-1.4.5/build/chroot-x86_64/mnt is
busy
Umounting: /home/mcmechan/Downloads/aboriginal-1.4.5/build/chroot-x86_64/mnt

Ok works on other machines not sure what is happing here.
#mkdir dummy.dir
#more/chroot-splice.sh x86_64 dummy.dir
mount: /home/mcmechan/Downloads/aboriginal-1.4.5/build/chroot-x86_64/mnt is
busy
Umounting: /home/mcmechan/Downloads/aboriginal-1.4.5/build/chroot-x86_64/mnt

I got around that by making a 1M ext2 filesystem just to make the script
happy and later a patch [1]

# more/chroot-splice.sh x86_64 dummy.fs
Aboriginal Linux 1.4.2
Type exit when done.
(x86_64:1) / $ cd aboriginal-1.4.5/
(x86_64:1) /aboriginal-1.4.5 $ ./build.sh x86_64
=== Download source code.
<...>
=== Got all source.
<...>
=== busybox (host host-tools)
Extracting
'busybox'...........................................................................
Snapshot 'busybox'...
sh: set: -e: invalid option
  HOSTCC  scripts/basic/fixdep
<..>
Exiting due to errors (host host-tools busybox)

This seems to be because /usr/bin/sh -> busybox and gives hush?

I changed the symlink to bash

Then toybox/scripts/make.sh tries to use features which are not in /bin/bash
<...>
scripts/make.sh: line 7: set: pipefail: invalid option name
<...>
Compile toybox.scripts/make.sh: line 1: jobs: command not found
<...>
rawcc: generated/obj/xargs.o: No such file or directory
make: *** [toybox] Error 1

Exiting due to errors (host host-tools toybox)

Now the only two files overlapping between root-filesystem-x86_64 and
native-compiler-x86_64 are /bin/sh (busybox/bash) and /usr/bin/strings
(toybox/binutils)

Should we manually fix up the problem and if so when? stop building sh link
in busybox and strings in toybox or just remove them from chroot-x86_64
before the second copy in more/choot-splice.sh?



Noted while mucking about
1) escape sequences being stuck in logfiles created with ./build.sh $ARCH
&>>result.$ARCH
gets in the way of grep "^===" like in the documentation. Used echo "export
NO_TITLE_BAR=1" >> config
there are quite a few places that have open coded escape sequences that end
up in the logs
the suggestion from the xterm man page is to use printf (POSIX) over echo
-e (GNU extension) for creating them.
The build system could also detect not going to a terminal with test -t 1
either setting NO_TITLE_BAR or having the test before the output, not
having escape sequences in log files makes searching easier perhaps even a
NO_ESCAPE_SEQUENCE=1 config symbol?

2) toybox has nsenter defaulting to "y" this fails due to not having
_GNU_SOURCE defined before trying to use setns on debian derived systems
raspberrypi libc6-2.13-38+rpi2+deb7u8 (arm6hf)
ci20 libc6-2.13-38+deb7u8 (mips32r2)
both of these are fully up to date as far as I can tell: aptitude update,
aptitude full-upgrade
these two boxes are also no longer able to build distcc with
configure: error: cannot guess build type; you must specify one
for some reason, I am still looking at this.

3) dev-environment.sh seems to require that you be in its directory before
running.
may I suggest adding the customary
cd `dirname $0`
at the start, it might also be helpful for native-build.sh
all of your other commands seem to need to be run from the aboriginal
directory. These were different and I had not run them in quite a while.

4) dev-environment.sh prints out about mke2fs being missing before updating
$PATH
It is in /sbin which is not in the default path of a ordinary user.  At
work we have been spending way to much time tightening down our Linux
boxes, I expect some places ordinary users can't run anything from /sbin or
/usr/sbin

which: no mke2fs in
(/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-
gnu/gcc-bin/4.9.3:/usr/games/bin)

It does not seem to be harmful and I am not using the extra virtual hard
disk but on first glance it looked like it might be a problem...

5) mips64 still has problems at the moment
qemu exits on boot with
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a
Real hardware does not want to run any of the executables past a exec?
# chroot . usr/bin/sh
# echo *
bin dev etc home lib mnt proc root sbin sys tmp usr
# ls
Segmentation fault
# chroot . usr/bin/toybox ls
bin dev etc home lib mnt proc root sbin sys tmp usr

6) setting the export BUILD=work var in config no longer changes the
default build destination successfully, I remember using it quite a while
ago because I disliked the tab-completion of build, also trying to figure
out why.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/aboriginal-landley.net/attachments/20160117/3dbe4165/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chroot-splice.patch
Type: text/x-patch
Size: 1352 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/aboriginal-landley.net/attachments/20160117/3dbe4165/attachment.bin>


More information about the Aboriginal mailing list