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

HTML5 build error related to PCRE2 #10834

Closed
Calinou opened this issue Aug 31, 2017 · 3 comments · Fixed by #10853
Closed

HTML5 build error related to PCRE2 #10834

Calinou opened this issue Aug 31, 2017 · 3 comments · Fixed by #10853

Comments

@Calinou
Copy link
Member

Calinou commented Aug 31, 2017

Compiling Godot Git a717083 fails for the HTML5 (WebAssembly) platform, on an Ubuntu 16.04 host running the latest stable Emscripten version:

In file included from thirdparty/pcre2/src/pcre2_jit_compile.c:78:
thirdparty/pcre2/src/sljit/sljitLir.c:1754:49: error: conflicting types for 'sljit_create_compiler'
SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void)
                                                ^
thirdparty/pcre2/src/sljit/sljitLir.h:424:49: note: previous declaration is here
SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allocator_data);
                                                ^
thirdparty/pcre2/src/pcre2_jit_compile.c:81:2: error: Unsupported architecture
#error Unsupported architecture
 ^
Compiling ==> thirdparty/pcre2/src/pcre2_match.c
In file included from thirdparty/pcre2/src/pcre2_jit_compile.c:11499:
thirdparty/pcre2/src/pcre2_jit_misc.c:113:1: error: implicit declaration of function 'sljit_free_unused_memory_exec' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
sljit_free_unused_memory_exec();
^
3 errors generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
scons: *** [thirdparty/pcre2/src/pcre2_jit_compile_16.javascript.opt.debug.webassembly.bc] Error 1
scons: building terminated because of errors.

According to the error message, this is likely a regression from #10148.

@Calinou Calinou changed the title HTML5 build error related to PCRE HTML5 build error related to PCRE2 Aug 31, 2017
@akien-mga akien-mga added this to the 3.0 milestone Aug 31, 2017
@akien-mga
Copy link
Member

CC @leezh. Is it possible to disable the JIT compiler for the javascript platform?

@leezh
Copy link
Contributor

leezh commented Sep 1, 2017

Ah, sorry for breaking HTML5 :( The flag that adds in JIT support is here:

thirdparty_flags = ["-DPCRE2_STATIC", "-DHAVE_CONFIG_H", "-DSUPPORT_JIT"]

Is it best to hide it behind a whitelist or a blacklist?

@akien-mga
Copy link
Member

A blacklist should be fine. You can use something like if "platform" in env and not env["platform"] == "javascript": or something like that.

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

Successfully merging a pull request may close this issue.

3 participants