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

glaze check code invalid on latest msvc #5439

Open
narknon opened this issue Oct 7, 2024 · 1 comment
Open

glaze check code invalid on latest msvc #5439

narknon opened this issue Oct 7, 2024 · 1 comment
Labels

Comments

@narknon
Copy link

narknon commented Oct 7, 2024

Xmake Version

2.9.4

Operating System Version and Architecture

Windows 10 19045

Describe Bug

Installing the glaze package fails because the on_check snippet will not compile on latest MSVC.

https://github.com/xmake-io/xmake-repo/blob/dev/packages/g/glaze/xmake.lua#L29

Expected Behavior

Install the package.

Project Configuration

Add glaze to any project via MSVC. I have not been able to reproduce this issue when cloning glaze locally, but the code from the snippet will not compile via msvc and our CI runner fails on installing the glaze package.

constexpr void f() {
static constexpr int g = 1;
}

Additional Information and Error Logs

checkinfo: ...amdir\core\sandbox\modules\import\core\tool\compiler.lua:84: @programdir\modules\core\tools\cl.lua:728: _B221FBF9F9AC4F8CA1204635475126C2.cpp
C:\Users\RUNNER~1\AppData\Local\Temp\.xmake\241007\_B221FBF9F9AC4F8CA1204635475126C2.cpp(4): error C3615: constexpr function 'f' cannot result in a constant expression
C:\Users\RUNNER~1\AppData\Local\Temp\.xmake\241007\_B221FBF9F9AC4F8CA1204635475126C2.cpp(5): note: failure was caused by variable declaration with non-automatic storage

stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:973]:
    [@programdir\modules\core\tools\cl.lua:728]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [@programdir\modules\core\tools\cl.lua:667]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]:
    [@programdir\core\tool\compiler.lua:278]: in function 'compile'
    [...amdir\core\sandbox\modules\import\core\tool\compiler.lua:82]: in function 'compile'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:244]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\lib\detect\check_cxsnippets.lua:236]:
    [...xmake\repositories\xmake-repo\packages\g\glaze\xmake.lua:27]: in function 'script'
    [...ir\modules\private\action\require\impl\actions\check.lua:37]:
    [...modules\private\action\require\impl\install_packages.lua:483]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:
    [C]: in function 'xpcall'
    [@programdir\core\base\utils.lua:275]: in function 'trycall'
    [@programdir\core\sandbox\modules\try.lua:117]: in function 'try'
    [@programdir\modules\async\runjobs.lua:223]: in function 'cotask'
    [@programdir\core\base\scheduler.lua:406]:

error: @programdir\core\main.lua:329: @programdir\modules\async\runjobs.lua:325: ...xmake\repositories\xmake-repo\packages\g\glaze\xmake.lua:27: package(glaze) Require at least C++23.
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:973]: in function 'raiselevel'
    [@programdir\core\sandbox\modules\utils.lua:143]: in function 'assert'
    [...xmake\repositories\xmake-repo\packages\g\glaze\xmake.lua:27]: in function 'script'
    [...ir\modules\private\action\require\impl\actions\check.lua:37]:
    [...modules\private\action\require\impl\install_packages.lua:483]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:241]:

stack traceback:
	[C]: in function 'error'
	@programdir\core\base\os.lua:973: in function 'base/os.raiselevel'
	(...tail calls...)
	@programdir\core\main.lua:329: in upvalue 'cotask'
	@programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>	```
@narknon narknon added the bug label Oct 7, 2024
@star-hengxing
Copy link
Contributor

Try it again #5440

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

No branches or pull requests

2 participants