Xmake Version
xmake v3.0.1+HEAD.3350cc5ab
Operating System Version and Architecture
Manjaro Linux
Describe Bug
As far as I know, in ArchLinux or Debian, Mingw may have the following two SDK directories.
/usr/x86_64-w64-mingw32
/usr/i686-w64-mingw32
Xmake generally specifies sdkdir as /usr
This will cause CMAKE_FIND_ROOT_PATH to be configured incorrectly
|
envs.CMAKE_FIND_ROOT_PATH = sdkdir |
This ultimately results in directories such as /usr/include being added to the header file search directory, causing a large number of compilation errors.
Expected Behavior
The sdkdir detection should be fixed, based on testing, everything works fine when --sdk=/usr/x86_64-w64-mingw32 (or i686) is manually specified.
Project Configuration
(under linux)
xrepo add-repo https://github.com/Redbeanw44602/xmake-repo-testing
xrepo install -p mingw -vD td
Additional Information and Error Logs
[4/506] /usr/bin/x86_64-w64-mingw32-g++ -DNOMINMAX -DNTDDI_VERSION=0x06020000 -DPSAPI_VERSION=1 -DUNICODE -DWIN32_LEAN_AND_MEAN -DWINVER=0x0602 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_UNICODE -D_WIN32_WINNT=0x0602 -I/home/username/.xmake/cache/packages/2507/t/td/1.8.51/source/td/tdutils -I/home/username/.xmake/cache/packages/2507/t/td/1.8.51/source/td/build/tdutils --->[[[[-isystem /usr/include]]]] -m64 -std=c++17 -fno-omit-frame-pointer -fno-exceptions -fno-rtti -ffunction-sections -fdata-sections -Wa,-mbig-obj -Wall -Wextra -Wimplicit-fallthrough=2 -Wpointer-arith -Wcast-qual -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Walloc-zero -Wlogical-op -Wno-tautological-compare -Wpointer-arith -Wvla -Wnon-virtual-dtor -Wno-unused-parameter -Wconversion -Wno-sign-conversion -Wdeprecated -Wodr -flto-odr-type-merging -Wno-psabi -Wno-maybe-uninitialized -Wno-cast-function-type -Wno-redundant-move -Wno-stringop-overflow -ftrack-macro-expansion=0 -m64 -O3 -DNDEBUG -MD -MT tdutils/CMakeFiles/tdutils.dir/td/utils/port/Clocks.cpp.obj -MF tdutils/CMakeFiles/tdutils.dir/td/utils/port/Clocks.cpp.obj.d -o tdutils/CMakeFiles/tdutils.dir/td/utils/port/Clocks.cpp.obj -c /home/username/.xmake/cache/packages/2507/t/td/1.8.51/source/td/tdutils/td/utils/port/Clocks.cpp
FAILED: tdutils/CMakeFiles/tdutils.dir/td/utils/port/Clocks.cpp.obj
Xmake Version
xmake v3.0.1+HEAD.3350cc5ab
Operating System Version and Architecture
Manjaro Linux
Describe Bug
As far as I know, in ArchLinux or Debian, Mingw may have the following two SDK directories.
/usr/x86_64-w64-mingw32/usr/i686-w64-mingw32Xmake generally specifies
sdkdiras/usrxmake/xmake/modules/detect/sdks/find_mingw.lua
Line 43 in b3d31f4
This will cause
CMAKE_FIND_ROOT_PATHto be configured incorrectlyxmake/xmake/modules/package/tools/cmake.lua
Line 695 in b3d31f4
This ultimately results in directories such as
/usr/includebeing added to the header file search directory, causing a large number of compilation errors.Expected Behavior
The sdkdir detection should be fixed, based on testing, everything works fine when
--sdk=/usr/x86_64-w64-mingw32(or i686) is manually specified.Project Configuration
(under linux)
Additional Information and Error Logs