Dartium fails to build on windows - dart

I am trying to build a version of Dartium on windows, but I keep running into a problem.
I am trying to build a Dartium with the proprietary codecs, so I can play AAC codec in an MP4 file, which normal Dartium can't play.
[22/22259] CXX obj\dart\runtime\vm\libdart_vm.thread.obj
FAILED: obj/dart/runtime/vm/libdart_vm.thread.obj
ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC #obj\dart\runtime\vm\libdart_vm.thread.obj.rsp /c ..\..\dart\runtime\vm\thread.cc /Foobj\dart\runtime\vm\libdart_vm.thread.obj /Fdobj\dart\runtime\libdart_vm.cc.pdb
c:\dart\dartium\src\dart\runtime\vm\thread.cc(459) : error C2220: warning treated as error - no 'object' file generated
c:\dart\dartium\src\dart\runtime\vm\thread.cc(459) : warning C4172: returning address of local variable or temporary: func
[25/22259] CC obj\third_party\opus\src\silk\opus.resampler_rom.obj
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "C:\dart\dartium\src\dart\tools\dartium\build.py", line 58, in <module>
main()
File "C:\dart\dartium\src\dart\tools\dartium\build.py", line 55, in main
+ targets)
File "C:\dart\dartium\src\dart\tools\dartium\utils.py", line 112, in runCommand
raise Exception('Failed to run command. return code=%s' % p.returncode)
Exception: Failed to run command. return code=1
I am building this on a windows 2016 Datacenter (VM), I have installed Dart 32bit, Visual Studio 2015, with windows SDK, and followed the instructions on: https://github.com/dart-lang/sdk/wiki/Building-Dartium

If you add
#pragma warning disable C4172
at the top of the thread.cc, that should fix the compilation.

Related

OpenCV.js custom build failed in windows machine

