Opencv 3.0.0 installation with contrib-modules - opencv

I have a windows 8.1 PC on a 64 bit machine. I had already installed OpenCV 3.0.0 from source without opencv_contrib. Following the answer by berak-
Nonfree module is missing in OpenCV 3.0, I downloaded the contrib and tried building opencv from source again but this time with OPENCV_EXTRA_MODULES option turned on.
During this build process however, I got strange errors from the VS compiler. They were from the file
\modules\line_descriptor\src\binary_descriptor.cpp
The errors were the following on line numbers as follows.
error C2143: syntax error : missing ';' before '=' E:\opencv\opencv-master\opencv_contrib-master\modules\line_descriptor\src\binary_descriptor.cpp line 833
error C2059: syntax error: '>' line 836
error C2143: syntax error : missing ';' before '{' E:\opencv\opencv-master\opencv_contrib-master\modules\line_descriptor\src\binary_descriptor.cpp line 837
error LNK1104: cannot open file '....\lib\Debug\opencv_line_descriptor300d.lib' E:\opencv\opencv-master\build\modules\line_descriptor\LINK opencv_test_line_descriptor
Error 7 error MSB3073: The command "setlocal
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 132 5 INSTALL

i had the same problem some weeks ago. i solved it this way:
edit the \modules\line_descriptor\src\binary_descriptor.cpp
and put this line after the defines:
#undef near
run cmake again (with -DBUILD_opencv_line_descriptor=ON)
what i disabled was: _cvv and _world

Related

How to start triton server after building the Windows 10 "Min" Image?

