qemu-aarch64-static
LS, I can't find the qemu-aarch64-static with the available qemu version. Where can I get it? Frans. -- A: Yes, just like that A: Ja, net zo Q: Oh, Just like reading a book backwards Q: Oh, net als een boek achterstevoren lezen A: Because it upsets the natural flow of a story A: Omdat het de natuurlijke gang uit het verhaal haalt Q: Why is top-posting annoying? Q: Waarom is Top-posting zo irritant?
Hi,
-----Original Message----- From: Frans de Boer
Sent: 26 August 2021 15:22 To: opensuse-factory@opensuse.org Subject: qemu-aarch64-static LS,
I can't find the qemu-aarch64-static with the available qemu version. Where can I get it?
If you need 'qemu-aarch64', it is in 'qemu-linux-user' package. Guillaume
Frans.
-- A: Yes, just like that A: Ja, net zo Q: Oh, Just like reading a book backwards Q: Oh, net als een boek achterstevoren lezen A: Because it upsets the natural flow of a story A: Omdat het de natuurlijke gang uit het verhaal haalt Q: Why is top-posting annoying? Q: Waarom is Top-posting zo irritant?
Hi, > >> -----Original Message----- From: Frans de Boer
Sent: 26 August 2021 15:22 To: opensuse-factory@opensuse.org >> Subject: qemu-aarch64-static >> >> LS, >> >> I can't find the qemu-aarch64-static with the available qemu >> version. Where can I get it? > > If you need 'qemu-aarch64', it is in 'qemu-linux-user' package. Guillaume I just found out that qemu-aarch64 is indeed statically
On 8/30/21 09:28, Guillaume Gardet wrote: linked. The ´qemu-aarch64-binfmt' is a soft link to qemu-binfm, which itself is also statically linked. So, I guessed that I needed qemu-binfmt within the chroot jail to deal with the different magic file numbers for aarch64 executables. Not so, that did not worked either. The final bash shell is never started. What am I doing wrong? Prior to the chroot command, qemu-aarch64-binfmt (actually qemy-binfmt) is copied to /newroot/usr/bin. To start chroot is: /usr/bin/qemu-aarch64 -strace -cpu cortex-a53 -L /newroot /newroot/usr/sbin/chroot "/newroot" \ /usr/bin/env -i \ HOME=/root \ TERM="$TERM" \ PS1='(lfs chroot) \u:\w\$ ' \ PS4='(${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]} - [${SHLVL},${BASH_SUBSHELL}, $?] ' \ PATH=/usr/bin:/usr/sbin \ bldNAME='FdB' \ /usr/bin/bash --login +h The output of the -strace is now: + /usr/bin/qemu-aarch64 -strace -cpu cortex-a53 -L /mnt/lfs /mnt/lfs/usr/sbin/chroot /mnt/lfs /usr/bin/env -i HOME=/root T ERM=xterm-256color 'PS1=(lfs chroot) \u:\w\$ ' 'PS4=(${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]} - [${SHLVL},${BASH_SUBSHELL} , $?] ' PATH=/usr/bin:/usr/sbin bldNAME=FdB /usr/bin/bash --login +h 11237 brk(NULL) = 0x000000000041b000 11237 uname(0x55007ff598) = 0 11237 faccessat(AT_FDCWD,"/etc/ld.so.preload",R_OK,AT_EACCESS|0x34cc8) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/etc/ld.so.cache",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007feb70,0x1000) = 0 11237 mmap(NULL,78492,PROT_READ,MAP_PRIVATE,3,0) = 0x0000005500839000 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/tls/aarch64/libc.so.6",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 newfstatat(AT_FDCWD,"/usr/lib/tls/aarch64",0x00000055007feba0,0) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/tls/libc.so.6",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 newfstatat(AT_FDCWD,"/usr/lib/tls",0x00000055007feba0,0) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/aarch64/libc.so.6",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 newfstatat(AT_FDCWD,"/usr/lib/aarch64",0x00000055007feba0,0) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/libc.so.6",O_RDONLY|O_CLOEXEC) = 3 11237 read(3,0x7fed00,832) = 832 11237 newfstatat(3,"",0x00000055007feba0,0x1000) = 0 11237 mmap(NULL,1691192,PROT_EXEC|PROT_READ,MAP_PRIVATE|MAP_DENYWRITE,3,0) = 0x000000550084d000 11237 mprotect(0x00000055009c9000,61440,PROT_NONE) = 0 11237 mmap(0x00000055009d8000,24576,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_DENYWRITE|MAP_FIXED,3,0x17b000) = 0x00000055009d8 000 11237 mmap(0x00000055009de000,48696,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED,-1,0) = 0x00000055009de000 11237 close(3) = 0 11237 mmap(NULL,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) = 0x00000055009ea000 11237 set_tid_address(365082617648,365082619376,365082617440,365080834112,365082617632,365080838368) = 11237 11237 set_robust_list(365082617664,24,365082617440,365082617712,365082617664,1) = -1 errno=38 (Function not implemented) 11237 mprotect(0x00000055009d8000,16384,PROT_READ) = 0 11237 mprotect(0x0000000000419000,4096,PROT_READ) = 0 11237 mprotect(0x0000005500835000,8192,PROT_READ) = 0 11237 prlimit64(0,3,0,365080606480,365082143416,40) = 0 11237 munmap(0x0000005500839000,78492) = 0 11237 getrandom(365082585408,8,1,365082617440,0,365080611497) = 8 11237 brk(NULL) = 0x000000000041b000 11237 brk(0x000000000043c000) = 0x000000000043c000 11237 openat(AT_FDCWD,"/usr/lib/locale/locale-archive",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/share/locale/locale.alias",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff310,0x1000) = 0 11237 read(3,0x41b4a0,4096) = 2998 11237 read(3,0x41b4a0,4096) = 0 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or di rectory) 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff6d0,0x1000) = 0 11237 mmap(NULL,369,PROT_READ,MAP_PRIVATE,3,0) = 0x00000055009ec000 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/gconv/gconv-modules.cache",O_RDONLY) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/gconv/gconv-modules",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff350,0x1000) = 0 11237 read(3,0x41d310,4096) = 3808 11237 read(3,0x41d310,4096) = 0 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/gconv/gconv-modules.d",O_RDONLY|O_DIRECTORY|O_NONBLOCK|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff4b0,0x1000) = 0 11237 getdents64(3,4321280,32768,2147483647,4,3) = 96 11237 openat(AT_FDCWD,"/usr/lib/gconv/gconv-modules.d/gconv-modules-extra.conf",O_RDONLY|O_CLOEXEC) = 4 11237 newfstatat(4,"",0x00000055007ff350,0x1000) = 0 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 brk(0x000000000045d000) = 0x000000000045d000 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 4096 11237 read(4,0x427010,4096) = 726 11237 read(4,0x427010,4096) = 0 11237 close(4) = 0 11237 getdents64(3,4321280,32768,2147483647,4,7) = 0 11237 close(3) = 0 11237 futex(0x00000055009dd874,FUTEX_PRIVATE_FLAG|FUTEX_WAKE,2147483647,NULL,0x0000000000000026,38) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/nl_NL.UTF-8/LC_MEASUREMENT",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or direc tory) 11237 openat(AT_FDCWD,"/usr/lib/locale/nl_NL.utf8/LC_MEASUREMENT",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff6d0,0x1000) = 0 11237 mmap(NULL,23,PROT_READ,MAP_PRIVATE,3,0) = 0x00000055009ed000 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.UTF-8/LC_TELEPHONE",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directo ry) 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.utf8/LC_TELEPHONE",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff6d0,0x1000) = 0 11237 mmap(NULL,59,PROT_READ,MAP_PRIVATE,3,0) = 0x00000055009ee000 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.UTF-8/LC_ADDRESS",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory ) 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.utf8/LC_ADDRESS",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff6d0,0x1000) = 0 11237 mmap(NULL,167,PROT_READ,MAP_PRIVATE,3,0) = 0x00000055009ef000 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.UTF-8/LC_NAME",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.utf8/LC_NAME",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff6d0,0x1000) = 0 11237 mmap(NULL,77,PROT_READ,MAP_PRIVATE,3,0) = 0x00000055009f0000 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.UTF-8/LC_PAPER",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.utf8/LC_PAPER",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff6d0,0x1000) = 0 11237 mmap(NULL,34,PROT_READ,MAP_PRIVATE,3,0) = 0x00000055009f1000 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.UTF-8/LC_MESSAGES",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or director y) 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.utf8/LC_MESSAGES",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff6d0,0x1000) = 0 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES",O_RDONLY|O_CLOEXEC) = 3 11237 newfstatat(3,"",0x00000055007ff6d0,0x1000) = 0 11237 mmap(NULL,57,PROT_READ,MAP_PRIVATE,3,0) = 0x00000055009f2000 11237 close(3) = 0 11237 openat(AT_FDCWD,"/usr/lib/locale/en_NL.UTF-8/LC_MONETARY",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or director y) 11237 openat(AT_FDCWD,"/usr/lib/locale/en_NL.utf8/LC_MONETARY",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory ) 11237 openat(AT_FDCWD,"/usr/lib/locale/en_NL/LC_MONETARY",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/locale/en.UTF-8/LC_MONETARY",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/locale/en.utf8/LC_MONETARY",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 openat(AT_FDCWD,"/usr/lib/locale/en/LC_MONETARY",O_RDONLY|O_CLOEXEC) = -1 errno=2 (No such file or directory) 11237 readlinkat(AT_FDCWD,"/mnt",0x00000055007ff140,1023) = -1 errno=22 (Invalid argument) 11237 readlinkat(AT_FDCWD,"/mnt/lfs",0x00000055007ff140,1023) = -1 errno=22 (Invalid argument) 11237 chroot("/mnt/lfs") = 0 11237 chdir("/") = 0 PS: read /mnt/lfs as /newroot. That is it, it just exit the script file. Using my own compiled 'qemu-aarch64-binfmt' (using -target=...) shows after the last line the expected bash prompt. So that works up to that point. And then I am back to my latest issue: within the chroot jail, the configure script with gcc, gettext and a lot of other packages, can't find the version of the bash script - complaining that is its too old or not existing, while it is just version 5.1.8. Other aarch64 programs like tar, bash, patch etc. just run. --- Frans.
On Mon, 2021-08-30 at 21:09 +0200, Frans de Boer wrote:
On 8/30/21 09:28, Guillaume Gardet wrote: > Hi,
-----Original Message----- From: Frans de Boer
Sent: 26 August 2021 15:22 To: opensuse-factory@opensuse.org Subject: qemu-aarch64-static LS,
I can't find the qemu-aarch64-static with the available qemu version. Where can I get it?
If you need 'qemu-aarch64', it is in 'qemu-linux-user' package.
Guillaume
I just found out that qemu-aarch64 is indeed statically linked. The ´qemu-aarch64-binfmt' is a soft link to qemu-binfm, which itself is also statically linked. So, I guessed that I needed qemu-binfmt within the chroot jail to deal with the different magic file numbers for aarch64 executables.
Under openSUSE, qemu-binfmt is not a qemu executable. It is just a tiny wrapper that mangles argv[0] and starts the actual emulator, qemu- aarch64. qemu-binfmt's only purpose is to fix argv[0] to hide the presence of the emulator and make the process look like a native one. (see https://build.opensuse.org/package/view_file/Virtualization/qemu/linux-user-...) AFAIK, this is a openSUSE peculiarity. In your chroot, you need both these binaries. I recently filed a bug about this, 1186256. Regards Martin
On 8/30/21 22:35, Martin Wilck wrote:
-----Original Message----- From: Frans de Boer
Sent: 26 August 2021 15:22 To: opensuse-factory@opensuse.org Subject: qemu-aarch64-static LS,
I can't find the qemu-aarch64-static with the available qemu version. Where can I get it? If you need 'qemu-aarch64', it is in 'qemu-linux-user' package.
Guillaume I just found out that qemu-aarch64 is indeed statically linked. The ´qemu-aarch64-binfmt' is a soft link to qemu-binfm, which itself is also statically linked. So, I guessed that I needed qemu-binfmt within
On 8/30/21 09:28, Guillaume Gardet wrote: > Hi, the chroot jail to deal with the different magic file numbers for aarch64 executables. Under openSUSE, qemu-binfmt is not a qemu executable. It is just a tiny wrapper that mangles argv[0] and starts the actual emulator, qemu- aarch64. qemu-binfmt's only purpose is to fix argv[0] to hide the
On Mon, 2021-08-30 at 21:09 +0200, Frans de Boer wrote: presence of the emulator and make the process look like a native one. (see https://build.opensuse.org/package/view_file/Virtualization/qemu/linux-user-...) AFAIK, this is a openSUSE peculiarity.
In your chroot, you need both these binaries. I recently filed a bug about this, 1186256.
Regards Martin Ok, thnx. I also copied the TW supplied qemu-aarch64 into the jail and now it starts-up.
However, configure - from multiple packages - still complains about the outdated shell version, while previously compiled aarch64 programs are just running in the jail. TW has no pre-compiled bash shell for aarch64, but from what I see in trace output, configure get the proper version data, but does not recognize it. But maybe someone with intimate knowledge about the inner workings of the configure script can decrypt the attached trace output? Command was 'bash -x ./configure 2>&1 | tee db.txt' --- Frans
On Tue, Aug 31, 2021 at 1:08 PM Frans de Boer
However, configure - from multiple packages - still complains about the outdated shell version, while previously compiled aarch64 programs are just running in the jail. TW has no pre-compiled bash shell for aarch64, but from what I see in trace output, configure get the proper version data, but does not recognize it. But maybe someone with intimate knowledge about the inner workings of the configure script can decrypt the attached trace output? Command was 'bash -x ./configure 2>&1 | tee db.txt'
To interpret this output configure script itself is needed.
On 8/31/21 12:41, Andrei Borzenkov wrote:
On Tue, Aug 31, 2021 at 1:08 PM Frans de Boer
wrote: However, configure - from multiple packages - still complains about the outdated shell version, while previously compiled aarch64 programs are just running in the jail. TW has no pre-compiled bash shell for aarch64, but from what I see in trace output, configure get the proper version data, but does not recognize it. But maybe someone with intimate knowledge about the inner workings of the configure script can decrypt the attached trace output? Command was 'bash -x ./configure 2>&1 | tee db.txt'
To interpret this output configure script itself is needed. /it is - as an example - the output of the configure script of bison-3.7.6. /Many others have the same output. //
-- A: Yes, just like that A: Ja, net zo Q: Oh, Just like reading a book backwards Q: Oh, net als een boek achterstevoren lezen A: Because it upsets the natural flow of a story A: Omdat het de natuurlijke gang uit het verhaal haalt Q: Why is top-posting annoying? Q: Waarom is Top-posting zo irritant?
On Tue, Aug 31, 2021 at 2:23 PM Frans de Boer
On 8/31/21 12:41, Andrei Borzenkov wrote:
On Tue, Aug 31, 2021 at 1:08 PM Frans de Boer
wrote: However, configure - from multiple packages - still complains about the outdated shell version, while previously compiled aarch64 programs are just running in the jail. TW has no pre-compiled bash shell for aarch64, but from what I see in trace output, configure get the proper version data, but does not recognize it. But maybe someone with intimate knowledge about the inner workings of the configure script can decrypt the attached trace output? Command was 'bash -x ./configure 2>&1 | tee db.txt'
To interpret this output configure script itself is needed.
it is - as an example - the output of the configure script of bison-3.7.6. Many others have the same output.
It tries to find shell that can execute shell-compatible script, it calls /bin/sh -c "script" /bin/bash -c "script" and apparently all of them fail. There is no information why or what exit code is but it must fail with non-zero exit code. As it is unlikely that script fails, I assume you have problem with calling /bin/bash (or /usr/bin/bash).
On Tue, Aug 31, 2021 at 2:23 PM Frans de Boer
wrote: On 8/31/21 12:41, Andrei Borzenkov wrote:
On Tue, Aug 31, 2021 at 1:08 PM Frans de Boer
wrote: However, configure - from multiple packages - still complains about the outdated shell version, while previously compiled aarch64 programs are just running in the jail. TW has no pre-compiled bash shell for aarch64, but from what I see in trace output, configure get the proper version data, but does not recognize it. But maybe someone with intimate knowledge about the inner workings of the configure script can decrypt the attached trace output? Command was 'bash -x ./configure 2>&1 | tee db.txt'
To interpret this output configure script itself is needed.
it is - as an example - the output of the configure script of bison-3.7.6. Many others have the same output.
It tries to find shell that can execute shell-compatible script, it calls
/bin/sh -c "script" /bin/bash -c "script"
and apparently all of them fail. There is no information why or what exit code is but it must fail with non-zero exit code. As it is unlikely that script fails, I assume you have problem with calling /bin/bash (or /usr/bin/bash). To that end, I already had made sure that /bin/bash exist for real and
On 8/31/21 15:25, Andrei Borzenkov wrote: that /bin is no link to /usr/bin. Also, the tools I use are bash scripts, which calls other bash scripts without problem - in any /bin configuration. I even made bash statically linked, just like most other tools. All to no avail. That's why it is so hard to understand. Everything works, but not the configure scripts. If only there was a way to cut out the shell check code from configure, but reading and understanding configure is hard to do due to the way it is created :( Frans
On Tue, 2021-08-31 at 15:40 +0200, Frans de Boer wrote:
To that end, I already had made sure that /bin/bash exist for real and that /bin is no link to /usr/bin. Also, the tools I use are bash scripts, which calls other bash scripts without problem - in any /bin configuration. I even made bash statically linked, just like most other tools. All to no avail.
So, you can run /bin/bash in your chroot? Because it looks in your output as if no shell ever starts. I'd suspected some missing shared library, but if it also happens for statically linked bash, there must be some other - probably similar - reason. By design, "configure" is written in a shell dialect that's portable to the maximum possible extent. Your shell can't possibly be too old for it - it's broken. TBH, I you are causing yourself lots of trouble by your use of chroot and statically linked binaries. Why not just use a container?
sudo podman run --rm --privileged --net none multiarch/qemu-user- static --reset -p yes Setting /usr/bin/qemu-aarch64-static as binfmt interpreter for aarch64 podman run --quiet -it --rm --arch=arm64 registry.opensuse.org/opensuse/leap:15.3 :/ # grep CPE /etc/os-release CPE_NAME="cpe:/o:opensuse:leap:15.3" :/ # uname -a Linux edbe550e5ede 5.13.12-2-default #1 SMP Fri Aug 20 07:04:28 UTC 2021 (33df9c6) aarch64 aarch64 aarch64 GNU/Linux
This is almost about as easy as it gets, and every binary from Leap/aarch64 can be installed by regular means and "just works". Once the issue with qemu-binfmt is fixed, it would even work with the regular openSUSE version of qemu. Regards Martin
On 8/31/21 16:35, Martin Wilck wrote:
To that end, I already had made sure that /bin/bash exist for real and that /bin is no link to /usr/bin. Also, the tools I use are bash scripts, which calls other bash scripts without problem - in any /bin configuration. I even made bash statically linked, just like most other tools. All to no avail. So, you can run /bin/bash in your chroot? Because it looks in your output as if no shell ever starts. I'd suspected some missing shared
On Tue, 2021-08-31 at 15:40 +0200, Frans de Boer wrote: library, but if it also happens for statically linked bash, there must be some other - probably similar - reason.
By design, "configure" is written in a shell dialect that's portable to the maximum possible extent. Your shell can't possibly be too old for it - it's broken. If bash is broken, how can I use it in other scripts, which also check for availability of files and sometimes their version number?
TBH, I you are causing yourself lots of trouble by your use of chroot and statically linked binaries. Why not just use a container?
sudo podman run --rm --privileged --net none multiarch/qemu-user- static --reset -p yes Setting /usr/bin/qemu-aarch64-static as binfmt interpreter for aarch64 podman run --quiet -it --rm --arch=arm64 registry.opensuse.org/opensuse/leap:15.3 :/ # grep CPE /etc/os-release CPE_NAME="cpe:/o:opensuse:leap:15.3" :/ # uname -a Linux edbe550e5ede 5.13.12-2-default #1 SMP Fri Aug 20 07:04:28 UTC 2021 (33df9c6) aarch64 aarch64 aarch64 GNU/Linux
This is almost about as easy as it gets, and every binary from Leap/aarch64 can be installed by regular means and "just works". Once the issue with qemu-binfmt is fixed, it would even work with the regular openSUSE version of qemu.
Regards Martin
Hm, maybe I should read-up again about containers. The last time I did that, it seemed fairly complicated to use it as an environment to created a new but lean basic linux system. So, compile all myself and not use stuff from others, except for the first stage of building the cross compiler, glibc, and binutils. Maybe also figure out what to remove from the configure script to avoid the false report. --- Frans.
On 8/31/21 12:07, Frans de Boer wrote:
On 8/30/21 22:35, Martin Wilck wrote:
-----Original Message----- From: Frans de Boer
Sent: 26 August 2021 15:22 To: opensuse-factory@opensuse.org Subject: qemu-aarch64-static LS,
I can't find the qemu-aarch64-static with the available qemu version. Where can I get it? If you need 'qemu-aarch64', it is in 'qemu-linux-user' package.
Guillaume I just found out that qemu-aarch64 is indeed statically linked. The ´qemu-aarch64-binfmt' is a soft link to qemu-binfm, which itself is also statically linked. So, I guessed that I needed qemu-binfmt within
On 8/30/21 09:28, Guillaume Gardet wrote: > Hi, the chroot jail to deal with the different magic file numbers for aarch64 executables. Under openSUSE, qemu-binfmt is not a qemu executable. It is just a tiny wrapper that mangles argv[0] and starts the actual emulator, qemu- aarch64. qemu-binfmt's only purpose is to fix argv[0] to hide the
On Mon, 2021-08-30 at 21:09 +0200, Frans de Boer wrote: presence of the emulator and make the process look like a native one. (see https://build.opensuse.org/package/view_file/Virtualization/qemu/linux-user-...)
AFAIK, this is a openSUSE peculiarity.
In your chroot, you need both these binaries. I recently filed a bug about this, 1186256.
Regards Martin Ok, thnx. I also copied the TW supplied qemu-aarch64 into the jail and now it starts-up.
However, configure - from multiple packages - still complains about the outdated shell version, while previously compiled aarch64 programs are just running in the jail. TW has no pre-compiled bash shell for aarch64, but from what I see in trace output, configure get the proper version data, but does not recognize it. But maybe someone with intimate knowledge about the inner workings of the configure script can decrypt the attached trace output? Command was 'bash -x ./configure 2>&1 | tee db.txt'
--- Frans After I deleted a single 'if' statement in configure, almost all went well. Almost, because now there is an other issue, which I detailed in a new thread.
Original code within configure: for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done Where the new code is: for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. + as_dir=/bin as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done The reason why the first one is not working, might be related somehow to the new issue (and thread). Remember, this is all done under qemu-aarch64 and a chrooted filesystem. Oh, maybe for maintainers of the configure scripts: try to code in a more understandable way using proper nesting and indentations. Unless of course obscurity is your aim. --- Frans. -- A: Yes, just like that A: Ja, net zo Q: Oh, Just like reading a book backwards Q: Oh, net als een boek achterstevoren lezen A: Because it upsets the natural flow of a story A: Omdat het de natuurlijke gang uit het verhaal haalt Q: Why is top-posting annoying? Q: Waarom is Top-posting zo irritant?
On 8/31/21 12:07, Frans de Boer wrote:
On 8/30/21 22:35, Martin Wilck wrote:
-----Original Message----- From: Frans de Boer
Sent: 26 August 2021 15:22 To: opensuse-factory@opensuse.org Subject: qemu-aarch64-static LS,
I can't find the qemu-aarch64-static with the available qemu version. Where can I get it? If you need 'qemu-aarch64', it is in 'qemu-linux-user' package.
Guillaume I just found out that qemu-aarch64 is indeed statically linked. The ´qemu-aarch64-binfmt' is a soft link to qemu-binfm, which itself is also statically linked. So, I guessed that I needed qemu-binfmt within
On 8/30/21 09:28, Guillaume Gardet wrote: > Hi, the chroot jail to deal with the different magic file numbers for aarch64 executables. Under openSUSE, qemu-binfmt is not a qemu executable. It is just a tiny wrapper that mangles argv[0] and starts the actual emulator, qemu- aarch64. qemu-binfmt's only purpose is to fix argv[0] to hide the
On Mon, 2021-08-30 at 21:09 +0200, Frans de Boer wrote: presence of the emulator and make the process look like a native one. (see https://build.opensuse.org/package/view_file/Virtualization/qemu/linux-user-...)
AFAIK, this is a openSUSE peculiarity.
In your chroot, you need both these binaries. I recently filed a bug about this, 1186256.
Regards Martin Ok, thnx. I also copied the TW supplied qemu-aarch64 into the jail and now it starts-up.
However, configure - from multiple packages - still complains about the outdated shell version, while previously compiled aarch64 programs are just running in the jail. TW has no pre-compiled bash shell for aarch64, but from what I see in trace output, configure get the proper version data, but does not recognize it. But maybe someone with intimate knowledge about the inner workings of the configure script can decrypt the attached trace output? Command was 'bash -x ./configure 2>&1 | tee db.txt'
--- Frans After I deleted a single 'if' statement in configure, almost all went well. Almost, because now there is an other issue, which I detailed in a new thread.
Original code within configure: for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done Where the new code is: for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. + as_dir=/bin as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi - fi done;; esac as_found=false done The reason why the first one is not working, might be related somehow to the new issue (and thread). Remember, this is all done under qemu-aarch64 and a chrooted filesystem. Oh, maybe for maintainers of the configure scripts: try to code in a more understandable way using proper nesting and indentations. Unless of course obscurity is your aim. --- Frans. -- A: Yes, just like that A: Ja, net zo Q: Oh, Just like reading a book backwards Q: Oh, net als een boek achterstevoren lezen A: Because it upsets the natural flow of a story A: Omdat het de natuurlijke gang uit het verhaal haalt Q: Why is top-posting annoying? Q: Waarom is Top-posting zo irritant?
Dne 26. 08. 21 v 15:22 Frans de Boer napsal(a):
I can't find the qemu-aarch64-static with the available qemu version. Where can I get it?
Is this about https://bugzilla.suse.com/show_bug.cgi?id=1189898 ? Matěj -- https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 There is only one happiness here below: peace of mind and a heart free of guilt. Greatness is dangerous and glory an empty game. It gives only empty shadows; it takes so much away! -- Franz Grillparzer: Der Traum ein Leben
On 8/30/21 11:07, Matěj Cepl wrote:
Dne 26. 08. 21 v 15:22 Frans de Boer napsal(a):
I can't find the qemu-aarch64-static with the available qemu version. Where can I get it?
Is this about https://bugzilla.suse.com/show_bug.cgi?id=1189898 ?
Matěj
No, it's not. -- A: Yes, just like that A: Ja, net zo Q: Oh, Just like reading a book backwards Q: Oh, net als een boek achterstevoren lezen A: Because it upsets the natural flow of a story A: Omdat het de natuurlijke gang uit het verhaal haalt Q: Why is top-posting annoying? Q: Waarom is Top-posting zo irritant?
participants (6)
-
Andrei Borzenkov
-
Frans de Boer
-
Guillaume Gardet
-
Martin Wilck
-
Martin Wilck
-
Matěj Cepl