I try to compile CrossOver 21.2.0 open source code on Ubuntu 22.04 64bit.
I met compile error at /dll/winecrt0/exception.c when building 32 bit codes.
How to solve this problem ?
clang -mwine32 -mstorage-address-space=default -minterop64-32-thunk-prefix=wine -minterop64-32-cs32-name=wine_32on64_cs32 -minterop64-32-cs64-name=wine_32on64_cs64 -mstack64 -mdefault-address-space=ptr32 -mstorage-address-space=ptr32 -mno-stack64 -c -o dlls/winecrt0/exception.o ../dlls/winecrt0/exception.c \
-Idlls/winecrt0 -I../dlls/winecrt0 -Iinclude -I../include -I../include/msvcrt -DWINESRC \
-D_MSVCR_VER=0 -D_REENTRANT -fPIC -fasynchronous-unwind-tables -fno-builtin -fshort-wchar -mabi=ms \
-Wall -pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing \
-Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wno-pragma-pack \
-Wstrict-prototypes -Wtype-limits -Wvla -Wwrite-strings -Wpointer-arith -gdwarf-2 -gstrict-dwarf \
-Werror=extra-tokens -Werror=implicit-function-declaration \
-Werror=incompatible-function-pointer-types -Werror=incompatible-pointer-types-discards-qualifiers \
-Werror=pointer-to-int-cast-truncates \
-Werror=pointer-to-int-cast -Werror=int-to-pointer-cast-truncates -Werror=out-of-scope-function \
-Werror=pointer-arith -Werror=pointer-type-mismatch -Werror=strict-prototypes \
-Werror=tautological-constant-out-of-range-compare -g -O2
../dlls/winecrt0/exception.c:100:23: error: passing 'struct _EXCEPTION_REGISTRATION_RECORD ' to parameter of type
'__storage32 EXCEPTION_REGISTRATION_RECORD ' (aka 'storage32 struct _EXCEPTION_REGISTRATION_RECORD ')
changes address space of pointer
__wine_pop_frame( &wine_frame->frame );
^~~~~~
../include/wine/exception.h:265:95: note: passing argument to parameter 'frame' here
static inline EXCEPTION_REGISTRATION_RECORD wine_pop_frame( EXCEPTION_REGISTRATION_RECORD frame )
^
../dlls/winecrt0/exception.c:101:30: error: passing 'struct __wine_jmp_buf ' to parameter of type
'storage32 wine_jmp_buf ' changes address space of pointer
for (;;) wine_longjmp( &wine_frame->jmp, 1 );
^~~~
../include/wine/exception.h:110:71: note: passing argument to parameter 'buf' here
extern void DECLSPEC_NORETURN cdecl wine_longjmp( wine_jmp_buf buf, int retval ) DECLSPEC_HIDDEN;
^
../dlls/winecrt0/exception.c:111:33: error: assigning 'struct tagWINE_FRAME storage32' to 'const storage32
struct latent-storage32 tagWINE_FRAME ' changes address space of pointer
wine_frame->ExceptionRecord = wine_frame;
^ ~~
../dlls/winecrt0/exception.c:113:24: error: passing 'struct _EXCEPTION_REGISTRATION_RECORD storage32' to parameter
of type 'storage32 EXCEPTION_REGISTRATION_RECORD '
(aka '__storage32 struct _EXCEPTION_REGISTRATION_RECORD *') changes address space of pointer
wine_rtl_unwind( frame, record, unwind_target );
^~~~~
../dlls/winecrt0/exception.c:59:64: note: passing argument to parameter 'frame' here
void cdecl wine_rtl_unwind( EXCEPTION_REGISTRATION_RECORD frame, EXCEPTION_RECORD record,
^
../dlls/winecrt0/exception.c:113:31: error: passing 'struct _EXCEPTION_RECORD storage32' to parameter of type
'storage32 EXCEPTION_RECORD ' (aka 'storage32 struct _EXCEPTION_RECORD *') changes address space of pointer
wine_rtl_unwind( frame, record, unwind_target );
^~
../dlls/winecrt0/exception.c:59:89: note: passing argument to parameter 'record' here
void cdecl wine_rtl_unwind( EXCEPTION_REGISTRATION_RECORD frame, EXCEPTION_RECORD record,
^
5 errors generated.
make: *** [Makefile:156543: dlls/winecrt0/exception.o] エラー 1