RunOnFlux / fluxd

Flux Daemon
https://runonflux.io
MIT License
77 stars 40 forks source link

Flux for i386 is amd64 code #224

Open PSLLSP opened 10 months ago

PSLLSP commented 10 months ago

File: flux_i386_v6.2.0.deb Debian 12 running at Intel Atom N280 (i686 only, no support for amd64)

debian@atom:~$ uname -a
Linux atom 6.1.0-11-686-pae #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) i686 GNU/Linux
debian@atom:~$ sudo dpkg -i flux_i386_v6.2.0.deb 
Selecting previously unselected package flux.
(Reading database ... 59540 files and directories currently installed.)
Preparing to unpack flux_i386_v6.2.0.deb ...
Unpacking flux (6.2.0) ...
Setting up flux (6.2.0) ...
debian@atom:~$ dpkg -la | grep flux
ii  flux                                6.2.0                          i386         Flux is a cryptocurrency that empowers Flux - Your gateway to a decetralized world.
debian@atom:~$ fluxd --version
bash: /usr/local/bin/fluxd: cannot execute binary file: Exec format error
debian@atom:~$ which fluxd
/usr/local/bin/fluxd

Binaries were build for amd64 architecture (the issue):

debian@atom:~$ file /usr/local/bin/flux*
/usr/local/bin/flux-cli:             ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=3d83c27c72f13b6d3779d51cb2b0c794530b768c, stripped
/usr/local/bin/fluxd:                ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=24bd0d395fe7fa05ea7177b12c6edfd32ed25463, stripped
/usr/local/bin/flux-fetch-params.sh: Bourne-Again shell script, ASCII text executable
/usr/local/bin/flux-tx:              ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=9c5762a84110346fb8f97b7222d3c7ff278c58f4, stripped

Just for reference, architecture i386 is expected:

debian@atom$ file /bin/bash
/bin/bash: ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=2d1c62b4bd89f14c30f1ea1281fbbb05bd785fb0, for GNU/Linux 3.2.0, stripped
TheTrunk commented 7 months ago

This is correct, i386 is identical binary as amd64 in our case. We did not have any previous complains about this and most were running fine with it. Agreed that we should adjust travis and create better pipeline for it.

PSLLSP commented 7 months ago

I assume it is possible to run this "i386" code on 64-bit system but it is impossible to run it on 32-bit OS. I test it on 32-bit system and I see the issue.

$ uname -a
Linux thin 6.1.0-13-686-pae #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) i686 GNU/Linux