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

KARBOWSKI Piotr piotr.karbowski at gmail.com
Sun Jan 17 01:29:02 PST 2016


Hi,

On 01/17/2016 07:53 AM, Rob Landley wrote:
> So yes, by intentionally ignoring the working examples provided
> (more/setup-chroot.sh and such), you did indeed find a bug. Thanks for
> the heads up.

Actually, I've tried to use it the same way I always used aboriginal 
1.2.0 and older. Just chroot and used to work.

And it seems the init.sh does not really work, toybox bug?

The chroot-splice.sh runs

     CPUS=1 HOST="$1" chroot "$CHROOT" /sbin/init.sh

where the $1 is arch, so x86_64 for me. If I run it manually, then I am 
getting a load of syntax errors.

kurogane aboriginal # CPUS='1' HOST='x86_64' chroot ./foo /sbin/init.sh
sed: invalid integer argument s/PRETTY_NAME="\([^"]*\)"/\1/p
mountpoint: invalid option -- q
Usage: mountpoint [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mountpoint: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
Usage: mount [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mount: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
mountpoint: invalid option -- q
Usage: mountpoint [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mountpoint: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
Usage: mount [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mount: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
mountpoint: invalid option -- q
Usage: mountpoint [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mountpoint: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
Usage: mount [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mount: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
hush: can't execute 'mdev': No such file or directory
mkdir: invalid option -- p
Usage: mkdir [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mkdir: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
mountpoint: invalid option -- q
Usage: mountpoint [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mountpoint: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
Usage: mount [option(s)] [file(s)]
  Display printable strings in [file(s)] (stdin by default)
  The options are:
   -a - --all                Scan the entire file, not just the data section
   -f --print-file-name      Print the name of the file before each string
   -n --bytes=[number]       Locate & print any NUL-terminated sequence 
of at
   -<number>                 least [number] characters (default 4).
   -t --radix={o,d,x}        Print the location of the string in base 8, 
10 or 16
   -o                        An alias for --radix=o
   -T --target=<BFDNAME>     Specify the binary file format
   -e --encoding={s,S,b,l,B,L} Select character size and endianness:
                             s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} 
= 32-bit
   @<file>                   Read options from <file>
   -h --help                 Display this information
   -v --version              Print the program's version number
mount: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little 
elf32-big srec symbolsrec tekhex binary ihex
grep: 'default for QEMU': No such file
date: '+%s': No such file
hush: out of range
Type exit when done.
(x86_64:1) / $

I think something went wrong and I am pretty sure I am doing it exactly 
as the working example shows. Combine two dirs, then chroot with running 
init.sh.

Seems kind of like broken toybox to me. Anything that is symlinked to 
toybox does not work here, I mean, it prints the very same help/error 
output, looks like its `strings`.

My host is pretty normal. The only thing you may found uncommon is that 
I am running NILFS2 on the very partition I build and run aboriginal 
from. (Actually I've run into issues where bind-mounting NILFS2 
partition spawn another garbage collector for nilfs, shoudn't imo).

-- Piotr.

 1453022942.0


More information about the Aboriginal mailing list