axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

Compilation error | xxhash missing stdalign.h #1246

Closed gimmedaname closed 1 year ago

gimmedaname commented 1 year ago
halx99 commented 1 year ago

The axmol will auto choose properly ISO C standard, don't specific by command line

halx99 commented 1 year ago

Please provide complete cmake generate output

gimmedaname commented 1 year ago
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.36.32532.0
-- The CXX compiler identification is MSVC 19.36.32532.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using system env var _AX_ROOT=C:/dev/battler_axmol/axmol
-- CMAKE_HOST_SYSTEM_VERSION: 10.0.22621
-- CMAKE_SYSTEM_VERSION: 10.0.22621
-- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION: 10.0.19041.0
-- CMAKE_C_STANDARD=11
-- CMAKE_CXX_STANDARD=20
-- Using Windows MSVC generate axmol project, MSVC_VERSION:1936
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe
-- The ASM_NASM compiler identification is unknown
-- Didn't find assembler
CMake Warning at axmol/cmake/Modules/AXConfigDefine.cmake:196 (message):
  The nasm compiler doesn't present on your system PATH, please download
  from: https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/
Call Stack (most recent call first):
  axmol/cmake/Modules/AXBuildSet.cmake:33 (include)
  CMakeLists.txt:56 (include)

-- CMAKE_HOST_SYSTEM_NAME:Windows
-- CMAKE_SYSTEM_NAME:Windows
-- CMAKE_GENERATOR_PLATFORM:x64
-- CMAKE_SYSTEM_PROCESSOR:AMD64
-- CMAKE_CXX_COMPILER_ID:MSVC
-- FUZZ_MSVC=TRUE, FULL_CLANG=
-- PROJECT_NAME:Battler
-- PROJECT_SOURCE_DIR:C:/dev/battler_axmol
-- _AX_ROOT_PATH:C:/dev/battler_axmol/axmol
-- CMAKE_MODULE_PATH:C:/dev/battler_axmol/axmol/cmake/Modules/
-- PROJECT_BINARY_DIR:C:/dev/battler_axmol/build
-- ENGINE_BINARY_PATH:C:/dev/battler_axmol/build/engine
-- PYTHON_PATH:C:/Python310/python.exe
-- _AX_COMMAND_PATH:C:/dev/battler_axmol/axmol/tools/console/bin/axmol
-- ARCH_ALIAS:x64
-- _AX_LUAJIT_ROOT:C:/dev/battler_axmol/axmol/tools/console/bin/../plugins/plugin_luacompile/bin
-- LUAJIT32_COMMAND:LUAJIT32_COMMAND-NOTFOUND
-- LUAJIT64_COMMAND:LUAJIT64_COMMAND-NOTFOUND
-- WINRT=
-- AX_ENABLE_VLC_MEDIA=OFF
-- _AX_MEDIA_SRC=C:/dev/battler_axmol/axmol/core/media/AndroidMediaEngine.cpp;C:/dev/battler_axmol/axmol/core/media/MFUtils.cpp;C:/dev/battler_axmol/axmol/core/media/MediaEngine.cpp;C:/dev/battler_axmol/axmol/core/media/MfMediaEngine.cpp;C:/dev/battler_axmol/axmol/core/media/VlcMediaEngine.cpp;C:/dev/battler_axmol/axmol/core/media/WmfMediaEngine.cpp
-- Performing Test AX_HAVE_SSE2_SWITCH
-- Performing Test AX_HAVE_SSE2_SWITCH - Failed
-- Performing Test AX_HAVE_AVX2_INTRINSICS
-- Performing Test AX_HAVE_AVX2_INTRINSICS - Success
-- Performing Test AX_HAVE_SSE42_INTRINSICS
-- Performing Test AX_HAVE_SSE42_INTRINSICS - Success
-- Performing Test AX_HAVE_SSE41_INTRINSICS
-- Performing Test AX_HAVE_SSE41_INTRINSICS - Success
-- Performing Test AX_HAVE_SSE2_INTRINSICS
-- Performing Test AX_HAVE_SSE2_INTRINSICS - Success
-- Looking for arm_neon.h
-- Looking for arm_neon.h - not found
CMake Warning (dev) at axmol/thirdparty/CMakeLists.txt:129 (message):

  AX_ISA_SIMD=avx2,AX_HAVE_AVX2_INTRINSICS=1,AX_HAVE_SSE42_INTRINSICS=1,AX_HAVE_SSE41_INTRINSICS=1,AX_HAVE_SSE2_INTRINSICS=1,AX_HAVE_NEON_INTRINSICS=
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Using plainlua https://lua.org
-- Version: 10.0.0
-- Build type:
Configuring Chipmunk2D version 7.0.3
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found ZLIB: C:/dev/battler_axmol/axmol/thirdparty/zlib/prebuilt/win/x64/zlib.lib (found version "1.2.13")
-- Found PNG: png (found version "1.6.40")
CMake Warning (dev) at axmol/thirdparty/astcenc/CMakeLists.txt:84 (message):
  ASTC_ISA_SIMD=avx2
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Performing Test HAVE_STDC_FORMAT_MACROS
-- Performing Test HAVE_STDC_FORMAT_MACROS - Success
-- Performing Test HAVE___RESTRICT
-- Performing Test HAVE___RESTRICT - Success
-- Performing Test HAVE_LIBATOMIC
-- Performing Test HAVE_LIBATOMIC - Failed
-- Performing Test HAVE_PERMISSIVE_SWITCH
-- Performing Test HAVE_PERMISSIVE_SWITCH - Success
-- Looking for xmmintrin.h
-- Looking for xmmintrin.h - found
-- Looking for emmintrin.h
-- Looking for emmintrin.h - found
-- Looking for pmmintrin.h
-- Looking for pmmintrin.h - found
-- Looking for smmintrin.h
-- Looking for smmintrin.h - found
-- Looking for arm_neon.h
-- Looking for arm_neon.h - not found
-- Performing Test HAVE_SSE_INTRINSICS
-- Performing Test HAVE_SSE_INTRINSICS - Success
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for cpuid.h
-- Looking for cpuid.h - not found
-- Looking for intrin.h
-- Looking for intrin.h - found
-- Looking for guiddef.h
-- Looking for guiddef.h - found
-- Looking for pow in m
-- Looking for pow in m - not found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Performing Test HAVE_CPUID_INTRINSIC
-- Performing Test HAVE_CPUID_INTRINSIC - Success
-- Looking for posix_memalign
-- Looking for posix_memalign - not found
-- Looking for _aligned_malloc
-- Looking for _aligned_malloc - found
-- Looking for proc_pidpath
-- Looking for proc_pidpath - not found
-- Looking for getopt
-- Looking for getopt - not found
-- Could NOT find PulseAudio (missing: PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR)
-- Looking for mmdeviceapi.h
-- Looking for mmdeviceapi.h - found
-- Could NOT find JACK (missing: JACK_LIBRARY JACK_INCLUDE_DIR)
-- Could NOT find OpenSL (missing: OPENSL_LIBRARY OPENSL_INCLUDE_DIR OPENSL_ANDROID_INCLUDE_DIR)
-- Could NOT find PortAudio (missing: PORTAUDIO_LIBRARY PORTAUDIO_INCLUDE_DIR)
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.41.0.windows.1")
--
-- Building OpenAL with support for the following backends:
--     WASAPI, Null
--
-- Building with support for CPU extensions:
--     Default, SSE, SSE2, SSE3, SSE4.1
--
-- Building with legacy EAX extension support
--
-- Embedding HRTF datasets
--
-- NOT installing library and headers
-- Installing sample configuration
-- Installing HRTF data files
-- Installing AmbDec presets
--
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Including Win32 support
-- AX_USE_ALSOFT=ON
CMake axmol target_precompile_headers
Feeds used:
  C:\Users\romat\.nuget\packages\
  https://api.nuget.org/v3/index.json

