UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

[SDK] ld.exe: cannot find -lxil

Visitor
Posts: 12
Registered: ‎05-07-2013

[SDK] ld.exe: cannot find -lxil

Hello everyone,

 

I am trying to build a simple bare metal application for a Zynq device. When I try to build the project in the SDK, the console output says:

 

arm-xilinx-eabi-gcc -Wl,-T -Wl,../src/lscript.ld -L../../zynq_fsbl_0_bsp/ps7_cortexa9_0/lib -o "zynq_fsbl_0.elf" ./src/ddr_init.o ./src/ff.o ./src/fsbl_handoff.o ./src/fsbl_hooks.o ./src/image_mover.o ./src/main.o ./src/mmc.o ./src/nand.o ./src/nor.o ./src/pcap.o ./src/ps7_init.o ./src/qspi.o ./src/rsa.o ./src/sd.o -Wl,--start-group,-lxil,-lgcc,-lc,--end-group
c:/xilinx/sdk/2013.1/gnu/arm/nt/bin/../lib/gcc/arm-xilinx-eabi/4.7.2/../../../../arm-xilinx-eabi/bin/ld.exe: cannot find -lxil
c:/xilinx/sdk/2013.1/gnu/arm/nt/bin/../lib/gcc/arm-xilinx-eabi/4.7.2/../../../../arm-xilinx-eabi/bin/ld.exe: cannot find -lc
collect2.exe: error: ld returned 1 exit status

 I have googled a lot, but have not found a solution for my problem which other users also seem to have. My machine is a x86-64 Windows 8. I hope someone can help resolving the problem.

 

Sven

Visitor
Posts: 12
Registered: ‎05-07-2013

Re: [SDK] ld.exe: cannot find -lxil

I almost forgot to mention that I use the newest version of ISE (WebPack) 14.5.

Contributor
Posts: 36
Registered: ‎03-05-2013

Re: [SDK] ld.exe: cannot find -lxil

Hello svenschwermer,

actually, I have a similar error once ( cannot find -lxil ). I wasn't able to solve it. It was a simple project, so I just remade it and it worked. If you have time, until you don't find a solution, you should consider remaking it =D

Regards,
Katsuke
Scholar
Posts: 869
Registered: ‎05-06-2012

Re: [SDK] ld.exe: cannot find -lxil

Have you selected the xilkernel when creating the BSP?

also, can you #include xmk.h in your application?

Visitor
Posts: 4
Registered: ‎05-25-2012

Re: [SDK] ld.exe: cannot find -lxil

libxil.a (referenced as -lxil) is the BSP build target. If the BSP build fails, the library isn't built, and the application build will fail. Simple enough...

 

Why might the BSP build fail? My intsallation (Xubuntu 12.10) was missing a soft link for arm-xilinx-eabi-ar. That seemed easy enough to fix:

 

  /usr/bin$ sudo ln -s arm-linux-gnueabi-ar arm-xilinx-eabi-ar

 

Similarly for other arm-linux-gnueabi-* that might be used...

 

It would help me if someone could point out where the matching headers are installed. My builds now fail with missing headers. For example, errno.c fails to find reent.h.

 

Thanks.

=============

 

Compiling common
arm-xilinx-eabi-ar: creating ../../../lib/libxil.a
Compiling xadc
Compiling standalone
errno.c:47:19: fatal error: reent.h: No such file or directory
compilation terminated.
_sbrk.c: In function ‘_sbrk’:
_sbrk.c:55:32: error: ‘NULL’ undeclared (first use in this function)
_sbrk.c:55:32: note: each undeclared identifier is reported only once for each function it appears in
gmake[1]: *** [standalone_libs] Error 1
gmake[1]: Target `libs' not remade because of errors.