Linking kernel - i386 architecture of input file is incompatible with i386:x86_64 output
It looks as though you're compiling this code on a 64-bit system. As such, kernel.o
is a 64-bit binary, and cannot be linked with the 32-bit kernel_entry.o
.
Since you don't have any code in place to get the system into long mode, you probably want to compile the "kernel" as 32-bit code. Use -m32
to trigger this:
gcc -m32 -ffreestanding -c kernel.c -o kernel.o
^^^^
GCC: i386 architecture of input file `../window.ui.o' is incompatible with i386:x86-64 output
"solved" by using gnu-ld instead:
ld -r -b binary ../src/window.ui -o ../window.ui.o
Couldn't figure out why objcopy
didn't work though.
linking problem: i386:x86-64 architecture of input file *.o is incompatible with i386 output
Try this:
LDEMULATION="elf_x86_64"
ld -nostdlib -nodefaultlibs -T link.ld -o out.elf start.o main.o
CMake; 386:x86-64 architecture of input file (.. ) is incompatible with i386 output
I think, you copied the object files mp4reader.o, codec_instance_mgmt.o and callbacks.o
from somewhere (not compiled on your system), which is causing incompatibility on your system.
You can try to remove all objects and compile it again:
rm *.o
and then compile again.
Related Topics
Crontab Is Not Working on Amazon Ec2 Server
Cuda Compiler Not Working with Gcc 4.5 +
Bash Echo with an $ Character Outside the String
Netfilter-Like Kernel Module to Get Source and Destination Address
Mercurial Hg No Changes Found - Can't Hg Push Out
Linux, Where Are the Return Codes Stored of System Daemons and Other Processes
Stty Serial Port Settings for Parity Not Persistent
Extending a Script to Loop Over Multiple Files and Generate Output Names
Ffmpeg Fix Watermark Size or Percentage
Backing Up (And Restoring) a Plone Instance
Unable to Pass Wget a Variable with Quotes Inside the Variable
Eclipse Cdt Indexer Lost After System Update
Need an Overview of Debugging Process from the Hardware Layer
How to Find a List of Ip Addresses in Another File
Automatic Login on Angstrom Linux
Embedding the Password in the Bash Script
How to Execute an Local Script in Remote Server with Parameters