Attempting to gather dependency information for package 'Microsoft.Web.WebView2.1.0.992.28' with respect to project 'C:\dev\battler_axmol\build\packages', targeting 'Any,Version=v0.0'
Gathering dependency information took 1.64 sec
Attempting to resolve dependencies for package 'Microsoft.Web.WebView2.1.0.992.28' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Microsoft.Web.WebView2.1.0.992.28'
Resolved actions to install package 'Microsoft.Web.WebView2.1.0.992.28'
Retrieving package 'Microsoft.Web.WebView2 1.0.992.28' from 'C:\Users\romat\.nuget\packages\'.
Adding package 'Microsoft.Web.WebView2.1.0.992.28' to folder 'C:\dev\battler_axmol\build\packages'
Added package 'Microsoft.Web.WebView2.1.0.992.28' to folder 'C:\dev\battler_axmol\build\packages'
Successfully installed 'Microsoft.Web.WebView2 1.0.992.28' to C:\dev\battler_axmol\build\packages
Executing nuget actions took 256 ms
-- Enabled axmol extensions:cocostudio;ImGui;fairygui;DragonBones;spine;physics-nodes;particle3d;assets-manager;GUI;
-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/battler_axmol/build
gimmedaname commented 1 year ago

I suppose that the problem is in win sdk's version Here it is stated that C11 Compiler support for C11 and C17 requires Visual Studio 2019 version 16.8 or higher. Except as noted, C11 and C17 library support requires Windows SDK build 10.0.20211.0 or higher. For more information on how to install support for C11 and C17, see [Install C11 and C17 support in Visual Studio](https://learn.microsoft.com/en-us/cpp/overview/install-c17-support?view=msvc-170). Successfully compiled the project after installing win sdk 10.0.22621.0 and regenerating solution

gimmedaname commented 1 year ago

🦑

halx99 commented 1 year ago

The commit: https://github.com/axmolengine/axmol/commit/86015cea6db2c2b371ebcc269887dbad67df0aa9 should fix this issue