I am trying to build opencv.js by following the steps mentioned in the Open CV [official document][1].
Note: I am trying to make a custom build instead of using the existing [opencv.js][2] library because I want to add some contrib modules as well.
Open CV source version: 4.5.1
Cmake: 3.20.0
Python: 3.7
Emscriptem: [latest][3]
operating system: windows 64 bit
The below is the stack trace of the issue I get when I try to execute the below command in the windows power shell..
emcmake python ./opencv/platforms/js/build_js.py build_js
Stack Trace
emcmake python ./opencv/platforms/js/build_js.py build_js
configure: python ./opencv/platforms/js/build_js.py build_js
Args: Namespace(build_dir='build_js', build_doc=False, build_flags=None, build_loader=False, build_perf=False, build_test=False, build_wasm=False, build_wasm_intrin_test=False, clean_build_dir=False, cmake_option=None, config='D:\\business\\Drapezy\\codetrials\\opencvjs\\opencv\\platforms\\js\\opencv_js.config.py', config_only=False, disable_wasm=False, emscripten_dir='D:\\business\\Drapezy\\codetrials\\opencvjs\\emsdk\\upstream\\emscripten', enable_exception=False, opencv_dir='D:\\business\\Drapezy\\codetrials\\opencvjs\\opencv', simd=False, skip_config=False, threads=False)
Check dir D:\business\Drapezy\codetrials\opencvjs\build_js (create: True, clean: False)
Check dir D:\business\Drapezy\codetrials\opencvjs\opencv (create: False, clean: False)
Check dir D:\business\Drapezy\codetrials\opencvjs\emsdk\upstream\emscripten (create: False, clean: False)
=====
===== Config OpenCV.js build for default target
=====
Executing: ['cmake', '-DPYTHON_DEFAULT_EXECUTABLE=C:\\Users\\girir\\AppData\\Local\\Programs\\Python\\Python37\\python.exe', '-DENABLE_PIC=FALSE', '-DCMAKE_BUILD_TYPE=Release', "-DCMAKE_TOOLCHAIN_FILE='D:\\business\\Drapezy\\codetrials\\opencvjs\\emsdk\\upstream\\emscripten\\cmake\\Modules\\Platform\\Emscripten.cmake'", "-DCPU_BASELINE=''", "-DCPU_DISPATCH=''", '-DCV_TRACE=OFF', '-DBUILD_SHARED_LIBS=OFF', '-DWITH_1394=OFF', '-DWITH_ADE=OFF', '-DWITH_VTK=OFF', '-DWITH_EIGEN=OFF', '-DWITH_FFMPEG=OFF', '-DWITH_GSTREAMER=OFF', '-DWITH_GTK=OFF', '-DWITH_GTK_2_X=OFF', '-DWITH_IPP=OFF', '-DWITH_JASPER=OFF', '-DWITH_JPEG=OFF', '-DWITH_WEBP=OFF', '-DWITH_OPENEXR=OFF', '-DWITH_OPENGL=OFF', '-DWITH_OPENVX=OFF', '-DWITH_OPENNI=OFF', '-DWITH_OPENNI2=OFF', '-DWITH_PNG=OFF', '-DWITH_TBB=OFF', '-DWITH_TIFF=OFF', '-DWITH_V4L=OFF', '-DWITH_OPENCL=OFF', '-DWITH_OPENCL_SVM=OFF', '-DWITH_OPENCLAMDFFT=OFF', '-DWITH_OPENCLAMDBLAS=OFF', '-DWITH_GPHOTO2=OFF', '-DWITH_LAPACK=OFF', '-DWITH_ITT=OFF', '-DWITH_QUIRC=ON', '-DBUILD_ZLIB=ON', '-DBUILD_opencv_apps=OFF', '-DBUILD_opencv_calib3d=ON', '-DBUILD_opencv_dnn=ON', '-DBUILD_opencv_features2d=ON', '-DBUILD_opencv_flann=ON', '-DBUILD_opencv_gapi=OFF', '-DBUILD_opencv_ml=OFF', '-DBUILD_opencv_photo=ON', '-DBUILD_opencv_imgcodecs=OFF', '-DBUILD_opencv_shape_transformer=ON', '-DBUILD_opencv_videoio=OFF', '-DBUILD_opencv_videostab=OFF', '-DBUILD_opencv_highgui=OFF', '-DBUILD_opencv_superres=OFF', '-DBUILD_opencv_stitching=OFF', '-DBUILD_opencv_java=OFF', '-DBUILD_opencv_js=ON', '-DBUILD_opencv_python2=OFF', '-DBUILD_opencv_python3=OFF', '-DBUILD_EXAMPLES=OFF', '-DBUILD_PACKAGE=OFF', '-DBUILD_TESTS=OFF', '-DBUILD_PERF_TESTS=OFF', '-DBUILD_DOCS=OFF', '-DWITH_PTHREADS_PF=OFF', '-DCV_ENABLE_INTRINSICS=OFF', '-DBUILD_WASM_INTRIN_TESTS=OFF', "-DCMAKE_C_FLAGS='-s USE_PTHREADS=0 '", "-DCMAKE_CXX_FLAGS='-s USE_PTHREADS=0 '", 'D:\\business\\Drapezy\\codetrials\\opencvjs\\opencv']
Re-run cmake no build system arguments
-- Detected processor: x86
-- Looking for ccache - not found
CMake Error at cmake/OpenCVCompilerOptimizations.cmake:593 (message):
Compiler doesn't support baseline optimization flags:
Call Stack (most recent call first):
cmake/OpenCVCompilerOptions.cmake:311 (ocv_compiler_optimization_options)
CMakeLists.txt:617 (include)
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "./opencv/platforms/js/build_js.py", line 279, in <module>
File "./opencv/platforms/js/build_js.py", line 192, in config
File "./opencv/platforms/js/build_js.py", line 23, in execute
__main__.Fail: Child returned: 1
[1]: https://docs.opencv.org/master/d4/da1/tutorial_js_setup.html
[2]: https://docs.opencv.org/master/opencv.js
[3]: https://emscripten.org/docs/getting_started/downloads.html
Any ideas to resolve this issue is appreciated.
Building opencv.js on Windows will NOT work, at least according to this open issue. An alternative is to install WSL and use it to build.

Error 13 error C1083: Cannot open include file: 'cudnn.h': No such file or directory ...\caffe\util\cudnn.hpp 5 1 convert_imageset

When I compile caffe for windows (64bit, release, vs 2013, nvidia 750, opencv 3.1,cuDNN version 5.1), I got the following error
"Error 13 error C1083: Cannot open include file: 'cudnn.h': No such
file or directory ...\caffe\util\cudnn.hpp 5 1 convert_imageset".
I set everything like what mentioned in this video.
I search for this error in github issues link this and this
if I use version 4 of cuDNN and OpenCV 2.4I got:
========== Rebuild All: 15 succeeded, 1 failed, 0 skipped ==========
However, I got error:
Error 1 error MSB3073: The command
""...\caffe-master\windows\scripts\BinplaceCudaDependencies‌​.cmd"
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin"
"...\cuda" false true "...\caffe-master\windows..\Build\x64\Release\"
:VCEnd" exited with code 1. C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.ta‌​rgets
132 5 libcaffe
Extract the cuDNN archive to a directory of your choice, referred to below as installpath. Then follow the platform-specific instructions as follows:
Add installpath to the PATH environment variable.
In your Visual Studio project properties, add installpath to the Include Directories and Library Directories lists and add cudnn.lib to Linker->Input->Additional Dependencies.

