error compiling the opencv framework - opencv

I'm trying to start learning OpenCV but I can`t even create the framework.
I'm using this command like the instructions said
python opencv/ios/build_framework.py ios
But I'm getting the following error:
** BUILD FAILED **
The following build commands failed:
Libtool /Users/myName/Documents/Apps/Frameworks/ios2/build/iPhoneSimulator-i386/modules/world/UninstalledProducts/libopencv_world.a normal i386
(1 failure)
Traceback (most recent call last):
File "opencv/ios/build_framework.py", line 129, in <module>
build_framework(os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")), os.path.abspath(sys.argv[1]))
File "opencv/ios/build_framework.py", line 121, in build_framework
put_framework_together(srcroot, dstroot)
File "opencv/ios/build_framework.py", line 89, in put_framework_together
shutil.copytree(tdir0 + "/install/include/opencv2", dstdir + "/Headers")
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 168, in copytree
OSError: [Errno 2] No such file or directory: '../build/iPhoneOS-armv7/install/include/opencv2'
I don't know what to do! Please help

Try this:
$ git checkout 2.4.3 # or 2.4.4 or 2.4.3.1 or 2.4.3.2
...somewhere in your opencv checkout before you run
$ python ./build_framework.py <SOME_DIR_OUTSIDE_OF_OPENCV_SOURCE_TREE>

Related

How to invoke conan in docker container by jenkins? error Failed to execute script conan

Using Docker as a build environment, My jenkinsfile starting specified docker container and invoking CMake which trigger build process using conan and so on. Unfortunately pipeline failed with the following output:
-- Conan: checking conan executable
-- Conan: Found program /usr/bin/conan
-- Conan: Version found [148] Failed to execute script conan
Traceback (most recent call last):
File "conan/conans/conan.py", line 11, in <module>
File "conan/conans/conan.py", line 7, in run
File "conan/conans/client/command.py", line 2151, in main
File "conan/conans/client/conan_api.py", line 222, in factory
File "conan/conans/client/conan_api.py", line 234, in __init__
File "conan/conans/client/migrations.py", line 26, in __init__
File "conan/conans/client/cache/cache.py", line 78, in __init__
File "conan/conans/client/cache/cache.py", line 150, in config
File "conan/conans/util/files.py", line 190, in save
FileNotFoundError: [Errno 2] No such file or directory: '/.conan/conan.conf'
-- Conan executing: /usr/bin/conan install . -s build_type=Release -s compiler=clang -s compiler.version=10 -s compiler.libcxx=libstdc++11 -g=cmake --build=missing
[176] Failed to execute script conan
Traceback (most recent call last):
I do not know what the problem is. If I start container and build it manually it works.
If I create it manually then I am getting following error:
Conan: Version found ERROR: Can't write version file in /.conan/version.txt
I added the following environment variable to my jenkinsfile. Then it simply works!. I was trying to define env variables in docker container that was my fail
environment {
CONAN_USER_HOME = "${env.WORKSPACE}/"
CONAN_NON_INTERACTIVE = 1
}

Pipenv lock: Command "python setup.py egg_info" failed with error code 1 (Windows 10)

I am trying to lock a pipfile and I am getting the following error (on Windows 10). Any tips on how to resolve this? I have tried updating pipenv, wheel, and setuptools.
The code is pulled from a repo which works fine for others.
(backend-xuJm__V5) C:\Users\murey\PennLabs\penn-courses\backend>pipenv lock
Locking [dev-packages] dependencies…
Success!
Locking [packages] dependencies…
Locking Failed!
Traceback (most recent call last):
File "c:/users/murey/.virtualenvs/backend-xujm__v5/lib/site-packages/pipenv/resolver.py", line 126, in <module>
main()
File "c:/users/murey/.virtualenvs/backend-xujm__v5/lib/site-packages/pipenv/resolver.py", line 119, in main
parsed.requirements_dir, parsed.packages)
File "c:/users/murey/.virtualenvs/backend-xujm__v5/lib/site-packages/pipenv/resolver.py", line 85, in _main
requirements_dir=requirements_dir,
File "c:/users/murey/.virtualenvs/backend-xujm__v5/lib/site-packages/pipenv/resolver.py", line 69, in resolve
req_dir=requirements_dir
File "C:\Users\murey\.virtualenvs\backend-xuJm__V5\lib\site-packages\pipenv\utils.py", line 726, in resolve_deps
req_dir=req_dir,
File "C:\Users\murey\.virtualenvs\backend-xuJm__V5\lib\site-packages\pipenv\utils.py", line 480, in actually_resolve_deps
resolved_tree = resolver.resolve()
File "C:\Users\murey\.virtualenvs\backend-xuJm__V5\lib\site-packages\pipenv\utils.py", line 385, in resolve
results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
...
File "C:\Users\murey\.virtualenvs\backend-xuJm__V5\lib\site-packages\pipenv\patched\notpip\_internal\utils\misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\murey\AppData\Local\Temp\tmpek28ezzybuild\uwsgi\

Dart VM fails to build on windows

