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: 
Visitor theodort
Visitor
9,702 Views
Registered: ‎03-03-2016

SDAccel compilation errors

Jump to solution

I am trying to compile one of the example projects that ship with SDAccel: SDAccel/2015.4/examples/getting_started/alpha_data

If I try running sdaccel baseline.tcl I get the following report:

/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crt1.o: No such file or directory
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crti.o: No such file or directory
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lpthread
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lrt
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lm
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lc
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status


I tried the following but with no success:
I added "set_property -name host_cflags -value "-L/usr/lib/x86_64-linux-gnu/" -objects [current_solution]" to baseline.tcl to fix the "cannot find {-lpthread,-lrt,-lm, -lc}"
and I created the following symlinks:
ln -s /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib ln -s /usr/lib/x86_64-linux-gnu/crtn.o /usr/lib ln -s /usr/lib/x86_64-linux-gnu/crti.o /usr/lib to resolve the rest of the errors.

However now I'm getting a report with the following content:
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: BFD (GNU Binutils) 2.22 internal error, aborting at ../../../src/lnx64/bfd/reloc.c line 1509 in _bfd_relocate_contents

/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: Please report this bug.

collect2: ld returned 1 exit status

and I suspect that I'm using the wrong libraries.


Target device: xilinx:adm-pcie-7v3:1ddr:2.1
OS: Debian Sid x86_64

 

Any suggestions?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
17,588 Views
Registered: ‎11-28-2007

Re: SDAccel compilation errors

Jump to solution

For crt1.o, please install glibc-devel package. On RHEL or CentOS. You will need to find the correspoinding RPM name for your Linux distribution. By the way, the officially supported linux versions are RHEL and CentOS 6.4-6.7.

 

sudo yum install glibc-devel

 

 

 


@theodort wrote:

I am trying to compile one of the example projects that ship with SDAccel: SDAccel/2015.4/examples/getting_started/alpha_data

If I try running sdaccel baseline.tcl I get the following report:

/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crt1.o: No such file or directory
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crti.o: No such file or directory
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lpthread
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lrt
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lm
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lc
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status


I tried the following but with no success:
I added "set_property -name host_cflags -value "-L/usr/lib/x86_64-linux-gnu/" -objects [current_solution]" to baseline.tcl to fix the "cannot find {-lpthread,-lrt,-lm, -lc}"
and I created the following symlinks:
ln -s /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib ln -s /usr/lib/x86_64-linux-gnu/crtn.o /usr/lib ln -s /usr/lib/x86_64-linux-gnu/crti.o /usr/lib to resolve the rest of the errors.

However now I'm getting a report with the following content:
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: BFD (GNU Binutils) 2.22 internal error, aborting at ../../../src/lnx64/bfd/reloc.c line 1509 in _bfd_relocate_contents

/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: Please report this bug.

collect2: ld returned 1 exit status

and I suspect that I'm using the wrong libraries.


Target device: xilinx:adm-pcie-7v3:1ddr:2.1
OS: Debian Sid x86_64

 

Any suggestions?


 

Cheers,
Jim
0 Kudos
6 Replies
Xilinx Employee
Xilinx Employee
17,589 Views
Registered: ‎11-28-2007

Re: SDAccel compilation errors

Jump to solution

For crt1.o, please install glibc-devel package. On RHEL or CentOS. You will need to find the correspoinding RPM name for your Linux distribution. By the way, the officially supported linux versions are RHEL and CentOS 6.4-6.7.

 

sudo yum install glibc-devel

 

 

 


@theodort wrote:

I am trying to compile one of the example projects that ship with SDAccel: SDAccel/2015.4/examples/getting_started/alpha_data

If I try running sdaccel baseline.tcl I get the following report:

/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crt1.o: No such file or directory
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crti.o: No such file or directory
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lpthread
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lrt
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lm
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find -lc
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status


I tried the following but with no success:
I added "set_property -name host_cflags -value "-L/usr/lib/x86_64-linux-gnu/" -objects [current_solution]" to baseline.tcl to fix the "cannot find {-lpthread,-lrt,-lm, -lc}"
and I created the following symlinks:
ln -s /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib ln -s /usr/lib/x86_64-linux-gnu/crtn.o /usr/lib ln -s /usr/lib/x86_64-linux-gnu/crti.o /usr/lib to resolve the rest of the errors.

However now I'm getting a report with the following content:
/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: BFD (GNU Binutils) 2.22 internal error, aborting at ../../../src/lnx64/bfd/reloc.c line 1509 in _bfd_relocate_contents

/opt/Xilinx/SDAccel/2015.4/bin/../gnu/binutils/bin/ld: Please report this bug.

collect2: ld returned 1 exit status

and I suspect that I'm using the wrong libraries.


Target device: xilinx:adm-pcie-7v3:1ddr:2.1
OS: Debian Sid x86_64

 

Any suggestions?


 

Cheers,
Jim
0 Kudos
Visitor gmholland
Visitor
9,368 Views
Registered: ‎10-18-2013

Re: SDAccel compilation errors

Jump to solution

I would try symlinking /usr/lib64/ to /usr/lib/x86_64-linux-gnu/

 

sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64
Adventurer
Adventurer
5,760 Views
Registered: ‎03-03-2011

Re: SDAccel compilation errors

Jump to solution

I'm having this same issue.

I also happens if I source the settings64.sh file and try to compile a single file in the console.

 

The environment that the script sets up ends up using the gcc bundled with SDAccel but uses /usr/bin/ld for linking, instead of the ld found in the SDAccel binutils directory.

 

If you run strace on both linkers, you can see them looking for the lib files in different paths.

 

I haven't found a way to fix this satisfactorily.

 

bandit

0 Kudos
Participant nachiket
Participant
4,535 Views
Registered: ‎10-07-2009

Re: SDAccel compilation errors

Jump to solution

Has anyone manged to figure out how to resolve this? I recently upgraded to 2016.2 and I'm seeing these same crt* related errors that were not there for 2016.1...

0 Kudos
Participant nachiket
Participant
4,497 Views
Registered: ‎10-07-2009

Re: SDAccel compilation errors

Jump to solution

Resolved by adapting solution: https://forums.xilinx.com/t5/SDAccel/SDx-2016-3-Compilation-errors/td-p/739838

 

Instead of copying crt*.o to the Vivado_HLS folder, had to put it under /usr/lib64 instead...

0 Kudos
Adventurer
Adventurer
1,466 Views
Registered: ‎12-21-2012

Re: SDAccel compilation errors

Jump to solution

This solved my problem in vivado hls 2018.2 nicely. Thanks.

0 Kudos