Could not find any NvInferVersion.h, How do i change where it is looking for it? - tensorflow

When building tensorflow, i receive the following error.
Could not find any NvInferVersion.h matching version '' in any subdirectory:
''
'include'
'include/cuda'
'include/*-linux-gnu'
'extras/CUPTI/include'
'include/cuda/CUPTI'
'local/cuda/extras/CUPTI/include'
of:
'/usr/include'
'/usr/lib/x86_64-linux-gnu'
'/usr/local/cuda-10.1'
However my NvInferVersion.h is located at /usr/include/x86_64-linux-gnu/
How do i tell ./configure to check at that location? Where can i add this to the list of directories which it uses?

./configure should prompt you for the following:
Please specify the comma-separated list of base paths to look for CUDA libraries and headers. [Leave empty to use the default]:
/usr/local/cuda-10.1, /lib, /lib/x86_64-linux-gnu/libfakeroot, /usr/local/cuda-10.1/targets/x86_64-linux/lib, /usr/include/x86_64-linux-gnu/
You may also want to make sure that libnvinfer is properly installed as described here:
https://www.tensorflow.org/install/gpu

Related

What is _/_ in a conan package?

Is openssl/1.1.1d#_/_ the same as openssl/1.1.1d? I'm confused by those different suffixes like _/_, conan/stable, bincrafters/stable, are they eventually replaced by openssl/1.1.1d?
Yes. Since Conan 1.18, the namespace (user/channel) has become optional. Thus, the correct reference for the official OpenSSL package now is openssl/<version> e.g.
conan install -r conan-center openssl/1.1.1d#
The # is required to identify that you are using using name/version format. It's a compatibility feature.
However, the package folder path uses same format yet, e.g.
/home/user/.conan/data/OpenSSL/1.0.2o/conan/stable/package/6af9cc7cb931c5ad94
Now, without the namespace, both user and channel has been replaced by the placeholder _/_:
/home/user/.conan/data/openssl/1.0.2o/_/_/package/6af9cc7cb931c5ad94
Note that you don't need to touch this, you only need to invoke the reference by putting a # as terminator.

How to change the name of virtual environment in conan?

I am making a package for cmake/3.10.2 and I want that whenever I do conan install . it should display devenv instead of conanenv. I don't want to manually change activate.sh file. Is there any way to do it from conan recipe. I am using virtualenv as generator.
Unfortunately not, the name is hard-coded, you can check it on the code.
However, you could open an issue requesting for such feature.
Regards!

CMake search path configuration

we working on a C++/CMake project, that needs to run in both Windows and Linux. On Windows, we have to work with a number Visual Studio versions, both in 32- and 64 bit. In order to alleviate dependency issues in our team, we have manually compiled a number of dependencies for each configuration(vs2013_x64, vs2013_x86, vs2012_x64, vs2013_x86...) and installed them (using make install or similar commands) to a common folder for each configuration. Now we have a folder called "vs2013_x64" for example, that contains similar folders as /usr would on linux: CMake, include, lib, share, ...
Now my question is: How do I have to set up CMake, so that it treats this vs2013_x64 folder just like it does /usr on Linux?
I found a number of variables that seem related, for example
CMAKE_FIND_ROOT_PATH and CMAKE_SYSROOT. However, setting them to my vs2013_x64 folder for example does not work: FindXXX.cmake files in the vs2013_x64/CMake folder are not found, and even when I manually set the CMAKE_MODULE_PATH to that CMake folder, the Find* scripts are unable to find the include they are looking for, because the vs2013_x64/include folder does not appear to be searched.
A solution that did work was to set the CMAKE_PREFIX_PATH. This is nice and almost what I need, but lets say that on Linux, I would not want it to look at /usr at all under any circumstances. This would not be possible using the PREFIX_PATH solution if I understand it correctly.
From what I understood from the documentation,
CMAKE_FIND_ROOT_PATH is more configurable and has a number of additional variables such as CMAKE_FIND_ROOT_PATH_MODE_PROGRAM, CMAKE_FIND_ROOT_PATH_MODE_LIBRARY and CMAKE_FIND_ROOT_PATH_MODE_INCLUDE. This makes me believe that FIND_ROOT_PATH is what I actually SHOULD be doing - yet I am unable to make it work
Does what I am trying to do make sense? Can anyone clarify when and how to use what? Ideally, I would like a solution that allows me to set the search path to my vs2013_x64 folder on Windows, that defaults to /usr on Linux, but can optionally also be set to another directory containing lib/include/cmake folders. In addition, it would be nice if searching ONLY occurred in the configured path and nowhere else (to avoid mistakenly picking a library that was installed system-wide).
Thanks!

How to install a FindXXX.cmake to a correct location?

I am developing a library which uses CMake to control it. It would be good to provide a "FindXXX.cmake" which locates the library and header files. This file would enable the users to use the command "find_package(XXX)" to find my library.
However, I don't know how to install my lib's "FindXXX.cmake" to an correct location. I failed to find a CMake's build-in mechanism to install a "FindXXX.cmake". In addition, CMake's variable "CMAKE_MODULE_PATH" is a list of directories, so I cannot install according to that vairable because I cannot decide which specific directory to use.
If the copy of CMake is installed to a standard location(i.e. use no prefix etc) then this can be done by placing the file in /usr/share/cmake/Modules/ directory.
If you are going to supply a bundle probably you can add some commands to check if the cmake is available. if yes you can check for cmake --system-information|grep _INCLUDED_SYSTEM_INFO_FILE value from that to get modules directory.
Otherwise there's no way you can do that.
A workaround can be done i.e. if there is a binary in your bundle then you can add a command line option for placing this file.

Where does autoconf's AC_CHECK_HEADERS verify the header files?

I am having trouble with compiling one of the open source libraries (libopekele OpenID lib).
The problem is I don't have sudo access on the system where I need to compile this.
Ran the configure. It complained of missing htmltidy lib.
Installed the htmltidy at a non-standard path /home/geekgod (as I dont have access to the /usr and /usr/local).
Now the problem is how do I make the configure script of libopekele to pick the the headers from /home/geekgod/include.
Poking into the configure.ac script of libopkele, it is using AC_CHECK_HEADERS to search for tidy.h or tidy/tidy.h.
I am pretty sure it is looking for these at standard location (/usr/include).
How do I add /home/geekgod to the standard include dir?
try this:
./configure CPPFLAGS=-I/home/geekgod/include --prefix=... --etc