Includes paths, host vs target problem [message #1839973] |
Fri, 02 April 2021 12:41  |
Henry Robinson Messages: 2 Registered: April 2021 |
Junior Member |
|
|
Running NSight Eclipse on ubuntu on a host PC, for building apps to run on a Jetson Nano (aarch64). Tested building sample apps, successfully...
I created a new, fairly minimal project which builds correctly and runs on the Nano. What I did was to create new project, CUDA/C++, selected project type = CUDA runtime project.
Once it was able to build and to run correctly on the remote target, I expanded it by adding a new cpp/hpp which invoked opencv functions, so I had to #include opencv2/opencv.hpp
When I try to build, it complains:
/usr/include/opencv2/opencv.hpp... fatal error... no such file or directory
I checked: under Includes, there is "/usr/include"
And I had a look, /usr/include/opnecv2/opencv.hpp most definitely exists on my local platform.
So then I checked the target platform - /usr/include/opencv2 is not there... so I created it and copied the file over.
Now, the compiler finds the file!
So it seems that although I intend it to search on the LOCAL machine, it is actually going away to search for the include files on the remote target machine instead!
Can anyone explain how this could come about, and more importantly how to fix it?! The intention is to use this system for cross compiling, by using all necessary source files on the local host machine.
|
|
|
|
Re: Includes paths, host vs target problem [message #1839986 is a reply to message #1839983] |
Fri, 02 April 2021 21:51   |
Henry Robinson Messages: 2 Registered: April 2021 |
Junior Member |
|
|
Yes, it crosses many boundaries - Eclipse, NSight, CUDA.
I've tried re-installing the CUDA plugin... some success, I now have a CUDA entry under the Window... Preferences. But now it won't compile the project. One step forward, two steps back.
Where I think it sits within the Eclipse camp is the configuration for cross compiling, and how the system is set up.
The documentation says that it is possible to set it up to compile on the host, then run on the target. But nowhere does it say HOW to configure it for that, apart from one tiny paragraph which explains just one aspect of the setup. It took some detective work to discover what it was doing (see my earlier post).
Is there an easier way to check the configuration, step by step? For example -
"It seems that your set-up is made to run the compilation on the target machine, so it expects the sources also there."
So why would it show very clearly a bunch of include paths on my host for lib headers, but then at build time it chucks that all away and looks for similar paths but on the target machine? By any standards, that's pretty bizarre.
What are the settings that govern these two, how do I ensure they line up?
|
|
|
Re: Includes paths, host vs target problem [message #1839997 is a reply to message #1839986] |
Sat, 03 April 2021 13:12  |
Tauno Voipio Messages: 739 Registered: August 2014 |
Senior Member |
|
|
NSight and CUDA are both from NVidia - the changes to plain Eclipse CDT stand steadily on their court.
You can do detective work by digging into the project properties pages.
With plain Eclipse CDT, the cross-compiling has worked pretty well targeting to several flavors of ARM architecture, after some set-up hiccups.
There is a plug-in for embedded Cortex cross-compilation set-up, but IIRC, it does not cover aarch64.
The set-up is done on the project properties pages.
--
Tauno Voipio
|
|
|
Powered by
FUDForum. Page generated in 0.02343 seconds