randrew / uxn32

Uxn emulator for Windows and Wine
175 stars 7 forks source link

Unable to build in Arch Linux using Wine. #22

Open Ismael-VC opened 2 months ago

Ismael-VC commented 2 months ago

Using this command:

winemaker --wine32 uxn32.dsp && make

Error:

/usr/bin/ld: /usr/bin/../lib32/wine/i386-unix/libucrtbase.a(crt_main.o): direct GOT relocation R_386_GOT32X against `_configure_narrow_argv' without base register can not be used when making a shared object
/usr/bin/ld: failed to set dynamic section sizes: Success
collect2: error: ld returned 1 exit status
winegcc: /usr/bin/gcc failed
make: *** [Makefile:119: uxn32.exe] Error 2

Log:

➜  uxn32 git:(master) winemaker --wine32 uxn32.dsp
Winemaker 0.8.4
Copyright 2000-2004 François Gouget <fgouget@codeweavers.com> for CodeWeavers
Copyright 2004 Dimitrie O. Paun
Copyright 2009-2012 André Hentschel
C compiler option D _WIN32_WINNT=0x0400 not implemented
Fixing the source files...
  ./uxn32.c
  ./uxn_core.c
  ./uxn32.rc
  ./resource.h
  ./uxn_core.h
  ./uxn_lz.h
Generating project files...
  .

➜  uxn32 git:(master) ✗ make
winegcc -c  -W -g -O0 -mno-cygwin -m32  -D_DEBUG -DWIN32 -D_WINDOWS -D_MBCS   -o uxn32.o uxn32.c
uxn32.c: In function ‘WinMain’:
uxn32.c:2770:37: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘int (__attribute__((stdcall)) *)(void)’} to ‘BOOL (__attribute__((stdcall)) *)(struct tagTRACKMOUSEEVENT *)’ {aka ‘int (__attribute__((stdcall)) *)(struct tagTRACKMOUSEEVENT *)’} [-Wcast-function-type]
 2770 |         if (!(Ptr_TrackMouseEvent = (Type_TrackMouseEvent *)GetProcAddress(GetModuleHandle(TEXT("user32.dll")), "TrackMouseEvent")))
      |                                     ^
uxn32.c:2771:39: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘int (__attribute__((stdcall)) *)(void)’} to ‘BOOL (__attribute__((stdcall)) *)(struct tagTRACKMOUSEEVENT *)’ {aka ‘int (__attribute__((stdcall)) *)(struct tagTRACKMOUSEEVENT *)’} [-Wcast-function-type]
 2771 |                 Ptr_TrackMouseEvent = (Type_TrackMouseEvent *)GetProcAddress(GetModuleHandle(TEXT("comctl32.dll")), "_TrackMouseEvent");
      |                                       ^
uxn32.c:2784:36: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘int (__attribute__((stdcall)) *)(void)’} to ‘WCHAR * (__attribute__((stdcall)) *)(void)’ {aka ‘short unsigned int * (__attribute__((stdcall)) *)(void)’} [-Wcast-function-type]
 2784 |         if ((Ptr_GetCommandLineW = (Type_GetCommandLineW *)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetCommandLineW")) &&
      |                                    ^
uxn32.c:2785:43: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘int (__attribute__((stdcall)) *)(void)’} to ‘WCHAR ** (__attribute__((stdcall)) *)(const WCHAR *, int *)’ {aka ‘short unsigned int ** (__attribute__((stdcall)) *)(const short unsigned int *, int *)’} [-Wcast-function-type]
 2785 |                 (Ptr_CommandLineToArgvW = (Type_CommandLineToArgvW *)GetProcAddress(GetModuleHandle(TEXT("shell32.dll")), "CommandLineToArgvW")) &&
      |                                           ^
winegcc -c  -W -g -O0 -mno-cygwin -m32  -D_DEBUG -DWIN32 -D_WINDOWS -D_MBCS   -o uxn_core.o uxn_core.c
wrc    -D_DEBUG -DWIN32 -D_WINDOWS -D_MBCS   -fouxn32.res uxn32.rc
winegcc -mwindows -mno-cygwin -m32 -o uxn32.exe ./uxn32.o ./uxn_core.o  ./uxn32.res    -luser32 -lgdi32 -lshell32 -lshlwapi -lcomdlg32 -lcomctl32 -lwinmm   -lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid
/usr/bin/ld: /usr/bin/../lib32/wine/i386-unix/libucrtbase.a(crt_main.o): direct GOT relocation R_386_GOT32X against `_configure_narrow_argv' without base register can not be used when making a shared object
/usr/bin/ld: failed to set dynamic section sizes: Success
collect2: error: ld returned 1 exit status
winegcc: /usr/bin/gcc failed
make: *** [Makefile:119: uxn32.exe] Error 2
randrew commented 2 months ago