I have followed the steps mentioned here.
I am able to build the win10-py3-min image.
After that I am trying to build the Triton Server as mentioned here
Command:
python build.py -v --no-container-pull --image=gpu-base,win10-py3-min --enable-logging --enable-stats --enable-tracing --enable-gpu --endpoint=grpc --endpoint=http --repo-tag=common:r22.10 --repo-tag=core:r22.10 --repo-tag=backend:r22.10 --repo-tag=thirdparty:r22.10 --backend=ensemble --backend=tensorrt:r22.10
I am getting error as below.
cmake : The term 'cmake' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\workspace\build\cmake_build.ps1:20 char:1 + cmake "-DTRT_VERSION4{env:TRT_VERSION}" "-DCMAKE_TOOLCHAIN_FILE=${en +..—+ Categorylnfo : ObjectNotFound: (cmake:String) [], CommandNotFoundException + FullyQualifiedErrorld : CommandNotFoundException
DEBUG: 86+ >>>> ExitWithCode 1;
DEBUG: 6+ function ExitWithCode($exitcode) >>>>
DEBUG: 7+ >>>> $host.SetShouldExit($exitcode)
DEBUG: 8+ >>>> exit $exitcode
DEBUG: 33+ if ( >>>> $LASTEXITCODE -ne 0)
DEBUG: 34+ >>>> Write-Output "exited with status code $LASTEXITCODE-; exited with status code 1
DEBUG: 35+ >>>> ExitWithCode 1;
DEBUG: 6+ function ExitWithCode($exitcode) >>>>
DEBUG: 7+ >>>> $host.SetShouldExit($exitcode)
DEBUG: 8+ >>>> exit $exitcode error: build failed
and for below command
python build.py -v --no-container-pull --image=base,win10-py3-min --enable-logging --enable-stats --enable-tracing --enable-gpu --endpoint=grpc --endpoint=http --repo-tag=common:r22.10 --repo-tag=core:r22.10 --repo-tag=backend:r22.10 --repo-tag=thirdparty:r22.10 --backend=ensemble --backend=tensorrt:r22.10
getting error as below.
"C:\tmp\tritonbuild\tritonserver\build\install.vcxproj" (default target) (1) ->
"C:\tmp\tritonbuild\tritonserver\build\ALL_BUILO.vcxproj" (default target) (3) ->
"C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core.vcxproj" (default target) (5) ->
(CustomBuild target) -> C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core\_deps\repo-common-src\include\triton/common/triton_json.h(641,35): error 02039: 'GetObjectA': is not a member of 'rapidjson::GenericValue<rapidjson::UTF8<c har>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>1 [C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core\triton-core.vcxproll [C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core .vcxproj]
C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core\_deps\repo-common-src\include\triton/common/triton_json.h(641,1): error 02530: 'm': references must be initialized [C:\tmp\tritonbuild\tritonserver\build\_ deps\repo-core-build\triton-core\triton-core.vcxproj] [C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core.vcxproj]
C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core\_deps\repo-common-src\include\triton/common/triton_json.h(641,1): error C3531: 'm': a symbol whose type contains 'auto' must have an initializer [C:\tmp\tr itonbuild\tritonserver\build\_deps\repo-core-build\triton-core\triton-core.vcxproj] [C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core.vcxproj]
C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core\_deps\repo-common-src\include\triton/common/triton_json.h(641,26): error C2143: syntax error: missing ';' before ':' [C:\tmp\tritonbuild\tritonserver\build \_deps\repo-core-build\triton-core\triton-core.vcxproj] [C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core.vcxproj]
C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core\_deps\repo-common-src\include\triton/common/triton_json.h(641,46): error C2143: syntax error: missing ';' before 'y [C:\tmp\tritonbuild\tritonserver\build \_deps\repo-core-build\triton-core\triton-core.vcxproj] [C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\triton-core.vcxproj]
C:\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(238,5): error MSB8066: Custom build for 'C:\tmp\tritonbuild\tritonserver\build\CMakeFiles\6f6d31a7577427f4fd89bcde8fd28163\triton-core-mkdir.rule;C:\tmp\triton build\tritonserver\build\CMakeFiles\6f6d31a7577427f4fd89bcde8fd28163\triton-core-download.rule;C:\tmp\tritonbuild\tritonserver\build\CMakeFiles\6f6d31a7577427f4fd89bcde8fd28163\triton-core-update.rule;C:\tmp\tritonbuild\tritonser ver\build\CMakeFiles\6f6d310577427f4fd89bcde8fd28163\triton-core-patch.rule;C:\tmp\tritonbuild\tritonserver\build\CMakeFiles\6f6d310577427f4fd89bcde8fd28163\triton-core-configure.rule;C:\tmp\tritonbuild\tritonserver\build\CMake Files\6f6d31a7577427f4fd89bcde8fd28163\triton-core-build.rule;C:\tmp\tritonbuild\tritonserver\build\CMakeFiles\6f6d31a7577427f4fd89bcde8fd28163\triton-core-install.rule;C:\tmp\tritonbuild\tritonserver\build\CMakeFiles\e0e8eabd6eb cadfabbd7ced13e471b12\triton-core-complete.rule;C:\tmp\tritonbuild\tritonserver\build\CMakeFiles\d677bfcd41cd12f160cbc1390c778655\triton-core.rule' exited with code 1. [C:\tmp\tritonbuild\tritonserver\build\_deps\repo-core-build\ triton-core.vcxproj]
2021 Warning(s)
6 Error(s)
Run Visual Studio Installer and ensure you have installed C++ CMake tools for Windows.
Run x64 Native Tools Command Prompt for VS2019
Run in the command prompt:
python build.py -v --no-container-pull --image=gpu-base,win10-py3-min --enable-logging --enable-stats --enable-tracing --enable-gpu --endpoint=grpc --endpoint=http --repo-tag=common:r22.10 --repo-tag=core:r22.10 --repo-tag=backend:r22.10 --repo-tag=thirdparty:r22.10 --backend=ensemble --backend=tensorrt:r22.10

What is the missing binary operator before token "(" 44 | #if __GLIBC_PREREQ(2,15) GNU?

I am getting the above error.
I work in cygwin 3.15 under windows 10. glibc 2.30 version included.
while compiling opencv project with aarch64-unknown-linux-gnu-g++ compiler with.
a snippet of error is
.... from constants.cpp:1:
/home/user/x-tools/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/include/c++/9.2.0/aarch64-unknown-linux-gnu/bits/os_defines.h:44:19: error: missing binary operator before token "("
44 | #if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
where as simple c++ program is compiled without any error for the same target.

Problem with installing OpenCV using Visual Studio and CMake (error code: MSB3073)

