Hello,
I am trying to compile the source code for GIMX, following these instructions: https://gimx.fr/wiki/index.php?title=De ... on_Windows
Everything goes fine until the very last step, when I actually need to compile the code. Following the guide, I run the following commands in mingw64.exe:
cd GIMX-build/windows
./build.sh
Here is the full output from the console:
https://pastebin.com/CZirnEFp
I'm pretty new to all of this, but I'm pretty sure the bit below is the relevant part. It seems like the compiler is failing due to thinking there is some error in the sources code. I've tried to dig through it and figure out what the problem may be, but unfortunately I don't quite know enough about what I'm looking at. Any chance anyone can help identify the problem, or at least point me in the right direction to start hunting it down on my own?
Thanks!
src/windows/events.c:179:1: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'gtime' {aka 'long long unsigned int'} [-Werror=format=]
179 | GPERF_LOG(ev_sync_process);
| ^ ~~~~~~~~~~~~~~~~~
../gimxcommon/include/gperf.h:13:23: note: in definition of macro 'GPERF_STR'
13 | #define GPERF_STR(s) #s
| ^
../gimxcommon/include/gperf.h:87:20: note: in expansion of macro 'GPERF_XSTR'
87 | printf(GPERF_XSTR(NAME)": count = "GTIME_FS", average = "GTIME_FS", worst = "GTIME_FS"\n", gperf_##NAME.count, gperf_##NAME.sum / gperf_##NAME.count, gperf_##NAME.worst); \
| ^~~~~~~~~~
src/windows/events.c:179:5: note: in expansion of macro 'GPERF_LOG'
179 | GPERF_LOG(ev_sync_process);
| ^~~~~~~~~
cc1.exe: all warnings being treated as errors
make[2]: *** [<builtin>: src/windows/events.o] Error 1
make[2]: Leaving directory '/home/Andre/GIMX-build/windows/GIMX/shared/gimxinput'
make[1]: *** [Makefile:35: build-gimxinput] Error 2
make[1]: Leaving directory '/home/Andre/GIMX-build/windows/GIMX/shared'
make: *** [Makefile:15: build-shared] Error 2
make: Leaving directory '/home/Andre/GIMX-build/windows/GIMX'
Trouble Compiling Code
- kaiba_seto2004
- Posts: 553
- Joined: Sat Jul 15, 2017 9:15 am
Re: Trouble Compiling Code
I've never compiled gimx success on Win but Linux. I think these scripts need to be rewrited up to new version
PS4 enthusiast.
Re: Trouble Compiling Code
Thanks for the reply!
I may go ahead and install linux on a spare computer, then, and see if I have any better luck. Is it possible to create a windows installer from linux? I'm assuming not, in which case someone must be compiling the source code on windows, otherwise there wouldn't be a windows installer available to download, right?
As a side note, I've also tried installing the eclipse IDE, and compiling the source code from there. I assumed that wouldn't make a difference, and it appears to be the case, as I get essentially the same errors showing up in eclipse's console when I try to build the project. I tried importing older versions of the source code into eclipse, but those wouldn't build either.
Thanks again for the help!
I may go ahead and install linux on a spare computer, then, and see if I have any better luck. Is it possible to create a windows installer from linux? I'm assuming not, in which case someone must be compiling the source code on windows, otherwise there wouldn't be a windows installer available to download, right?
As a side note, I've also tried installing the eclipse IDE, and compiling the source code from there. I assumed that wouldn't make a difference, and it appears to be the case, as I get essentially the same errors showing up in eclipse's console when I try to build the project. I tried importing older versions of the source code into eclipse, but those wouldn't build either.
Thanks again for the help!
Re: Trouble Compiling Code
Update: I installed ubuntu alongside windows 10 on my computer, and the guide for compiling the code on linux works fine.
Re: Trouble Compiling Code
Moved to development section.
The compilation issues are probably due to using a newer compiler. GIMX 8.0 was built using GCC 9.2.
The compilation issues are probably due to using a newer compiler. GIMX 8.0 was built using GCC 9.2.
GIMX creator
Re: Trouble Compiling Code
I just fixed the compilation issue. Running build.sh should work fine.
GIMX creator
Re: Trouble Compiling Code
Again there seems to be some problems with compilation for Windows (Linux works ok).
But it seems more like a "compiler version issue" than problems in the code.
I tried to build BRANCH master and v8.0 but outcome is similar.
Is there any recommendation how to setup minigw64 environment to be able to compile GIMX for Windows?
P.S. it need version 5 of INNO and it has to be installed into c:\Program Files (not x86!).
EDIT:
When compiling tag v8.0 with latest version of minigw64 (GCC 12.1.0) it is necessary to apply following changes:
- Install INNO v5 in c:\Program Files (not Program Files (x86) !!)
- Remove treating of Warnings as errors (Go through various Makedef files and remove -Werror switch from CFLAGS)
- define WINVER 0x0602 or greater (W10 is 0x0A00) into GIMX/core/gimx.c before inclusion of windows.h otherwise POINTER_TYPE_INFO and some other types are not defined
While debugging split repository cloning and build part. If you notice some files are throwing errors try to find local Makedefs and remove -Werror switch from inside. If you would like to play with specific version change BRANCH to v8.0 for example.
Happy modding
Code: Select all
make -C gimxcontroller UHID=
make[2]: Entering directory '/home/r!dEr/GIMX-build/windows/GIMX/shared/gimxcontroller'
cc -fPIC -Iinclude -Wall -Wextra -Werror -O3 -D__USE_MINGW_ANSI_STDIO=0 -I../ -DGLOG_NAME=gimxcontroller -c -o src/controller.o src/controller.c
src/controller.c: In function 'controller_get_axis_index':
src/controller.c:361:10: error: the comparison will always evaluate as 'true' for the address of 'name' will never be NULL [-Werror=address]
361 | if(controllers[C_TYPE_SIXAXIS]->axes[i].name)
| ^~~~~~~~~~~
In file included from src/controller.c:6:
src/../include/controller.h:46:14: note: 'name' declared here
46 | const char name[AXIS_NAME_MAX_SIZE];
| ^~~~
cc1.exe: all warnings being treated as errors
make[2]: *** [<builtin>: src/controller.o] Error 1
make[2]: Leaving directory '/home/r!dEr/GIMX-build/windows/GIMX/shared/gimxcontroller'
make[1]: *** [Makefile:35: build-gimxcontroller] Error 2
make[1]: Leaving directory '/home/r!dEr/GIMX-build/windows/GIMX/shared'
make: *** [Makefile:15: build-shared] Error 2
I tried to build BRANCH master and v8.0 but outcome is similar.
Is there any recommendation how to setup minigw64 environment to be able to compile GIMX for Windows?
P.S. it need version 5 of INNO and it has to be installed into c:\Program Files (not x86!).
EDIT:
When compiling tag v8.0 with latest version of minigw64 (GCC 12.1.0) it is necessary to apply following changes:
- Install INNO v5 in c:\Program Files (not Program Files (x86) !!)
- Remove treating of Warnings as errors (Go through various Makedef files and remove -Werror switch from CFLAGS)
- define WINVER 0x0602 or greater (W10 is 0x0A00) into GIMX/core/gimx.c before inclusion of windows.h otherwise POINTER_TYPE_INFO and some other types are not defined
While debugging split repository cloning and build part. If you notice some files are throwing errors try to find local Makedefs and remove -Werror switch from inside. If you would like to play with specific version change BRANCH to v8.0 for example.
Happy modding
-
- Posts: 1
- Joined: Tue Apr 23, 2024 5:24 am
Re: Trouble Compiling Code
Hey There,
I tried everything, but Eclipes IDE errors/problems hit me hard.
Do you happend to have any guidance on how to compile it for Windows?
Thanks
I tried everything, but Eclipes IDE errors/problems hit me hard.
Do you happend to have any guidance on how to compile it for Windows?
Thanks