blob: 34021a6e557e27aa3a3cf5f92d542d7edda9dd12 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
src/dynarec/dynablock.c:295:38: error: tentative definition has type 'struct __jmp_buf_tag' that is never completed
I got this error when compiling box64:
```
box64 on main via △ v3.21.3 via 🐍 v3.10.0
❯ mkdir build; cd build; cmake .. -DARM_DYNAREC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja; ninja -C build
-- Found Python3: /data/data/com.termux/files/usr/bin/python3.10 (found version "3.10.0") found components: Interpreter
-- The C compiler identification is Clang 13.0.0
-- The ASM compiler identification is Clang
-- Found assembler: /data/data/com.termux/files/usr/bin/cc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /data/data/com.termux/files/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /data/data/com.termux/files/home/box64/build
box64/build on main via △ v3.21.3
❯ ninja
[1/280] Building C object CMakeFiles/dynarec_arm.dir/src/dynarec/dynablock.c.o
FAILED: CMakeFiles/dynarec_arm.dir/src/dynarec/dynablock.c.o
/data/data/com.termux/files/usr/bin/cc -DARM64 -DCONFIG_64BIT -DDYNAREC -I/data/data/com.termux/files/home/box64/src/include -I/data/data/com.termux/files/home/box64/src -I/data/data/com.termux/files/home/box64/src/wrapped/generated -O2 -g -DNDEBUG -std=gnu11 -funwind-tables -fvisibility=hidden -MD -MT CMakeFiles/dynarec_arm.dir/src/dynarec/dynablock.c.o -MF CMakeFiles/dynarec_arm.dir/src/dynarec/dynablock.c.o.d -o CMakeFiles/dynarec_arm.dir/src/dynarec/dynablock.c.o -c /data/data/com.termux/files/home/box64/src/dynarec/dynablock.c
/data/data/com.termux/files/home/box64/src/dynarec/dynablock.c:295:38: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct __jmp_buf_tag' [-Wtentative-definition-incomplete-type]
static __thread struct __jmp_buf_tag dynarec_jmpbuf;
^
/data/data/com.termux/files/home/box64/src/dynarec/dynablock.c:295:24: note: forward declaration of 'struct __jmp_buf_tag'
static __thread struct __jmp_buf_tag dynarec_jmpbuf;
^
/data/data/com.termux/files/home/box64/src/dynarec/dynablock.c:299:13: warning: incompatible pointer types passing 'struct __jmp_buf_tag *' to parameter of type 'long *' [-Wincompatible-pointer-types]
longjmp(&dynarec_jmpbuf, 1);
^~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/setjmp.h:66:33: note: passing argument to parameter '__env' here
__noreturn void longjmp(jmp_buf __env, int __value);
^
/data/data/com.termux/files/home/box64/src/dynarec/dynablock.c:342:18: warning: incompatible pointer types passing 'struct __jmp_buf_tag *' to parameter of type 'long *' [-Wincompatible-pointer-types]
if(sigsetjmp(&dynarec_jmpbuf, 1)) {
^~~~~~~~~~~~~~~
/data/data/com.termux/files/usr/include/setjmp.h:70:26: note: passing argument to parameter '__env' here
int sigsetjmp(sigjmp_buf __env, int __save_signal_mask);
^
/data/data/com.termux/files/home/box64/src/dynarec/dynablock.c:295:38: error: tentative definition has type 'struct __jmp_buf_tag' that is never completed
static __thread struct __jmp_buf_tag dynarec_jmpbuf;
^
/data/data/com.termux/files/home/box64/src/dynarec/dynablock.c:295:24: note: forward declaration of 'struct __jmp_buf_tag'
static __thread struct __jmp_buf_tag dynarec_jmpbuf;
^
3 warnings and 1 error generated.
```
Why and how can I fix it?
|