I was trying to install OpenCV to import it in some Python project. I was using this guide to build it from source. I've gotten to the 16th point without much trouble more or less. Now when I try to build the INSTALL project, I'm getting the following error:
Severity Code Description Project File Line Suppression State Suppression State
Error MSB3073 The command "setlocal
"E:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code 1. INSTALL C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets 148
Double clicking this error points to <Exec/> part of this code in the Microsoft.CppCommon.targets file:
<Target Name="PostBuildEvent" Condition="'$(PostBuildEventUseInBuild)'!='false'">
<Message Text="%(PostBuildEvent.Message)" Condition="'%(PostBuildEvent.Message)' != '' and '%(PostBuildEvent.Command)' != ''" Importance="High" />
<Exec Command="%(PostBuildEvent.Command)$(_BuildSuffix)" Condition="'%(PostBuildEvent.Command)' != ''"/>
Edit1:
Adding the full error log I got, unless I'm looking for it in the wrong place.
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: The command "setlocal
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: "E:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: :cmEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: :cmErrorLevel
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: exit /b %1
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: :cmDone
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(148,5): error MSB3073: :VCEnd" exited with code 1.
2>Done building project "INSTALL.vcxproj" -- FAILED.
========== Build: 1 succeeded, 1 failed, 80 up-to-date, 0 skipped ==========
The problem is indeed, as indicated by #arrowd, that Visual Studio's permissions are not sufficient. Just run Visual Studio as administrator and then the install will succeed.
Hi the solution by #arrowd worked for me. just to show the steps how to fix this issue. First go to the build folder and right click, go to security tab and click edit. check the Full control box. Open your cmd as administrator than go the same directory as Opencv.sln.
run it from there than right click on INSTAll than build
Use below steps:
Navigate to your build folder
Right click on ALL-BUILD.vcxproj
Select properties
Select Security tab
Select Edit
Check Full Control Box
Open ALL-BUILD.vcxproj
Right click on INSTALL and select Rebuild
Worked for me.

FSL (preprocessing BedPostX) Error: Error in logfile. What does this mean?

When I do BedpostX FSL preprocessing I get this message:
----- Bedpostx Monitor -----
1 slices processed out of 62
2 slices processed out of 62
.
.
.
59 slices processed out of 62
60 slices processed out of 62
An error ocurred. Please check file /Users/...../bedpostx.bedpostX/logs/bpx_postproc.e68944
/Users/..../bedpostx.bedpostX/monitor: line 15: kill: (9187) - No such process
logout
[Process completed]
So I checked the log file:
Error in logfile: *File "/Applications/FSL/bin/imglob", line 78
print "Usage: $0 [-extension/extensions] <list of names>"
^
SyntaxError: Missing parentheses in call to 'print'
File "/Applications/FSL/bin/imglob", line 78
print "Usage: $0 [-extension/extensions] <list of names>"
^
SyntaxError: Missing parentheses in call to 'print'
File "/Applications/FSL/bin/imglob", line 78
print "Usage: $0 [-extension/extensions] <list of names>"
^
SyntaxError: Missing parentheses in call to 'print'
File "/Applications/FSL/bin/imglob", line 78
print "Usage: $0 [-extension/extensions] <list of names>"
^
SyntaxError: Missing parentheses in call to 'print'*
But I dont know really what it means. It is really strange cause the process was almost done (see above at 61 it stopped). I got almost every outputs. So my questions are:
What does the error mean?
Is the process still completed? (see above there it is said)
If not what can I do to fix the problem?
Here is another screenshot:
So finally I got a tip from another forum. the bedpostx command is a shell script which uses sometimes python environment itself. Due to the fact that I on my system python 3.5 was installed the error occurs. So I just started the bedpostx command again but this time in a python 2.7 environment terminal.
cheers
manun

Xcode Build error, arm-apple-darwin11-gcc-4.2.1 execvp: No such file or directory

After upgrading to Xcode 4.3.2. I'm getting a metric ton of build errors.
A whole line of them are error code 255
gcc-4.2: error trying to exec '/usr/bin/arm-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
Command /usr/bin/gcc-4.2 failed with exit code 255
I noticed that there is no /usr/bin/arm-apple-darwin11-gcc-4.2.1 file on my machine. Could this be the source of the problem?
What's the output of this command?
$ printenv | grep "CC="
It might be honoring your C Compiler (CC) selection. I was getting similar errors (through cocoapods) and doing an
$ export CC=
fixed it for me.

Resources