Coder Social home page Coder Social logo

webarkit / opencv-em Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 3.0 73 KB

A simple utility script to build OpenCV static libs with Emscripten

License: GNU General Public License v3.0

Shell 61.40% Python 38.60%
emscripten hacktoberfest opencv opencvjs wasm

opencv-em's Introduction

opencv-em's People

Contributors

kalwalt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

opencv-em's Issues

project wasm-ar fails to build

@EdwardLu2018 I created a build from the script with the libs, includes and opencv.js files. It use now the python command:

python ./platforms/js/build_js.py ../build_wasm --build_wasm
as i used already (and that was fine before) but with your latest changes i receive this error:

emmake make
make: make
Scanning dependencies of target wasm_ar
[ 50%] Building CXX object CMakeFiles/wasm_ar.dir/src/wasm_ar.cpp.o
[100%] Linking CXX executable wasm_ar.js
error: undefined symbol: _ZN2cv3MatC1ERKS0_ (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: __ZN2cv3MatC1ERKS0_ may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN2cv3MatC1EiiiPvm (referenced by top-level compiled C/C++ code)
warning: __ZN2cv3MatC1EiiiPvm may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN2cv3MatC1Ev (referenced by top-level compiled C/C++ code)
warning: __ZN2cv3MatC1Ev may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN2cv3MatD1Ev (referenced by top-level compiled C/C++ code)
warning: __ZN2cv3MatD1Ev may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK2cv3Mat5cloneEv (referenced by top-level compiled C/C++ code)
warning: __ZNK2cv3Mat5cloneEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZNK2cv3Mat5emptyEv (referenced by top-level compiled C/C++ code)
warning: __ZNK2cv3Mat5emptyEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
em++: error: '/home/walter/emsdk/node/12.18.1_64bit/bin/node /home/walter/emsdk/upstream/emscripten/src/compiler.js /tmp/tmpof609eqg.txt' failed (1)
make[2]: *** [CMakeFiles/wasm_ar.dir/build.make:96: wasm_ar.js] Errore 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/wasm_ar.dir/all] Errore 2
make: *** [Makefile:84: all] Errore 2

i include the package in zip format
opencv-em-4.5.0-beta.zip
If you can test, i will appreciate it.

Build with highgui and videoio modules

I'm trying to build with highgui and videoio modules, in this branch https://github.com/webarkit/opencv-em/tree/with-highgui. But the process stops at videoio compilation, see log:

emcc:WARNING: --llvm-lto ignored when using llvm backend
../modules/videoio/src/backend_plugin.cpp:76:30: warning: unused parameter 'h' [-Wunused-parameter]
void* getSymbol_(LibHandle_t h, const char* symbolName)
                             ^
../modules/videoio/src/backend_plugin.cpp:76:45: warning: unused parameter 'symbolName' [-Wunused-parameter]
void* getSymbol_(LibHandle_t h, const char* symbolName)
                                            ^
../modules/videoio/src/backend_plugin.cpp:83:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
../modules/videoio/src/backend_plugin.cpp:86:50: warning: unused parameter 'filename' [-Wunused-parameter]
LibHandle_t libraryLoad_(const FileSystemPath_t& filename)
                                                 ^
../modules/videoio/src/backend_plugin.cpp:97:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
}
^
../modules/videoio/src/backend_plugin.cpp:100:34: warning: unused parameter 'h' [-Wunused-parameter]
void libraryRelease_(LibHandle_t h)
                                 ^
4 warnings and 2 errors generated.

@ThorstenBux it was possible with opencv 4.1 but maybe is not possible with 4.5.0?

Build python fails

If you run the ./build python script after the ./build cmake the python script will fail. We should remove the build_wasm directory (inside opencv folder!) before running any command in this case cmake will be restarted correctly. It will be also useful to add another command to build all the entries (python and cmake version)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.