Repository navigation
Replies: 2 comments
|
I ran the web "minimal" example with everything as-is and it worked so I assumed I don't need to build anything to use this. I installed the same code from that example into my Chrome extension background script and I get exceptions: failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): Compiling or instantiating WebAssembly module violates the following Content Security policy directive because neither 'wasm-eval' nor 'unsafe-eval' is an allowed source of script in the following Content Security Policy directive: So I installed it in a background page which I think should avoid this exception but there the TesseractCore() never seems to return so I suspect perhaps I'm getting the same error there but it's not being caught by my catch? So I wonder if I'm back to the same point, does this need to be "compiled" to avoid having to run the WebAssembly compiler in the extension? |
|
I got this working! For anyone who comes next:
|
Uh oh!
There was an error while loading. Please reload this page.
I'm having trouble building 7.0.0, same error with 5.1.1.
Is it possible to get a pre-built 7.0.0 so I can move forward? Or build help would be appreciated.
I've run "bash build-with-docker.sh" a half dozen times to make sure it's not the issue I see mentioned, with the same result. And the fact that it seems to be installing the same packages each time is curious as I'd think they would already be installed from the previous run.
My output:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.15 (09f52557f0d48b65b8c724853ed8f4e8bf80e669)
clang version 22.0.0git (https:/github.com/llvm/llvm-project 3388d40684742e950b3c5d1d2dafe5a40695cfc1)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /emsdk/upstream/bin
installing dependencies
Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1289 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [69.2 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [3969 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [6411 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1600 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [83.9 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [37.2 kB]
Get:16 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [3637 kB]
Get:17 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [6205 kB]
Get:18 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [60.9 kB]
Fetched 43.7 MB in 4s (12.4 MB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
autotools-dev file libltdl-dev libltdl7 libmagic-mgc libmagic1 libsigsegv2
m4
Suggested packages:
autoconf-archive gnu-standards autoconf-doc gettext libtool-doc gfortran
| fortran95-compiler gcj-jdk m4-doc
The following NEW packages will be installed:
autoconf automake autotools-dev file libltdl-dev libltdl7 libmagic-mgc
libmagic1 libsigsegv2 libtool m4 pkg-config
0 upgraded, 12 newly installed, 0 to remove and 36 not upgraded.
Need to get 1941 kB of archives.
After this operation, 14.6 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libmagic-mgc amd64 1:5.41-3ubuntu0.1 [257 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libmagic1 amd64 1:5.41-3ubuntu0.1 [87.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 file amd64 1:5.41-3ubuntu0.1 [21.5 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 libsigsegv2 amd64 2.13-1ubuntu3 [14.6 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 m4 amd64 1.4.18-5ubuntu2 [199 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/main amd64 autoconf all 2.71-2 [338 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/main amd64 autotools-dev all 20220109.1 [44.9 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/main amd64 automake all 1:1.16.5-1.3 [558 kB]
Get:9 http://archive.ubuntu.com/ubuntu jammy/main amd64 libltdl7 amd64 2.4.6-15build2 [39.6 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/main amd64 libltdl-dev amd64 2.4.6-15build2 [169 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/main amd64 libtool all 2.4.6-15build2 [164 kB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 pkg-config amd64 0.29.2-1ubuntu3 [48.2 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1941 kB in 1s (2156 kB/s)
Selecting previously unselected package libmagic-mgc.
(Reading database ... 17697 files and directories currently installed.)
Preparing to unpack .../00-libmagic-mgc_1%3a5.41-3ubuntu0.1_amd64.deb ...
Unpacking libmagic-mgc (1:5.41-3ubuntu0.1) ...
Selecting previously unselected package libmagic1:amd64.
Preparing to unpack .../01-libmagic1_1%3a5.41-3ubuntu0.1_amd64.deb ...
Unpacking libmagic1:amd64 (1:5.41-3ubuntu0.1) ...
Selecting previously unselected package file.
Preparing to unpack .../02-file_1%3a5.41-3ubuntu0.1_amd64.deb ...
Unpacking file (1:5.41-3ubuntu0.1) ...
Selecting previously unselected package libsigsegv2:amd64.
Preparing to unpack .../03-libsigsegv2_2.13-1ubuntu3_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.13-1ubuntu3) ...
Selecting previously unselected package m4.
Preparing to unpack .../04-m4_1.4.18-5ubuntu2_amd64.deb ...
Unpacking m4 (1.4.18-5ubuntu2) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../05-autoconf_2.71-2_all.deb ...
Unpacking autoconf (2.71-2) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../06-autotools-dev_20220109.1_all.deb ...
Unpacking autotools-dev (20220109.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../07-automake_1%3a1.16.5-1.3_all.deb ...
Unpacking automake (1:1.16.5-1.3) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../08-libltdl7_2.4.6-15build2_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-15build2) ...
Selecting previously unselected package libltdl-dev:amd64.
Preparing to unpack .../09-libltdl-dev_2.4.6-15build2_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.6-15build2) ...
Selecting previously unselected package libtool.
Preparing to unpack .../10-libtool_2.4.6-15build2_all.deb ...
Unpacking libtool (2.4.6-15build2) ...
Selecting previously unselected package pkg-config.
Preparing to unpack .../11-pkg-config_0.29.2-1ubuntu3_amd64.deb ...
Unpacking pkg-config (0.29.2-1ubuntu3) ...
Setting up libmagic-mgc (1:5.41-3ubuntu0.1) ...
Setting up libmagic1:amd64 (1:5.41-3ubuntu0.1) ...
Setting up file (1:5.41-3ubuntu0.1) ...
Setting up autotools-dev (20220109.1) ...
Setting up libsigsegv2:amd64 (2.13-1ubuntu3) ...
Setting up pkg-config (0.29.2-1ubuntu3) ...
Setting up libltdl7:amd64 (2.4.6-15build2) ...
Setting up libtool (2.4.6-15build2) ...
Setting up m4 (1.4.18-5ubuntu2) ...
Setting up autoconf (2.71-2) ...
Setting up automake (1:1.16.5-1.3) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/automake.1.gz because associated file /usr/share/man/man1/automake-1.16.1.gz (of link group automake) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/aclocal.1.gz because associated file /usr/share/man/man1/aclocal-1.16.1.gz (of link group automake) doesn't exist
Setting up libltdl-dev:amd64 (2.4.6-15build2) ...
Processing triggers for libc-bin (2.35-0ubuntu3.10) ...
building zlib
BUILD_CLEAN=1
PROC=15
EMSDK=/emsdk
OPTIM_FLAGS=-O3 --closure 1
BUILD_DIR=/src/dep
CM_FLAGS=-DCMAKE_INSTALL_PREFIX=/src/dep -DBUILD_SHARED_LIBS=OFF -DSKIP_INSTALL_FILES=ON -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
make: cmake .. -DCMAKE_C_FLAGS=-O3 --closure 1 -DCMAKE_INSTALL_PREFIX=/src/dep -DBUILD_SHARED_LIBS=OFF -DSKIP_INSTALL_FILES=ON -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
CMake Error: The source directory "/src/third_party/zlib" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
emmake: error: 'cmake .. '-DCMAKE_C_FLAGS=-O3 --closure 1' -DCMAKE_INSTALL_PREFIX=/src/dep -DBUILD_SHARED_LIBS=OFF -DSKIP_INSTALL_FILES=ON -DCMAKE_TOOLCHAIN_FILE=/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake' failed (returned 1)
All reactions