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

"Checking for SDL2 sanity : no" despite SDL being there #1571

Closed
relt-1 opened this issue Jan 12, 2024 · 14 comments
Closed

"Checking for SDL2 sanity : no" despite SDL being there #1571

relt-1 opened this issue Jan 12, 2024 · 14 comments

Comments

@relt-1
Copy link

relt-1 commented Jan 12, 2024

I have SDL-devel downloaded, yet it doesnt work.

obraz

Here is the command and log:

Q:\DESTINATION\xash3d-fwgs>python waf configure -T release --sdl2="Q:/SDL/SDL2-2.28.5" --prefix="../game/"
Setting top to                                          : Q:\DESTINATION\xash3d-fwgs
Setting out to                                          : Q:\DESTINATION\xash3d-fwgs\build
Build type                                              : humanrights
LTO build                                               : no
PolyOpt build                                           : no
Checking for 'msvc' (C compiler)                        : C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86\CL.exe
Target OS                                               : win32
Target CPU                                              : x86
Target binfmt                                           : pe
Checking for 'msvc' (C++ compiler)                      : C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86\CL.exe
Target OS                                               : win32
Target CPU                                              : x86
Target binfmt                                           : pe
Checking for program 'cmake'                            : c:\devkitPro\msys2\usr\bin\cmake.exe
Checking for program 'git'                              : c:\devkitPro\msys2\usr\bin\git.exe
Checking git hash                                       : Traceback (most recent call last):
  File "<string>", line 69, in <module>
  File "<string>", line 27, in run
51d4716b
OSError: [Errno 22] Invalid argument
Checking for program 'cmake'                            : c:\devkitPro\msys2\usr\bin\cmake.exe
Checking if 'msvc' can target 32-bit                    : no
Checking for required C flags                           : yes
Checking for required C++ flags                         : yes
Checking for header stdint.h                            : yes
Checking for header alloca.h                            : not found
Checking for header malloc.h                            : yes
Checking for MSVC library                               : user32
Checking for MSVC library                               : shell32
Checking for MSVC library                               : gdi32
Checking for MSVC library                               : advapi32
Checking for MSVC library                               : dbghelp
Checking for MSVC library                               : psapi
Checking for MSVC library                               : ws2_32
Checking for header tgmath.h                            : yes
Checking if tgmath.h is usable                          : yes
Checking for program 'pkg-config'                       : c:\devkitPro\msys2\usr\bin\pkg-config.exe
Checking for 'opus'                                     : Traceback (most recent call last):
  File "<string>", line 69, in <module>
  File "<string>", line 27, in run
OSError: [Errno 22] Invalid argument
not found
--> public                                              : in progress
<-- public                                              : done
--> filesystem                                          : in progress
<-- filesystem                                          : done
--> engine                                              : in progress
Configuring SDL2 by provided path                       : yes: ['SDL2'], ['Q:\\SDL\\SDL2-2.28.5\\lib\\x86'], ['Q:\\SDL\\SDL2-2.28.5\\include', 'Q:\\SDL\\SDL2-2.28.5\\include\\SDL2']
Checking for SDL2 sanity                                : no
SDL2 not available! If you want to build dedicated server, specify --dedicated
(complete log in Q:\DESTINATION\xash3d-fwgs\build\config.log)

config.log

@a1batross
Copy link
Member

Checking for SDL2 sanity
==>

				#define SDL_MAIN_HANDLED
				#include <SDL.h>
				int main( void )
				{
					SDL_Init( SDL_INIT_EVERYTHING );
					return 0;
				}