That looks like a bug in Wine or GCC or LD. It works for me on my Linux install from a couple of years ago. I have no way of fixing this or troubleshooting it, so you'll have to ask on the Wine list or something.

On September 19, 2024, Mel Massadian @.***> wrote:

Using this command:

winemaker --wine32 uxn32.dsp && make

Error:

/usr/bin/ld: /usr/bin/../lib32/wine/i386-unix/libucrtbase.a(crt_main.o): direct GOT relocation R_386_GOT32X against `_configure_narrow_argv' without base register can not be used when making a shared object /usr/bin/ld: failed to set dynamic section sizes: Success collect2: error: ld returned 1 exit status winegcc: /usr/bin/gcc failed make: *** [Makefile:119: uxn32.exe] Error 2

Log:

➜ uxn32 git:(master) winemaker --wine32 uxn32.dsp Winemaker 0.8.4 Copyright 2000-2004 François Gouget @.***> for CodeWeavers Copyright 2004 Dimitrie O. Paun Copyright 2009-2012 André Hentschel C compiler option D _WIN32_WINNT=0x0400 not implemented Fixing the source files... ./uxn32.c ./uxn_core.c ./uxn32.rc ./resource.h ./uxn_core.h ./uxn_lz.h Generating project files... .

➜ uxn32 git:(master) ✗ make winegcc -c -W -g -O0 -mno-cygwin -m32 -D_DEBUG -DWIN32 -D_WINDOWS -D_MBCS -o uxn32.o uxn32.c uxn32.c: In function ‘WinMain’: uxn32.c:2770:37: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘int (attribute((stdcall)) )(void)’} to ‘BOOL (attribute((stdcall)) )(struct tagTRACKMOUSEEVENT )’ {aka ‘int (attribute((stdcall)) )(struct tagTRACKMOUSEEVENT )’} [-Wcast-function-type] 2770 | if (!(Ptr_TrackMouseEvent = (Type_TrackMouseEvent )GetProcAddress(GetModuleHandle(TEXT("user32.dll")), "TrackMouseEvent"))) | ^ uxn32.c:2771:39: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘int (attribute((stdcall)) )(void)’} to ‘BOOL (attribute((stdcall)) )(struct tagTRACKMOUSEEVENT )’ {aka ‘int (attribute((stdcall)) )(struct tagTRACKMOUSEEVENT )’} [-Wcast-function-type] 2771 | Ptr_TrackMouseEvent = (Type_TrackMouseEvent )GetProcAddress(GetModuleHandle(TEXT("comctl32.dll")), "_TrackMouseEvent"); | ^ uxn32.c:2784:36: warning: cast between incompatible function types from ‘FARPROC’ {aka ‘int (attribute((stdcall)) )(void)’} to ‘WCHAR (attribute((stdcall)) *)(void)’ {aka ‘short unsigned int

— Reply to this email directly, view it on GitHub https://github.com/randrew/uxn32/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAGLSCTUKRGA6FQNKCGFUDZXMIQZAVCNFSM6AAAAABOQPOP26VHI2DSMVQWIX3LMV43ASLTON2WKOZSGUZTOMBWHE4DCOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>