-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Fix mimalloc debug build #6263
base: dev
Are you sure you want to change the base?
Fix mimalloc debug build #6263
Conversation
For some extra context - when trying to compile while requiring the package in debug, it is trying to copy pdb from root of build directory and it is unable to find it there. The pdb is located in |
Hm, this still doesn't function in the end I realized, unsure how to fix this, is a bit annoying... Can only use the lib in release mode which is not the best for debugging purposes. |
ec35e28
to
310a31e
Compare
Ok, latest change works when I try with the following in my xmake file add_requires("mimalloc") And compile in debug mode. It fails though when I also add |
packages/m/mimalloc/xmake.lua
Outdated
local dir = package:installdir(package:config("shared") and "bin" or "lib") | ||
os.cp(path.join(package:buildir(), "mimalloc-debug.pdb"), dir) | ||
os.cp(path.join(package:buildir(), "pdb", "Debug", pdb), dir) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code can be removed, fixed by xmake-io/xmake#5566
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm this as a whole can be removed and works fine for the regular add_requires
, still have the same exact issue with dependent package which includes it.
add_requires("mimalloc[shared]") pdb generate by msbuild:
pdb generate by ninja:
if package:is_plat("windows") and os.isdir("pdb") then
if package:config("shared") or not package:is_library() then
os.trycp("pdb/**.pdb", package:installdir("bin"))
else
os.trycp("pdb/**.pdb", package:installdir("lib"))
end
end |
Can confirm the line can be removed but it still does not fix the issue.
There is nothing special in the install.txt, only that single error. Looking into PDB simply does not get generated for the case where Trying to use |
Also for the record, I tried to add |
310a31e
to
8bde75e
Compare
Maybe this is some xmake error then from what I gather overall? Or am I missing something still? |
@waruqi Any idea? |
Try |
Unsure if this is proper fix as I am unsure if the folder may be different on different platform or not, but this fixes compilation on the latest Windows 11 system using latest Visual Studio 2022 and xmake 2.9.7 for debug builds.