<==
[1/2] Processing �[32mbuild\conf_check_2cf3ea823e7ec3be6708c6d2bd15319d\test.c�[0m

out: Execution failure: [Errno 22] Invalid argument
from Q:\DESTINATION\xash3d-fwgs\engine: Test does not build: Traceback (most recent call last):
  File "Q:\DESTINATION\xash3d-fwgs\waf3-2.0.26-84a26fddc7f40e4e4f00569f36be455a\waflib\Configure.py", line 606, in run_build
    bld.compile()
  File "Q:\DESTINATION\xash3d-fwgs\waf3-2.0.26-84a26fddc7f40e4e4f00569f36be455a\waflib\Build.py", line 359, in compile
    raise Errors.BuildError(self.producer.error)
waflib.Errors.BuildError: Build failed
 -> task in 'testprog' failed with exit status 1 (run with -v to display more information)

That's super weird. I remember another reports with the build failing because of Windows throwing EINVAL

@relt-1
Copy link
Author

relt-1 commented Jan 12, 2024

after i did --skip-sdl2-sanity-check this happened while building:

Q:\DESTINATION\xash3d-fwgs>python waf build install
Build commands will be stored in build\compile_commands.json
Waf: Entering directory `Q:\DESTINATION\xash3d-fwgs\build'
[151/416] Linking build\filesystem\filesystem_stdio.dll
[283/416] Linking build\engine\xash.dll
[307/416] Linking build\ref\gl\ref_gl.dll
[331/416] Linking build\ref\soft\ref_soft.dll
[333/416] Processing 3rdparty\mainui\menus\Video.cpp
[334/416] Processing 3rdparty\mainui\controls\PlayerModelView.cpp
[337/416] Processing 3rdparty\mainui\CFGScript.cpp
[338/416] Processing 3rdparty\mainui\menus\TouchEdit.cpp
[339/416] Processing 3rdparty\mainui\menus\SaveLoad.cpp
[341/416] Processing 3rdparty\mainui\menus\Multiplayer.cpp
[342/416] Processing 3rdparty\mainui\EventSystem.cpp
[343/416] Processing 3rdparty\mainui\menus\Zoo.cpp
[345/416] Processing 3rdparty\mainui\menus\CustomGame.cpp
[346/416] Processing 3rdparty\mainui\menus\Audio.cpp
[349/416] Processing 3rdparty\mainui\menus\Touch.cpp
[352/416] Processing 3rdparty\mainui\Btns.cpp
[353/416] Processing 3rdparty\mainui\menus\ServerBrowser.cpp
[354/416] Processing 3rdparty\mainui\font\BitmapFont.cpp
[355/416] Processing 3rdparty\mainui\controls\Action.cpp
[356/416] Processing 3rdparty\mainui\controls\SpinControl.cpp
[357/416] Processing 3rdparty\mainui\Utils.cpp
[358/416] Processing 3rdparty\mainui\font\BaseFontBackend.cpp
[359/416] Processing 3rdparty\mainui\udll_int.cpp
[360/416] Processing 3rdparty\mainui\controls\BaseClientWindow.cpp
LINK : Q:\DESTINATION\xash3d-fwgs\build\filesystem\filesystem_stdio.dll not found or not built by the last incremental link; performing full link
   Creating library filesystem\filesystem_stdio.lib and object filesystem\filesystem_stdio.exp

[361/416] Processing 3rdparty\mainui\menus\Main.cpp
LINK : Q:\DESTINATION\xash3d-fwgs\build\ref\gl\ref_gl.dll not found or not built by the last incremental link; performing full link
   Creating library ref\gl\ref_gl.lib and object ref\gl\ref_gl.exp

LINK : Q:\DESTINATION\xash3d-fwgs\build\ref\soft\ref_soft.dll not found or not built by the last incremental link; performing full link
   Creating library ref\soft\ref_soft.lib and object ref\soft\ref_soft.exp

[362/416] Processing 3rdparty\mainui\menus\VideoOptions.cpp
CFGScript.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Btns.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
udll_int.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Action.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
BitmapFont.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
EventSystem.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Video.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
SpinControl.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
TouchEdit.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
BaseClientWindow.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
SaveLoad.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Zoo.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
BaseFontBackend.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\miniutl\minbase_endian.h(104): warning C4005: 'LittleFloat': macro redefinition
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\sdk_includes\common\xash3d_types.h(156): note: see previous definition of 'LittleFloat'
Touch.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
CustomGame.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
PlayerModelView.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Audio.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Multiplayer.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\Multiplayer.cpp(77): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\Multiplayer.cpp(84): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
ServerBrowser.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\ServerBrowser.cpp(531): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\ServerBrowser.cpp(572): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\ServerBrowser.cpp(593): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\ServerBrowser.cpp(602): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
Main.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\Main.cpp(510): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\Main.cpp(557): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
VideoOptions.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\VideoOptions.cpp(283): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
Q:\DESTINATION\xash3d-fwgs\3rdparty\mainui\menus\VideoOptions.cpp(291): warning C5208: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes
Utils.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\vcruntime_new.h(165): error C3750: ']': unexpected token in attribute specifier
LINK : Q:\DESTINATION\xash3d-fwgs\build\engine\xash.dll not found or not built by the last incremental link; performing full link
   Creating library engine\xash.lib and object engine\xash.exp

Waf: Leaving directory `Q:\DESTINATION\xash3d-fwgs\build'
Build failed
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)
 -> task in 'menu' failed with exit status 2 (run with -v to display more information)

@a1batross
Copy link
Member

Could you post the configure log with the --skip-sdl2-sanity-check? Also add -vv, to see the exact compiler invocations.

Keep in mind, skipping sanity check is more of a crutch than an actual solution. EINVAL could've happened somewhere else, failing some other check, resulting in non-compilable state.

@relt-1
Copy link
Author

relt-1 commented Jan 12, 2024

Here you go:
config.log

@a1batross
Copy link
Member

Yeah, EINVAL failed C++11 detection, making mainui_cpp build to fail back to a workaround that was more suitable for MSVC6...

Try to set WAF_NO_PREFORK to 1 before running configure, like this:

set WAF_NO_PREFORK=1
python waf configure ...

@relt-1
Copy link
Author

relt-1 commented Jan 12, 2024

it works now! thank you!

@relt-1
Copy link
Author

relt-1 commented Jan 12, 2024

Closing

@relt-1 relt-1 closed this as completed Jan 12, 2024
@a1batross
Copy link
Member

Could I ask you, what are you compiling your own engine build for? :)

