-
install Git
-
install CMake (3.x)
-
install Python (3.x) including
pip3
-
pip3 install conan
(from console with administrator rights) -
conan search
-
conan remote add covi https://api.bintray.com/conan/covi/ConnectedVision
-
build the Connected Vision Conan package
-
either explicitly by executing
conan install ConnectedVision/2.4.0@covi/stable -b outdated
-
or implicitly by referencing it from within another project as done in the Connected Vision Demo Server
-
-
sudo apt-get install git
-
sudo apt-get install build-essential
-
sudo apt-get install cmake
(CMake 3.x required) -
python3 --version
(verify that Python 3.x is installed) -
sudo apt-get install python3-pip
sudo pip3 install --upgrade pip
(only necessary if a corresponding error occurs) -
sudo pip3 install conan
sudo pip3 install --upgrade setuptools
(only necessary if a corresponding error occurs) -
conan search
-
conan remote add covi https://api.bintray.com/conan/covi/ConnectedVision
-
build the Connected Vision Conan package
-
either explicitly by executing
conan install ConnectedVision/2.4.0@covi/stable -b outdated
-
or implicitly by referencing it from within another project as done in the Connected Vision Demo Server
-
The cross-compilation described in the following was tested with the Raspberry Pi GCC 4.9.3 toolchain.
-
execute native Linux build steps 1-7
-
copy the armv7hf Conan profile template file to the Conan profiles directory
$HOME/.conan/profiles
-
update the
compiler.version
variable in thesettings
section and theCC
andCXX
variables in theenv
section of the armv7hf Conan profile to point to the full file path of your cross compiler, e.g. to the checkout of [...]/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc and .../arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++, respectively -
conan config set general.default_profile=armv7hf
-
copy the CMake toolchain file, e.g. to the checkout of the Connected Vision Demo Server
-
update the
CMAKE_C_COMPILER
andCMAKE_CXX_COMPILER
variables of the CMake toolchain file accordingly (similar to step 3) -
build the Connected Vision Conan package using the updated CMake toolchain file from step 6
either explicitly by executing
conan install ConnectedVision/2.4.0@covi/stable -b outdated -o ConnectedVision:toolchain=<path/of/toolchain_armv7hf.cmake>
or implicitly by referencing it from within another project as done in the Connected Vision Demo Server and building it using
cmake [...] -DCMAKE_TOOLCHAIN_FILE=<path/of/toolchain_armv7hf.cmake>
OS | OS architecture | compiler | compiler version | host architecture |
---|---|---|---|---|
Windows 7 | x86_64 | MSVC (Visual Studio) | 14.0 (2015) | x86_64 |
Windows 10 | x86_64 | MSVC (Visual Studio) | 15.0 (2017) | x86_64 |
Linux Mint 17.3 | x86_64 | arm-linux-gnueabihf-gcc | 4.9.3 | armv7hf |
Ubuntu Server 18.04.1 | x86_64 | GCC | 4.8.5 | x86_64 |
Raspbian 4.9 | armv7hf | GCC | 6.3.0 | armv7hf |
After updating an existing Conan installation using pip install conan -U
projects are failing to build with errors about Conan stating the correct usage of its command line parameters.
E.g. [...] Conan executing: conan install [...]
[...] ERROR: Exiting with code: [...]
[...] usage: conan install [...]
This may be due to a mismatch between the installed Conan version and the conan.cmake file. The conan.cmake file contains CMake build helpers required for using Conan from within CMake. conan.cmake is not provided by the Conan installation but (in general) needs to be downloaded separately. In CMake projects the conan.cmake file can be obtained using the file(DOWNLOAD "https://[...]
function, as it is done in the Connected Vision Demo Server.
Try to replace the existing file with a version from GitHub that matches your Conan installation.
It might occur that the build of a Conan package fails or is manually interrupted. When trying to execute the build again, it may happen that Conan is unable to delete the build or package directories of the preceding build attempt. If it then tries to create files or directories which already exist, it fails with the following errors:
ERROR: [WinError 183] Cannot create a file when that file already exists:
'C:\\Users\\auto\\.conan\\data\\PackageX\\1.0\\\covi\\channelY\\build\\1234567890abcdef1234567890abcdef1234567'
ERROR: [WinError 145] The directory is not empty:
'C:\\Users\\auto\\.conan\\data\\PackageX\\1.0\\covi\\channelY\\package\\1234567890abcdef1234567890abcdef1234567'
Manually delete both the corresponding build and package directories and restart the build.
On Windows there are different limits regarding the maximum directory and file path length. These limits depend on the method which is used to create/rename/delete files or directories. Calling mkdir
or rmdir
from the command line for directory paths longer than 248 characters fails. Extracting a zip archive with a deeper directory structure works, but handling those existing directory structures afterwards causes problems. This fuzzy behavior regarding path lengths may sometimes result in misleading errors such as the following:
ERROR: The file is a broken symlink, verify that you are packaging the needed destination files:
'C:\\Users\\auto\\.conan\\data\\PackageX\\1.0\\covi\\channelY\\package\\1234567890abcdef1234567890abcdef1234567\\[..]\\path\\with\\more\\than\\250\\characters.txt'
If rebuilding the Conan package does not work, then manually delete the corresponding Conan build and package directories and try to rebuild.
If this still does not work, then try to modify the package recipe adding the short_paths option.