cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
joseer
Voyager
Voyager
1,678 Views
Registered: ‎07-06-2016

sdk applications and sysroot linker path issue

Jump to solution

Hello,

I posted recently about this and I though I already had it solved, but now creating a new project I'm having again same errors again, due to this inconsinstency I need to get to the bottom of this and a solution because I'm not sure wether I'm missing a step or there's a bug....

Well I did a simple test without using any third party libraries, only a simple petalinux image and a helloworld sdk application adding the --sysroot path, and these are my steps:

In petalinux

source  ../Vivado/settings64.sh
petalinux-build --sdk petalinux-package --sysroot

source .../images/linux/sdk/environment-setup-aarch64-xilinx-linux

In sdk, I created a new application project with the helloworld template with the next settings:

OS linux  
Processor type: psu_cortexa53 
Linux System Root: ..../images/linux/sdk/sysroots/aarch64-xilinx-linux 

Added in project properties> linker> Miscellaneous> linker flags: --sysroot = ".../images/linux/sdk/sysroots/aarch64-xilinx-linux"

When I build the application I've got the errors:

make all 
Building target: test.elf
Invoking: ARM v8 Linux gcc linker
aarch64-linux-gnu-gcc -L"/home/josee/hdl/dev/Petalinux_test/Petalinux/uz7ev_evcc_2018_2/images/linux/sdk/sysroots/aarch64-xilinx-linux" --sysroot = "/home/josee/hdl/dev/Petalinux_test/Petalinux/uz7ev_evcc_2018_2/images/linux/sdk/sysroots/aarch64-xilinx-linux" -o "test.elf"  ./src/test.o   
/home/josee/opt/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/7.2.1/../../../../aarch64-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory
/home/josee/opt/Xilinx/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/bin/../lib/gcc/aarch64-linux-gnu/7.2.1/../../../../aarch64-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/home/josee/hdl/dev/Petalinux_test/Petalinux/uz7ev_evcc_2018_2/images/linux/sdk/sysroots/aarch64-xilinx-linux: file not recognised: Is a directory
collect2: error: ld returned 1 exit status
make: *** [test.elf] Error 1
makefile:36: recipe for target 'test.elf' failed

 

If I remove the linker flag --sysroot = "..." everything works but for the finally project I need to link the sysroot libraries....

Does anyone have an idea why I'm getting these errors?

Thanks.

 

 

0 Kudos
1 Solution

Accepted Solutions
joseer
Voyager
Voyager
1,606 Views
Registered: ‎07-06-2016

I've finally got it working, I created a new application project leaving the "Linux System Root" unchecked  and after I added only the sysroot path in Miscellaneous-> Linker Flags (--sysroot = "<petalinux_project_path>/images/linux/sdk/sysroot/aarch64-xilinx-linux") like this I could build my application.

View solution in original post

0 Kudos
1 Reply
joseer
Voyager
Voyager
1,607 Views
Registered: ‎07-06-2016

I've finally got it working, I created a new application project leaving the "Linux System Root" unchecked  and after I added only the sysroot path in Miscellaneous-> Linker Flags (--sysroot = "<petalinux_project_path>/images/linux/sdk/sysroot/aarch64-xilinx-linux") like this I could build my application.

View solution in original post

0 Kudos