If you need some specific feature for your game, I would like to add it to main branch, to ensure easier migrations in the future.

@relt-1
Copy link
Author

relt-1 commented Jan 17, 2024

Oh sorry i didn't read your reply. Me and a couple other people are trying to transform the engine into Source without using any more leaked code (we also want to remove all the valve stuff and replace it with our own implementation). I don't think that's in the scope of your project though. If you want anything from our fork you can ask us or add it yourself.
https://github.com/PROJECT-DESTINATION/xash3d-dest

@a1batross
Copy link
Member

@relt-1 I see. Good luck!

I would like to see any contributions from your fork, especially new clean reimplementations! ;)

@relt-1
Copy link
Author

relt-1 commented Jan 18, 2024

We will also kind of need your help with WAF, and making it use the SNC compiler for PS3. Specifically to see if there is any way of making it support that compiler without modifying waf's internals.

@Velaron
Copy link
Member

Velaron commented Jan 18, 2024

check "scripts/waifulib/xcompile.py"

@relt-1
Copy link
Author

relt-1 commented Jan 18, 2024

Let's move to discord rather than spam this issue 😆 My @ is x_relt_x

@a1batross
Copy link
Member

Better keep discussions in public space. GitHub is indexed by all search engines out there, and Discord is unindexable at all. If you want to, you can just create a new issue asking for help.

PS3

I don't think the port is gonna be easy as this system is big endian exclusive. There is some work on big endian port in old engine repo, but it hasn't been ported here.

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

No branches or pull requests

3 participants