TorizonCoreBulder exec format error

Hello,

I updated my tcb-env-setup.sh script and now every command I run with torizoncore-builder returns the following:

parallels@ubuntu-linux-22-04-02-desktop:~/bengur/tcbdir$ torizoncore-builder -h
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /builder/torizoncore-builder: exec format error

I’ve gotten the warning before, I’m running an Ubuntu x86_64 Parallels VM on a Silicon Mac and manually pulled the linux/amd64 version of tcb.

What is this exec format error?

Greetings @bengur,

Well it looks like despite being an x86 VM, your machine still can’t execute an amd64 binaries/container. Even via the warning message Docker can tell the system is arm64 and not amd64. I got the same exact error trying to run torizoncore-builder on our arm64 module, with no VM running of course.

Is your VM actually properly emulating amd64/x86 architecture? If so I don’t see a reason it can’t execute an amd64 container. But, it really looks like it’s not actually emulating x86 at all.

Your only other option would be to try and re-build TorizonCore Builder from scratch for arm64 architecture. But this is obviously not tested so I can’t guarantee anything here.

Best Regards,
Jeremias

I was using the amd64 version of tcb to build images on this vm two weeks ago, so that makes me think it really was/is emulating x86 properly. Again this was only a problem once I updated the tcb-env-setup.sh script with wget, I was still getting the warning then but it still ran commands no problem.

I’ll consider rebuilding for arm64, can you think of any reason updating the setup script would cause this? Is the earlier release of tcb from early September available somewhere?

Again this was only a problem once I updated the tcb-env-setup.sh script with wget, I was still getting the warning then but it still ran commands no problem.

The setup script hasn’t been changed since September 2022, were you working with a version of the setup script from before this?

can you think of any reason updating the setup script would cause this?

Not really, if you look at the setup script, all it really does is pull the latest TCB container image. Then it creates an alias for the torizoncore-builder command. None of this should cause an “exec format error”. An exec format error usually happens when you try to execute something built for one architecture on a machine with a different architecture. Which is why I’m suspicious on whether your VM can actually execute an amd64 container. But if you said that it worked before then something has changed. Now whether it’s on the TCB side or the VM side I can’t say.

Is the earlier release of tcb from early September available somewhere?

I’m not sure I understand this question. The last stable release of TCB was released in August 2023. So the current latest release, is the version of TCB from early September.

Best Regards,
Jeremias

Ok, thanks for your help. Turns out Parallels moved x86 emulation to their pro license last month and was even blocked on already built VM’s. I upgraded and can now run tcb commands without an exec format error.

Cheers

That’s unfortunate to hear, but at least we know what happened now, thank you for reporting back.

Best Regards,
Jeremias