I am trying to buiil Dart-VM on windows, I follow the steps as described here
https://github.com/dart-lang/sdk/wiki/Building
When I run the build.py command as below:
.\tools\build.py --mode release --arch x64 create_sdk
I get the following error:
gn gen --check in out\ReleaseX64
Traceback (most recent call last):
File "D:\ops\dart\sdk\tools\gn.py", line 436, in <module>
sys.exit(main(sys.argv))
File "D:\ops\dart\sdk\tools\gn.py", line 423, in main
results = pool.map(run_command, commands, chunksize=1)
File "C:\app\Python27\lib\multiprocessing\pool.py", line 251, in map
return self.map_async(func, iterable, chunksize).get()
File "C:\app\Python27\lib\multiprocessing\pool.py", line 567, in get
raise self._value
WindowsError: [Error 2] System cannot find file。
Tried to run GN, but it failed. Try running it manually:
$ python D:\ops\dart\sdk\tools\gn.py -m release -a x64 --os host -v
Traceback (most recent call last):
File "D:\ops\dart\sdk\tools\build.py", line 658, in <module>
sys.exit(Main())
File "D:\ops\dart\sdk\tools\build.py", line 651, in Main
mode, arch, cross_build) != 0:
File "D:\ops\dart\sdk\tools\build.py", line 491, in BuildOneConfig
args = BuildNinjaCommand(options, target, target_os, mode, arch)
File "D:\ops\dart\sdk\tools\build.py", line 473, in BuildNinjaCommand
if UseGoma(out_dir):
File "D:\ops\dart\sdk\tools\build.py", line 431, in UseGoma
return 'use_goma = true' in open(args_gn, 'r').read()
IOError: [Errno 2] No such file or directory: 'out\\ReleaseX64\\args.gn'
It seems missing the args.gn file in out\ReleaseX64 folder. but I cannot find args.gn in Dart source folders. Is it generated during building process? whether I do wrong steps led to no such file generated?

OPEN CV iOS installation

I am installing the opencv in my system followings the command given by open cv http://docs.opencv.org/2.4/doc/tutorials/introduction/ios_install/ios_install.html
I am getting this error Please let me know what I am missing.
anil-Mac-2s-Mac-mini:opencv pws-mac-2$ python platforms/ios/build_framework.py ios
Executing: ['cmake', '-GXcode', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_TOOLCHAIN_FILE=/Users/pws-mac-2/Desktop/opencv/platforms/ios/cmake/Toolchains/Toolchain-iPhoneOS_Xcode.cmake', '-DCMAKE_INSTALL_PREFIX=install', '-DENABLE_NEON=ON', '/Users/pws-mac-2/Desktop/opencv', '-DCMAKE_C_FLAGS=-fembed-bitcode', '-DCMAKE_CXX_FLAGS=-fembed-bitcode'] in /Users/pws-mac-2/Desktop/opencv/ios/build/armv7-iPhoneOS
============================================================
ERROR: [Errno 2] No such file or directory
============================================================
Traceback (most recent call last):
File "platforms/ios/build_framework.py", line 183, in <module>
b.build(args.out)
File "platforms/ios/build_framework.py", line 87, in build
self.buildOne(t[0], t[1], mainBD, cmake_flags)
File "platforms/ios/build_framework.py", line 105, in buildOne
execute(cmakecmd, cwd = builddir)
File "platforms/ios/build_framework.py", line 34, in execute
retcode = check_call(cmd, cwd = cwd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(*popenargs, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I am getting this error Please let me know how to resolve . . .
This error happens because cmake is either (a) not installed or (b) not on the user's path.
In this case, the OP had downloaded the cmake gui application from cmake.org, and copied it to /Applications. This app doesn't add the path to the binaries automatically, which is why the script couldn't find cmake.
By adding the path to the cmake binaries (bash syntax):
PATH=$PATH:/Applications/CMake.app/Contents/bin
the OP was able to successfully build opencv.
Most package managers - e.g. homebrew or macports whould have automatically added a path to the user's profile that would have permitted it to run without having to modify the path any more.
You may need to install CMake
My-Mac: opencv$ brew install cmake

Building OpenCV 2.2 html documentation

I've followed the directions here to build html documentation https://code.ros.org/trac/opencv/browser/trunk/opencv/doc/README.txt (actually my local copy that came with OpenCV 2.2, but they are the same), but I get this error after running sh buildall:
parsing
Traceback (most recent call last):
File "latex.py", line 714, in <module>
fulldoc = latexparser(sys.argv[1])
File "/home/user/OpenCV-2.2.0/doc/latex2sphinx/latexparser.py", line 114, in latexparser
tokens = tokenize(filename)
File "/home/user/OpenCV-2.2.0/doc/latex2sphinx/latexparser.py", line 106, in tokenize
pickle.dump(r, open(cache_filename, 'w'))
IOError: [Errno 2] No such file or directory: 'parse-cache/c83e178b805f6b01ff8d55cda4bd4a29'
The pdf file built fine but I prefer html.
I'm using Ubuntu 10.10.
I was able to get this working by simply doing "mkdir parse-cache" in the opencv/doc/latex2sphinx directory.

Resources