Visual Studio opaque compilation error indication

I am trying to compile OpenCV with Cuda support using Microsoft Visual Studio 2013 and get the following compilation error message:
22> CMake Error at cuda_compile_generated_pyrlk.cu.obj.cmake:264 (message):
22> Error generating file
22> F:/Nir/dev/opencv/build/visualStudioA/modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_pyrlk.cu.obj
22>
22>
22>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1.
Is there a way to get more information about the error?
Increasing log verbosity, or getting the nvcc command that failed could be useful
Cuda compile verbosity can be enabled at CMakeCache.txt file:
//Print out the commands run while compiling the CUDA source file.
// With the Makefile generator this defaults to VERBOSE variable
// specified on the command line, but can be forced on with this
// option.
CUDA_VERBOSE_BUILD:BOOL=ON

Running html5 app template in ubuntu sdk failed?

My configuration :
Ubuntu 14.04 LTS
64bit
Qtcreator 3.1.1
everything is up-to-date
Hello everyone,
I'm trying to just compile and run an HTML5 App for ubuntu Phone, but after trying and searching for a week now, I still can't make it run !
For the moment I just want to run the simple html5 app template.
This is the situation :
I have installed ubuntu sdk as instructed in https://developer.ubuntu.com/en/start/ubuntu-sdk/installing-the-sdk/
I've created in the run click menu, an i386 build target. (15.04) --- which exited with no errors
I created an i386 emulator in devices --> i386 - devel - default password --- which is finally up and running correctly
The problem is when I compile the default template : theses are the errors I get :
desktop_Exec(app): found unexpected Exec with architecture 'all':./qtc_device_debughelper.py
security_policy_groups_safe_app(debug):(REJECT)reserved policy group 'debug':not for production use
security_policy_version_matches_framework(app.apparmor):invalid framework 'ubuntu-core-15.04'
And when I try to edit it anyway :
This is what I get :
Traceback (most recent call last):
File "/tmp/qtc_device_applaunch.py", line 29, in <module>
gi.Repository.get_default().require("UbuntuAppLaunch")
gi.RepositoryError: Typelib file for namespace 'UbuntuAppLaunch' (any version) not found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen importlib._bootstrap>", line 2158, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/qtc_device_applaunch.py", line 33, in <module>
from gi.repository import UpstartAppLaunch as UAL
File "/usr/lib/python3/dist-packages/gi/importer.py", line 53, in find_module
'introspection typelib not found' % namespace)
ImportError: cannot import name UpstartAppLaunch, introspection typelib not found
I have been looking for this everywhere but I couldn't find something that works.
I need some of your knowledge to help me understand all this!
I have the same errors. I think that the 'ubuntu-core-15.04'-error is related to the version of Ubuntu you are using. I use Mint 17, which is based on Ubuntu 14.04. Canonical recommends the newer Ubuntu Versions for app-developing, because there is some stuff in it they changed.
unfortunately, I can't help you with the other errors.

Cocos2d-x compilation error

I just downloaded the Cocos2d-x SDK and tried to compile the hello world example with the following result:
<code>The Selected NDK toolchain version was 4.8 !
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d/external
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d/cocos
Android NDK: jni/Android.mk: Cannot find module with tag '2d' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory `/home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android'
jni/Android.mk:22: *** Android NDK: Aborting. . Stop.
make: Leaving directory `/home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android'
Traceback (most recent call last):
File "./build_native.py", line 166, in <module>
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File "./build_native.py", line 153, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "./build_native.py", line 89, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android ] fails!</code>
Which cocos2d-x version are you using? Seems like you didn't define your env variables correctly. Please have a look at this tutorial and make sure you define the following variables:
COCOS2DX_ROOT : should point to the root directory of cocos2d-x
ANDROID_SDK_ROOT : Should point to the root directory of the Android SDK
NDK_ROOT : Should point the to root directory of the Android NDK
NDK_TOOLCHAIN_VERSION : Which Android NDK toolchain should be used
See the problem is that the system is not able to compile the cocos.py.
So, if you open cocos.py from the bin directory where you have unzipped the file
it runs smoothly.
The thing is Python3.x is not able to compile the Phython2.x code.
So we must change the path in environment variable so the system doesn't a python2 file with the help of python3 compiler.
Thanks
Summary
1.Go to Control Panel, then type path or environment in search bar
2.open Evnvironment variables
3.Just delete any C:\Python34 or anything starts with python3.x and add C:\Python27 path where you have installed.
Video link:
https://youtu.be/T8zk3sv0cL0

Resources