cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
668 Views
Registered: ‎11-21-2019

Import Dlib library cpp

Hello,

I'm trying to use the cpp dlib library in vivado HLS 2019.1.

I've put all the files of the library in the project folder, and added it to the include path.

But the build fails because of name collisions (such as dlib/string.h and string.h from the standard library).

Any solutions to this problem ?

Thank you !

0 Kudos
7 Replies
Highlighted
Moderator
Moderator
582 Views
Registered: ‎11-21-2018

Hi @hellotunisia 

Can you post you log file and include the exact error you are getting? 

What OS are you using? 

Regards, 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Highlighted
Visitor
Visitor
552 Views
Registered: ‎11-21-2019

Hello @aoifem,

Thanks for your answer.

I'm using Ubuntu 18.04.3.

The log file :
https://drive.google.com/file/d/1jMIhRclUscER8TlQXgH6wHT21ycONLHe/view?usp=sharing

Thanks
0 Kudos
Highlighted
Moderator
Moderator
538 Views
Registered: ‎11-21-2018

Hi @hellotunisia 

 

I would like to first rule out any issues in the steps you followed to add the library, so please follow the guidence in the post below for including external libraries. 

https://forums.xilinx.com/t5/High-Level-Synthesis-HLS/How-to-include-external-libraries-in-Vivado-HLS/m-p/316705

 

Please let me know if that doesn't help and we can start looking into other possible causes of the problem. 

 

Regards, 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Highlighted
Visitor
Visitor
530 Views
Registered: ‎11-21-2019

Hi @aoifem,

Yes the headers exist in the local directory, so they are automatically found and included.
0 Kudos
Highlighted
Moderator
Moderator
475 Views
Registered: ‎11-21-2018

Hi @hellotunisia 

 

Can you include all the steps you followed to add the libraries? 

 

When looking at your log file, it seems that you have compliation errors. Can you double check there are no errors in your code? 

ERROR: [HLS 200-70] Compilation errors found: In file included from master-pynq/get.cpp:1:
In file included from master-pynq/get.cpp:1:
In file included from master-pynq/dlib/image_processing/frontal_face_detector.h:7:
In file included from master-pynq/dlib/image_processing/../image_processing/object_detector.h:7:
In file included from master-pynq/dlib/image_processing/../geometry.h:6:
In file included from master-pynq/dlib/image_processing/../geometry/rectangle.h:11:
master-pynq/dlib/image_processing/../geometry/vector.h:1284:28: warning: C++11 requires lambda with omitted result type to consist of a single return statement [-Wlambda-extensions]
auto orientation = [&](size_t i)

 

 

But the build fails because of name collisions (such as dlib/string.h and string.h from the standard library).

I also did not see any name collision errors in the log file? Why do you think name collisions are the issue? 

 

Regards, 

Aoife
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Highlighted
Visitor
Visitor
464 Views
Registered: ‎11-21-2019

Hello,

 

Yes i was mistaken, i thought the compilation errors were due to name collision but that's the case.

The compilation errors occur in the dlib library files and in some of other predefined libraries files so it's not my code.

I think this is due to some incompatibilites with the compiler and i couldn't find a solution to solve this issue.

 

Redargs

0 Kudos
Highlighted
Moderator
Moderator
440 Views
Registered: ‎11-21-2018

Hi @hellotunisia 

The compilation errors occur in the dlib library files and in some of other predefined libraries files so it's not my code.

Can I just clarify that the predefined library files you are referring to are 3rd party libraries?

Because we can't guarantee compatibility with every 3rd party library, Xilinx has release it's own libraries for HLS. The libraries that are provided with HLS are listed in UG902:

HLS_Lib.PNG

There are also some machine learning libraries available on our Github, such as the CHaiDNN library, which you might be able to use instead of the Dlib library. If you are sure it is a compiler compatibility issue with the library, and not a compilation issue, my advice would be to use a library released by Xilinx as it has been tested with the tools. 

If you need to use the specific 3rd party libraries you are currently using, Xilinx will not be able to support you debug this, but you may still be able to get help from the community. 

I hope that helps. 

Regards, 

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