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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
1,386 Views
Registered: ‎09-01-2017

xilrsa library not found after clean

Jump to solution

I was having an issue with SDK 2017.2 where anytime my fsbl bsp was cleaned and rebuilt the fsbl build would fail because the linker couldn't find the RSA library.

 

'Building target: fsbl.elf'
'Invoking: ARM v7 gcc linker'
arm-none-eabi-gcc -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -Wl,-build-id=none -specs=Xilinx.spec -Wl,-T -Wl,../src/lscript.ld -L"<path>\fsbl_bsp_0\ps7_cortexa9_0\lib" -o "fsbl.elf"  ./src/fsbl_handoff.o ./src/fsbl_hooks.o ./src/image_mover.o ./src/main.o ./src/md5.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 -Wl,--start-group,-lxilffs,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lxilskey,-lxil,-lgcc,-lc,--end-group -Wl,--start-group,-lrsa,-lxil,-lgcc,-lc,--end-group
c:/xilinx/sdk/2017.2/gnu/aarch32/nt/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/6.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lrsa
collect2.exe: error: ld returned 1 exit status
make: *** [fsbl.elf] Error 1

 

This would occur only after I had cleaned the project, which I noticed would also fail with the below error.

 

 

rm: cannot remove directory `./': Permission denied
make[1]: *** [clean] Error 1
make: *** [ps7_cortexa9_0/libsrc/xilrsa_v1_3/src/make.clean] Error 2
make -C ps7_cortexa9_0/libsrc/xilskey_v6_2/src -s clean 
make: Target `clean' not remade because of errors.

 

I noticed this only after upgrading to using xilrsa_v1_3.  It appears the Makefile included with xilrsa_v1_3 has a bug in it; line 57 needs to be removed as the librsa.a library is not built from sources, it is provided pre-built.  This line turns into "rm -rf ./" which kills the entire src directory and subsequent builds fail until you regenerate the bsp sources to copy the pre-built library back.

 

Not sure what the process is to submit a bug report to xilinx other than this forum but it would be nice to fix this in a future version.  My workaround for now is modifying the Makefile in the C:\Xilinx\SDK\2017.2\data\embeddedsw\lib\sw_services\xilrsa_v1_3\src directory so any new bsp that is made does not have this issue.

 

workaround:

@@ -37,22 +37,19 @@   
 LIB=librsa.a   
    
 RELEASEDIR=../../../lib   
 INCLUDEDIR=../../../include   
 INCLUDES=-I./include/ -I${INCLUDEDIR}    
 LIBRSA_DIR = .   
-OUTS = *.o   
-OBJECTS =       $(addsuffix .o, $(basename $(wildcard *.c)))   
 EXPORT_INCLUDE_DIR = $(LIBRSA_DIR)/include   
                            
 libs:   
         cp $(LIBRSA_DIR)/librsa.a $(RELEASEDIR)   
            
 .PHONY: include   
 include: xilrsa_includes   
    
 xilrsa_includes:    
         cp -r ${EXPORT_INCLUDE_DIR}/xilrsa.h ${INCLUDEDIR}   
    
 clean:   
-        rm -rf $(LIBRSA_DIR)/$(OBJECTS)   
         rm -rf $(RELEASEDIR)/$(LIB)   
0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
1,906 Views
Registered: ‎11-09-2015

Re: xilrsa library not found after clean

Jump to solution

Hi @bhig,

 

Thank you for sharing. I have already encountered this issue. It happens only on windows. I have created an AR but it is still not public yet.

 

It will be fixed in 2017.3.

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

0 Kudos
3 Replies
Moderator
Moderator
1,907 Views
Registered: ‎11-09-2015

Re: xilrsa library not found after clean

Jump to solution

Hi @bhig,

 

Thank you for sharing. I have already encountered this issue. It happens only on windows. I have created an AR but it is still not public yet.

 

It will be fixed in 2017.3.

 

Regards,

 

Florent


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

0 Kudos
Xilinx Employee
Xilinx Employee
1,337 Views
Registered: ‎01-03-2017

Re: xilrsa library not found after clean

Jump to solution

This issue reported by me internally and fixed in 2017.3,

0 Kudos
Visitor srinixilinx
Visitor
429 Views
Registered: ‎07-13-2015

Re: xilrsa library not found after clean

Jump to solution

Looks like this problem exists atleast on 2017.1 and 2017.2. Is there a workaround without having to move up to 2017.3?

0 Kudos