Hi, I am trying to cross compile an application for Tiny6410. I used the cross compiler (arm-linux-none-4.5.1) which is present in the CD. However, as my application uses X11, the compilation is giving an error. The error is as below. Can somebody please suggest how to overcome this error? =============================ERROR MESSAGE============================ arm-linux-gcc-4.5.1 -o o.emu asm-arm.o os.o segflush-arm.o emu.root.o lock.o cmd.o devmnt.o ipif-posix.o win-x11a.o devdraw.o devfs.o devdup.o devsnarf.o devcmd.o devprog.o devindir.o devmem.o deveia.o devpointer.o devcap.o devssl.o devenv.o devroot.o srv.o devcons.o devip.o ipaux.o devsrv.o devprof.o devpipe.o uqid.o latin1.o dev.o proc.o exportfs.o qio.o parse.o main.o error.o dial.o discall.o cache.o alloc.o inferno.o env.o dis.o devtab.o pgrp.o errstr.o chan.o print.o exception.o sysfile.o random.o emu.o /home/inferno/Linux/arm/lib/libinterp.a /home/inferno/Linux/arm/lib/libtk.a /home/inferno/Linux/arm/lib/libfreetype.a /home/inferno/Linux/arm/lib/libmath.a /home/inferno/Linux/arm/lib/libdraw.a /home/inferno/Linux/arm/lib/libmemlayer.a /home/inferno/Linux/arm/lib/libmemdraw.a /home/inferno/Linux/arm/lib/libkeyring.a /home/inferno/Linux/arm/lib/libsec.a /home/inferno/Linux/arm/lib/libmp.a /home/inferno/Linux/arm/lib/lib9.a -lX11 -lXext -lm /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../ ../arm-none-linux-gnueabi/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status mk: arm-linux-gcc-4.5.1 -c -DROOT="/home/inferno" ... : exit status=exit(1) mk: echo "(cd $SYSTARG; ... : exit status=exit(1) mk: for j in ... : exit status=exit(1) =========================================================================== Thanks, -Shubhangi
Cross compile error X11
Additional info - There is no file/folder present in the folder "/opt/FriendlyARM/toolschain/4.5.1" and its sub-folder. -Shubhangi
Oops...correction Additional info - There is no file/folder present with name "libX11" in the folder "/opt/FriendlyARM/toolschain/4.5.1" and its sub-folder. -Shubhangi
To cross compile an X application you need all related X libraries and header files also in a cross compiled form. So, start to cross compile the X system and *then* cross compile your X application against these libs and headers. Or, use one of the available rootfs build systems to do it for you.
@Juergen I am using Ubuntu 10.04 on my laptop. I have the X library installed on my laptop. Do you mean 1. I have to first cross compile all the X library files to ARM 2. then put them in the cross compiler folder to be used to cross compile my application? I have never done this before. Could you please advise how do I do it? Thanks in advance. -Shubhangi
Installing everything on your host does not help. It is for your host (x86 based I guess), but not for your target. answer to 1. Yes answer to 2. Mostly not. Just add the correct header and library include paths when you compile your application. > Could you please advise how do I do it? Use any kind of rootfs build system instead. Doing it manually would be the hard way.