I’m trying to run gtk4 in my system to work around in GUI.
But trying to invoke gtk4 binary in yocto, it gives error as mentioned below.
./gtk-example
Illegal instruction (core dumped)
Looks like you’re trying to run on your computer a program that was compiled for another architecture, am I right?
- Run
uname -m
to get the architecture of your PC, I expectx86_64
. - Run
file ./gtk-example
to know the target architecture of your program, will probably be something likearm
oraarch64
ormips
. But you must seex86_64
too (or maybei386
) to be able to run it on your computer.
You’ll need an emulator like QEMU to test programs of other architectures on your PC. Or alternatively, recompile it manually with an appropriate -march
param.
file ./gtk-example
./gtk-example: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=e300da957f465688ef7a58771d9379ec7c99174f, for GNU/Linux 3.2.0, stripped
yes, you are right its a arm architecture compiled file
but I’m having uname -m
x86_64
Yes, exactly, that’s the issue. Both commands must give matching targets, in your case either both “ARM” or both “x86_64”.
You can’t run a ARM binary on a x86_64 system, unless you use an emulator.
could you please suggest that how to build gtk4 from my yocto for arm machine?
any suggestion
I recommend you ask on a Yocto or an OpenBMC support forum.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.