Nix, the purely functional package manager
GNU Lesser General Public License v2.1
12.79k
stars
1.52k
forks
source link
Not possible to build 32bit binary using emulation on 64bit only processor. `cannot set 32-bit personality: Invalid argument` #6473
Open
patryk4815 opened 2 years ago
Describe the bug apple silicon M1 support only 64bit:
error: cannot set 32-bit personality: Invalid argument
extra info: https://news.ycombinator.com/item?id=27278019Steps To Reproduce
[root@nixos:~]# ./result/bin/hello -bash: ./result/bin/hello: cannot execute binary file: Exec format error
[root@nixos:~]# mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
[root@nixos:~]# nix-env -i qemu replacing old 'qemu-7.0.0' installing 'qemu-7.0.0'
[root@nixos:~]# echo ':qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/root/.nix-profile/bin/qemu-arm:OCF' > /proc/sys/fs/binfmt_misc/register
[root@nixos:~]# ./result/bin/hello Hello, world!
Expected behavior Is should be possible to build 32bits binary using emulation.
cc: @matthewbauer