Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error "fatal error: 'string' file not found" #20

Open
suzukieng opened this issue Jan 23, 2022 · 2 comments
Open

Build error "fatal error: 'string' file not found" #20

suzukieng opened this issue Jan 23, 2022 · 2 comments

Comments

@suzukieng
Copy link

suzukieng commented Jan 23, 2022

If I try to build according to README (npm install, npm run build), I get the following error on macOS 11.6.2:

docker run --rm -u 501:20 -w /src -v $PWD:/src emscripten/emsdk:3.0.0 emcc -Wall -Werror -g2 -c src/symbol.test.c -o dist/symbol.test.o -I zbar-0.23.90/include/ -I zbar-0.23.90/
In file included from src/symbol.test.c:3:
zbar-0.23.90/include/zbar/symbol.h:34:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
1 error generated.
emcc: error: '/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=3 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -Wall -Werror -c -Izbar-0.23.90/include/ -Izbar-0.23.90/ src/symbol.test.c -o dist/symbol.test.o' failed (returned 1)

Any idea what could be causing this? I tried substituting the emscripten Docker image to use a local emscripten installation, but that fails too, albeit in a different way (unsupported wasm-ld option -retain-symbols-file).

Is there a recommended Node version to build this project? I'm on 16. Xcode command-line tools are installed.

The full build output is attached:
build-output.txt

@vandres
Copy link

vandres commented Feb 2, 2022

Same here, macOS 12.2

@samsam2310
Copy link
Owner

I'd tested on win10 and linux. But I didn't test on Mac.
Base on the error, I guess it could be caused by environment variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants