Closed gfeyer closed 3 months ago
3. create new project: axmol new -p org.axmol.hellocpp -d D:\dev\projects\ -l cpp HelloCpp 4. build project: axmol build -p win32
Are these exactly what you actually typed into the console? The reason I ask is that the log dump is showing a completely different project path:
proj_dir=N:\cpp\axgames\hellocpp\HelloCpp
Now, with Windows 11 Pro (build 22631.3447), Powershell 7.4.2, CMake 3.29.5 and Visual Studio 17.10.1, a new project in Axmol 2.1.3 compiled perfectly using both the console build and from within VS2022. The precise command order used:
cd c:\dev\projects
axmol new -p org.axmol.hellocpp -d . -l cpp Issue1973
cd .\Issue1973\
axmol build -p win32
Result:
Creating library C:/dev/projects/Issue1973/build_x64/Release/Issue1973.lib and object C:/dev/projects/Issue1973/build_x64/Release/Issue1973.exp
Issue1973.vcxproj -> C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\Issue1973.exe
MSBuild version 17.10.4+10fbfbf2e for .NET Framework
Syncing resources for Issue1973 ...
Syncing resources for Issue1973 ...
fsync.ps1: Symlink C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\Content ===> C:\dev\projects\Issue1973\Content exists
fsync.ps1: Symlink C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\axslc ===> C:\dev\projects\Issue1973\build_x64\runtime\axslc exists
ConvertUTF.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\ConvertUTF.lib
fmt.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\fmt.lib
clipper2.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\clipper2.lib
alcommon.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\alcommon.lib
astcenc.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\astcenc.lib
box2d.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\box2d.lib
llhttp.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\llhttp.lib
chipmunk.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\chipmunk.lib
ogg.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\ogg.lib
glad.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\glad.lib
poly2tri.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\poly2tri.lib
pugixml.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\pugixml.lib
glfw.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\glfw.lib
simdjson.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\simdjson.lib
png.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\png.lib
recast.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\recast.lib
websocket-parser.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\websocket-parser.lib
freetype.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\freetype.lib
xxhash.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\xxhash.lib
unzip.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\unzip.lib
yasio.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\yasio.lib
fastlz.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\fastlz.lib
bullet.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\bullet.lib
webp.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\webp.lib
OpenAL.vcxproj -> C:\dev\projects\Issue1973\build_x64\bin\Release\OpenAL32.dll
axmol.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\axmol.lib
JSONDefault.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\JSONDefault.lib
assets-manager.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\assets-manager.lib
SDFGen.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\SDFGen.lib
ImGui.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\ImGui.lib
physics-nodes.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\physics-nodes.lib
GUI.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\GUI.lib
spine.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\spine.lib
DragonBones.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\DragonBones.lib
cocostudio.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\cocostudio.lib
fairygui.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\fairygui.lib
Inspector.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\Inspector.lib
particle3d.vcxproj -> C:\dev\projects\Issue1973\build_x64\lib\Release\particle3d.lib
Issue1973.vcxproj -> C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\Issue1973.exe
1kiss: Build done
The only difference is that Axmol 2.1.3 was cloned from the github repo:
git clone https://github.com/axmolengine/axmol.git
cd axmol
git checkout -b v2.1.3 tags/v2.1.3
./setup.ps1
(Powershell closed and re-opened)
Hey @rh101 !
I followed your exact steps yet still stuck right at the linking part. This time I copy/pasted all the commands, in order as your suggestion above:
PS N:\cpp> git clone https://github.com/axmolengine/axmol.git
Cloning into 'axmol'...
remote: Enumerating objects: 63522, done.
remote: Counting objects: 100% (3421/3421), done.
remote: Compressing objects: 100% (1602/1602), done.
remote: Total 63522 (delta 1919), reused 3104 (delta 1716), pack-reused 60101
Receiving objects: 100% (63522/63522), 90.91 MiB | 21.38 MiB/s, done.
Resolving deltas: 100% (46837/46837), done.
Updating files: 100% (6221/6221), done.
PS N:\cpp> cd .\axmol\
PS N:\cpp\axmol> git checkout -b v2.1.3 tags/v2.1.3
Switched to a new branch 'v2.1.3'
PS N:\cpp\axmol> .\setup.ps1
powershell: N:\cpp\axmol\setup.ps1:174
Line |
174 | $execPolicy = powershell -Command 'Get-ExecutionPolicy'
| ~~~~~~~~~~
| The term 'powershell' is not recognized as a name of a cmdlet, function, script file, or
| executable program. Check the spelling of the name, or if a path was included, verify that the
| path is correct and try again.
axmol: Setting system installed powershell execution policy ''==>'Bypass', please click 'YES' on UAC dialog
1kiss: PowerShell 7.4.2 on Microsoft Windows 10.0.22631.0
1kiss: proj_dir=N:\cpp\axmol, external_prefix=N:\cpp\axmol\tools\external
1kiss: Downloading https://github.com/axmolengine/glslcc/releases/download/v1.9.5/glslcc-1.9.5-win64.zip to N:\cpp\axmol\tools\external\glslcc-1.9.5-win64.zip ...
1kiss: Using glslcc: N:\cpp\axmol\tools\external\glslcc\glslcc.exe, version: 1.9.5
1kiss: Using cmake: C:\Program Files\CMake\bin\cmake.exe, version: 3.29.5
1kiss: Downloading https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe to N:\cpp\axmol\tools\external\nuget\nuget.exe ...
1kiss: Using nuget: N:\cpp\axmol\tools\external\nuget\nuget.exe, version: 5.5.1
1kiss: setup successfully, please restart the terminal to make added system variables take effect
PS N:\cpp\axmol>
# powershell closed and reopened
PS N:\cpp\axgames> axmol new -p org.axmol.hellocpp -d . -l cpp Issue1973
axmol: Creating project Issue1973 ...
axmol: ==> packageName: org.axmol.hellocpp
axmol: ==> destinationPath: N:\cpp\axgames\Issue1973
axmol: ==> lang: cpp
axmol: ==> is_portrait: False
axmol: Create project Issue1973 done.
PS N:\cpp\axgames> cd .\Issue1973\
PS N:\cpp\axgames\Issue1973> axmol build -p win32
axmol: -p win32 -d: N:\cpp\axgames\Issue1973
1kiss: PowerShell 7.4.2 on Microsoft Windows 10.0.22631.0
1kiss:
Name Value
---- -----
j 12
dll False
O -1
i False
a x64
xt cmake
xb {--target, Issue1973}
t
prefix N:\cpp\axmol\tools\external
xc {}
p win32
d N:\cpp\axgames\Issue1973
minsdk
sdk
u False
dm False
cc
1kiss: proj_dir=N:\cpp\axgames\Issue1973, external_prefix=N:\cpp\axmol\tools\external
1kiss: Using glslcc: N:\cpp\axmol\tools\external\glslcc\glslcc.exe, version: 1.9.5
1kiss: Using cmake: C:\Program Files\CMake\bin\cmake.exe, version: 3.29.5
1kiss: Using nuget: N:\cpp\axmol\tools\external\nuget\nuget.exe, version: 5.5.1
1kiss: Building target win32 on windows with toolchain msvc ...
1kiss: CONFIG_ALL_OPTIONS=-A x64 -D_1KFETCH_UPGRADE=FALSE, Count=3
1kiss: CMake config command: cmake -A x64 -D_1KFETCH_UPGRADE=FALSE -DCMAKE_INSTALL_PREFIX=N:\cpp\axgames\Issue1973\install_x64 -B N:\cpp\axgames\Issue1973\build_x64 -B N:\cpp\axgames\Issue1973\build_x64
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.40.33811.0
-- The CXX compiler identification is MSVC 19.40.33811.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.40.33807/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.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using system env var _AX_ROOT=N:/cpp/axmol
-- GLSLCC_OUT_DIR=N:/cpp/axgames/Issue1973/build_x64/runtime/axslc
-- GLSLCC_FIND_PROG_ROOT=N:/cpp/axmol/tools/external/glslcc;N:\cpp\axmol/tools/external/glslcc
-- GLSLCC_FRAG_SOURCE_FILE_EXTENSIONS=.frag;.fsh
-- GLSLCC_VERT_SOURCE_FILE_EXTENSIONS=.vert;.vsh
-- CMAKE_HOST_SYSTEM_VERSION: 10.0.22631
-- CMAKE_SYSTEM_VERSION: 10.0.22631
-- CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION: 10.0.22621.0
-- CMAKE_C_STANDARD=11
-- Building axmol with c++20
-- Using Windows MSVC generate axmol project, MSVC_VERSION:1940
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe
-- The ASM_NASM compiler identification is unknown
-- Didn't find assembler
CMake Warning at N:/cpp/axmol/cmake/Modules/AXConfigDefine.cmake:224 (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):
N:/cpp/axmol/cmake/Modules/AXBuildSet.cmake:47 (include)
CMakeLists.txt:59 (include)
CMake Warning (dev) at N:/cpp/axmol/cmake/Modules/AXBuildSet.cmake:52 (message):
CMAKE_VERSION:3.29.5
Call Stack (most recent call first):
CMakeLists.txt:59 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- 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:Issue1973
-- PROJECT_SOURCE_DIR:N:/cpp/axgames/Issue1973
-- _AX_ROOT:N:/cpp/axmol
-- CMAKE_MODULE_PATH:N:/cpp/axmol/cmake/Modules/
-- PROJECT_BINARY_DIR:N:/cpp/axgames/Issue1973/build_x64
-- ENGINE_BINARY_PATH:N:/cpp/axgames/Issue1973/build_x64/engine
-- ARCH_ALIAS:x64
CMake Warning (dev) at N:/cpp/axmol/core/CMakeLists.txt:87 (message):
AX_USE_GL=ON, AX_USE_METAL=OFF, AX_GLES_PROFILE=300
This warning is for project developers. Use -Wno-dev to suppress it.
-- Performing Test AX_HAVE_SSE2_SWITCH
-- Performing Test AX_HAVE_SSE2_SWITCH - Success
-- 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
-- Looking for arm_neon.h
CMake Warning (dev) at N:/cpp/axmol/3rdparty/CMakeLists.txt:138 (message):
-- Looking for arm_neon.h - not found
AX_ISA_SIMD=sse4.1
This warning is for project developers. Use -Wno-dev to suppress it.
-- Using plainlua https://lua.org
-- Version: 10.2.1
-- Build type:
CMake Warning (dev) at N:/cpp/axmol/1k/fetch.cmake:51 (message):
Downloading
https://github.com/simdsoft/1kiss/releases/download/v86/zlib.zip
Call Stack (most recent call first):
N:/cpp/axmol/3rdparty/zlib/CMakeLists.txt:4 (_1kfetch_dist)
This warning is for project developers. Use -Wno-dev to suppress it.
-- [download 0% complete]
...
-- [download 100% complete]
Configuring Chipmunk2D version 7.0.3
CMake Deprecation Warning at N:/cpp/axmol/3rdparty/freetype/CMakeLists.txt:113 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found ZLIB: zlib (found version "1.3.1")
-- Could NOT find PNG (missing: PNG_PNG_INCLUDE_DIR)
CMake Warning (dev) at N:/cpp/axmol/1k/fetch.cmake:51 (message):
Downloading
https://github.com/simdsoft/1kiss/releases/download/v86/jpeg-turbo.zip
Call Stack (most recent call first):
N:/cpp/axmol/3rdparty/jpeg-turbo/CMakeLists.txt:7 (_1kfetch_dist)
This warning is for project developers. Use -Wno-dev to suppress it.
-- [download 0% complete]
...
-- [download 100% complete]
CMake Warning (dev) at N:/cpp/axmol/1k/fetch.cmake:51 (message):
Downloading
https://github.com/simdsoft/1kiss/releases/download/v86/openssl.zip
Call Stack (most recent call first):
N:/cpp/axmol/3rdparty/openssl/CMakeLists.txt:6 (_1kfetch_dist)
This warning is for project developers. Use -Wno-dev to suppress it.
-- [download 0% complete]
...
-- [download 100% complete]
CMake Warning (dev) at N:/cpp/axmol/3rdparty/astcenc/CMakeLists.txt:54 (message):
ASTC_ISA_SIMD=sse4.1
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at N:/cpp/axmol/1k/fetch.cmake:51 (message):
Downloading
https://github.com/simdsoft/1kiss/releases/download/v86/curl.zip
Call Stack (most recent call first):
N:/cpp/axmol/3rdparty/curl/CMakeLists.txt:6 (_1kfetch_dist)
This warning is for project developers. Use -Wno-dev to suppress it.
-- [download 0% complete]
...
-- [download 100% complete]
-- 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.44.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
--
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Including Win32 support
CMake Warning (dev) at N:/cpp/axmol/1k/fetch.cmake:51 (message):
Downloading
https://github.com/simdsoft/1kiss/releases/download/v86/angle.zip
Call Stack (most recent call first):
N:/cpp/axmol/3rdparty/angle/CMakeLists.txt:6 (_1kfetch_dist)
This warning is for project developers. Use -Wno-dev to suppress it.
-- [download 0% complete]
...
-- [download 100% complete]
-- AX_USE_ALSOFT=ON
CMake axmol target_precompile_headers
Feeds used:
C:\Users\Vlad\.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 'N:\cpp\axgames\Issue1973\build_x64\packages', targeting 'Any,Version=v0.0'
Gathering dependency information took 165.43 ms
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\Vlad\.nuget\packages\'.
Adding package 'Microsoft.Web.WebView2.1.0.992.28' to folder 'N:\cpp\axgames\Issue1973\build_x64\packages'
Added package 'Microsoft.Web.WebView2.1.0.992.28' to folder 'N:\cpp\axgames\Issue1973\build_x64\packages'
Successfully installed 'Microsoft.Web.WebView2 1.0.992.28' to N:\cpp\axgames\Issue1973\build_x64\packages
Executing nuget actions took 427.17 ms
-- Enabled axmol extensions:JSONDefault;cocostudio;SDFGen;Inspector;ImGui;fairygui;DragonBones;spine;physics-nodes;particle3d;assets-manager;GUI;
-- Configuring done (107.4s)
-- Generating done (2.5s)
-- Build files have been written to: N:/cpp/axgames/Issue1973/build_x64
1kiss: BUILD_ALL_OPTIONS=--target Issue1973 --config Release --parallel 12 --target Issue1973, Count=8
1kiss: cmake --build N:\cpp\axgames\Issue1973\build_x64 --target Issue1973 --config Release --parallel 12 --target Issue1973
MSBuild version 17.10.4+10fbfbf2e for .NET Framework
1>Checking Build System
Syncing resources for Issue1973 ...
Syncing resources for Issue1973 ...
Building Custom Rule N:/cpp/axgames/Issue1973/CMakeLists.txt
Building Custom Rule N:/cpp/axgames/Issue1973/CMakeLists.txt
fsync.ps1: Linking N:\cpp\axgames\Issue1973\build_x64\runtime\axslc to N:\cpp\axgames\Issue1973\build_x64\bin\Issue1973\Release\axslc ...
fsync.ps1: Linking N:\cpp\axgames\Issue1973\Content to N:\cpp\axgames\Issue1973\build_x64\bin\Issue1973\Release\Content ...
# nothing else happens after this point
Try running cmake --build N:\cpp\axgames\Issue1973\build_x64 --target Issue1973 --config Release --parallel 12 --target Issue1973 -- -verbosity:detailed
or even try -verbosity:diagnostic
and see if it shows more info of what MSBuild is trying to do.
I've collected detailed logs. Uploaded as a separate file to not spam this thread. I'm starting to wonder if it's really the fsync.ps1 script or maybe the step right after that doesn't start? 🤔
cmake --build N:\cpp\axgames\Issue1973\build_x64 --target Issue1973 --config Release --parallel 12 -- /verbosity:diagnostic > build_output.txt 2>&1
PS. Can someone please upload a log of the above command as well who's on Windows11, I'll do a comparison of the logs. Thank you!
I've collected detailed logs. Uploaded as a separate file to not spam this thread. I'm starting to wonder if it's really the fsync.ps1 script or maybe the step right after that doesn't start? 🤔
The build log you posted has this at the end:
20:42:04.318 3>PostBuildEvent: (TargetId:60)
fsync.ps1: Linking N:\cpp\axgames\Issue1973\Content to N:\cpp\axgames\Issue1973\build_x64\bin\Issue1973\Release\Content ... (TaskId:40)
20:42:04.349 4>PostBuildEvent: (TargetId:60)
fsync.ps1: Linking N:\cpp\axgames\Issue1973\build_x64\runtime\axslc to N:\cpp\axgames\Issue1973\build_x64\bin\Issue1973\Release\axslc ... (TaskId:40)
On doing a test, this is how it should have continued:
13:24:06.233 3>PostBuildEvent: (TargetId:60)
fsync.ps1: Linking C:\dev\projects\Issue1973\Content to C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\Content ... (TaskId:40)
13:24:06.233 4>PostBuildEvent: (TargetId:60)
fsync.ps1: Linking C:\dev\projects\Issue1973\build_x64\runtime\axslc to C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\axslc ... (TaskId:40)
13:24:06.233 3>PostBuildEvent: (TargetId:60)
Junction created for C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\Content <<===>> C:\dev\projects\Issue1973\Content (TaskId:40)
13:24:06.233 4>PostBuildEvent: (TargetId:60)
Junction created for C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\axslc <<===>> C:\dev\projects\Issue1973\build_x64\runtime\axslc (TaskId:40)
Done executing task "Exec". (TaskId:40)
13:24:06.593 4>Done building target "PostBuildEvent" in project "SYNC_RESOURCE-Issue1973-axslc.vcxproj".: (TargetId:60)
13:24:06.593 4>Target "_BuildLinkAction: (TargetId:61)" in file "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets" from project "C:\dev\projects\Issue1973\build_x64\SYNC_RESOURCE-Issue1973-axslc.vcxproj" (target "BuildLink" depends on it):
The difference seems to be that in your test, it is not finishing the link creation tasks.
Just out of curiosity, what is the "N" drive? Is it a partition on a physical disk attached to that PC (internal or external), or is it a network path/something else etc.?
The actual command used is based on this conditional block in fsync.ps1:
Write-Host "fsync.ps1: Linking $srcPath to $destPath ..."
if ($IsWin -and (Test-Path $srcPath -PathType Container)) {
cmd.exe /c mklink /J $destPath $srcPath
}
else {
# ln -s $srcPath $destPath
New-Item -ItemType SymbolicLink -Path $destPath -Target $srcPath 2>$null
}
Could you possibly try both of those commands to see if they work? So, in your case, it would be:
cmd.exe /c mklink /J N:\cpp\axgames\Issue1973\build_x64\bin\Issue1973\Release\Content N:\cpp\axgames\Issue1973\Content
and
New-Item -ItemType SymbolicLink -Path N:\cpp\axgames\Issue1973\build_x64\bin\Issue1973\Release\Content -Target N:\cpp\axgames\Issue1973\Content
If the first command generates the Content folder link, then delete that link before attempting the second command. If they both work, then try them again, but this time leave the Content link in-place between tests.
EDIT: It seems that the cmd /c mklink /J
version is the one being used, so that is the one that you should focus on. A test confirms this:
PS C:\dev\projects\Issue1973> cmd.exe /c mklink /J C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\Content C:\dev\projects\Issue1973\Content
Junction created for C:\dev\projects\Issue1973\build_x64\bin\Issue1973\Release\Content <<===>> C:\dev\projects\Issue1973\Content
The New-Item
version has different output, not showing the "Junction created ..." text etc..
Ok, I got it to work by forcing the second if branch in the fsync.ps1 script
what is the "N" drive?
This is just a second HDD attached with a SATA3 to the MB, standard. Issue happens on C drive as well.
It seems that the cmd /c mklink /J version is the one being used, so that is the one that you should focus on
This is correct, out of the two commands, the first one hangs forever but the second one works correctly and creates a symbolic link.
This code works (added a false in the if so it defaults to the second branch).
if ($linkOnly) {
Write-Host "fsync.ps1: Linking $srcPath to $destPath ..."
if ($false -and $IsWin -and (Test-Path $srcPath -PathType Container)) {
Write-Host "$IsWin -and (Test-Path $srcPath -PathType Container)"
cmd.exe /c mklink /J $destPath $srcPath
}
else {
# ln -s $srcPath $destPath
Write-Host "New-Item -ItemType SymbolicLink -Path $destPath -Target $srcPath"
New-Item -ItemType SymbolicLink -Path $destPath -Target $srcPath 2>$null
}
}
Out of curiosity I thought it's a permission issue but it's correctly being run with admin privileges so it's not that:
# Print if running as admin mode
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if ($isAdmin) {
Write-Host "The script is running in administrator mode."
} else {
Write-Host "The script is NOT running in administrator mode. "
}
Result:
-- Build files have been written to: N:/cpp/axgames/Issue1973/build_x64
The script is running in administrator mode.
fsync.ps1: Linking N:\cpp\axgames\Issue1973\build_x64\runtime\axslc to N:\cpp\axgames\Issue1973\build_x64\bin\Issue1973\Release\axslc ...
True -and (Test-Path N:\cpp\axgames\Issue1973\build_x64\runtime\axslc -PathType Container)
So it works now, all good. The issue was this command which was bypassed
cmd.exe /c mklink /J $s$srcPath
Some more information: From Powershell 7 with admin rights, calling this cmd.exe command hangs:
cmd.exe /c "mklink /J N:\cpp\axgames\testdir\bin\Content N:\cpp\axgames\testdir\content"
However, opening cmd prompt with admin privileges, running the same command works correctly:
mklink /J N:\cpp\axgames\testdir\bin\Content N:\cpp\axgames\testdir\content
Junction created for N:\cpp\axgames\testdir\bin\Content <<===>> N:\cpp\axgames\testdir\content
So there's clearly some interplay between calling cmd.exe from powershell but can't tell exactly what it is.
However, bypassing that line solved the issue. Thank you very much for the support! Highly appreciated!
@gfeyer I'm glad you got it working, but we still need to find out the source of the problem.
Since we can't reproduce this, is there any chance you can do a few more tests please?
First test, would you be able to check if the "mklink" command works on its own with this:
mklink /J N:\cpp\axgames\Issue1973\build_x64\bin\Issue1973\Release\Content N:\cpp\axgames\Issue1973\Content
Then check if the cmd /c
command works; it shouldn't do anything besides run and go back to the command prompt, so it should not freeze.
EDIT: just noticed you've already done the mklink
test, and it works, so I'm wondering if cmd /c
is working. Also, you should not need to be running it with admin privileges.
Yeah for sure. Created a separate test directory, link one folder into another. Running Powershell 7 with Admin.
test1.ps1
cmd.exe /c mklink /J "N:\cpp\axgames\testdir\bin\Content" "N:\cpp\axgames\testdir\content"
Result: fail
test2.ps1
cmd.exe /c "echo test"
Result: fail, command hangs and nothing is printed on the console
I re-did these tests with Powershell 5.1, same results
Let me know what other are needed
@gfeyer Thank you for doing the tests.
Could you please open a command window (not Powershell), and do a cmd /c
in it to see if it works?
Hopefully @halx99 will have an idea as to why the cmd /c
command is failing.
@rh101
Oh... I found the root cause... This is not a problem with the install script but with a cmd.exe that is on the PATH that's higher precedence than Windows32/cmd.exe..
In other words, powershell would actually pick up the wrong cmd.exe and in fact there's nothing wrong with the install script, this is on my end... (facepalm...)
C:\where cmd
N:\go\bin\cmd.exe
C:\Windows\System32\cmd.exe
Thank you guys for the guidance and time! (It would've never crossed my mind to check for a second cmd.exe)
In other words, powershell would actually pick up the wrong cmd.exe and in fact there's nothing wrong with the install script, this is on my end... (facepalm...)
Explains why we couldn't reproduce the issue. I'm glad you found the root cause.
Please close this issue it there is nothing further to be resolved.
Thanks all.
Steps to Reproduce:
1kiss: proj_dir=N:\cpp\axgames\hellocpp\HelloCpp, external_prefix=N:\cpp\axmol-2.1.3\tools\external 1kiss: Using glslcc: N:\cpp\axmol-2.1.3\tools\external\glslcc\glslcc.exe, version: 1.9.5 1kiss: Using cmake: C:\Program Files\CMake\bin\cmake.exe, version: 3.29.5 1kiss: Using nuget: N:\cpp\axmol-2.1.3\tools\external\nuget\nuget.exe, version: 5.5.1 1kiss: Building target win32 on windows with toolchain msvc ... 1kiss: CONFIG_ALL_OPTIONS=-A x64 -D_1KFETCH_UPGRADE=FALSE, Count=3 1kiss: BUILD_ALL_OPTIONS=--target HelloCpp --config Release --parallel 12 --target HelloCpp, Count=8 1kiss: cmake --build N:\cpp\axgames\hellocpp\HelloCpp\build_x64 --target HelloCpp --config Release --parallel 12 --target HelloCpp MSBuild version 17.10.4+10fbfbf2e for .NET Framework Syncing resources for HelloCpp ... Syncing resources for HelloCpp ... fsync.ps1: Linking N:\cpp\axgames\hellocpp\HelloCpp\Content to N:\cpp\axgames\hellocpp\HelloCpp\build_x64\bin\HelloCpp\Release\Content ... fsync.ps1: Linking N:\cpp\axgames\hellocpp\HelloCpp\build_x64\runtime\axslc to N:\cpp\axgames\hellocpp\HelloCpp\build_x64\bin\HelloCpp\Release\axslc ...
It also hangs if I build the project in Visual Studio 2022:
27>null.cpp 27>context.cpp 27>device.cpp 27> Creating library N:/cpp/axgames/hellocpp/HelloCpp/build_x64/lib/Release/OpenAL32.lib and object N:/cpp/axgames/hellocpp/HelloCpp/build_x64/lib/Release/OpenAL32.exp 27>OpenAL.vcxproj -> N:\cpp\axgames\hellocpp\HelloCpp\build_x64\bin\Release\OpenAL32.dll 27>Done building project "OpenAL.vcxproj".
Visual Studio keeps building after this indefinitely (does not stop you have to cancel manually).At this point, it is unusable on windows and there aren't any workarounds for this bug either that I know of.
Thank you!