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

error: call to member function 'WriteNumber' is ambiguous #2066

Closed
ryandesign opened this issue May 9, 2024 · 4 comments
Closed

error: call to member function 'WriteNumber' is ambiguous #2066

ryandesign opened this issue May 9, 2024 · 4 comments
Labels

Comments

@ryandesign
Copy link
Contributor

ryandesign commented May 9, 2024

I have seen the warning that "CMake is not an officially supported build system for love on Apple platforms" but I'm trying it anyway.

I got these errors when building the main branch with Apple clang version 14.0.0 (clang-1400.0.29.202):

src/libraries/vma/vk_mem_alloc.h:6446:10: error: call to member function 'WriteNumber' is ambiguous
    json.WriteNumber(allocationCount);
    ~~~~~^~~~~~~~~~~
src/libraries/vma/vk_mem_alloc.h:5686:21: note: candidate function
void VmaJsonWriter::WriteNumber(uint32_t n)
                    ^
src/libraries/vma/vk_mem_alloc.h:5693:21: note: candidate function
void VmaJsonWriter::WriteNumber(uint64_t n)
                    ^
src/libraries/vma/vk_mem_alloc.h:6449:10: error: call to member function 'WriteNumber' is ambiguous
    json.WriteNumber(unusedRangeCount);
    ~~~~~^~~~~~~~~~~
src/libraries/vma/vk_mem_alloc.h:5686:21: note: candidate function
void VmaJsonWriter::WriteNumber(uint32_t n)
                    ^
src/libraries/vma/vk_mem_alloc.h:5693:21: note: candidate function
void VmaJsonWriter::WriteNumber(uint64_t n)
                    ^
src/libraries/vma/vk_mem_alloc.h:15970:34: error: call to member function 'ContinueString' is ambiguous
                            json.ContinueString(index++);
                            ~~~~~^~~~~~~~~~~~~~
src/libraries/vma/vk_mem_alloc.h:5657:21: note: candidate function
void VmaJsonWriter::ContinueString(uint32_t n)
                    ^
src/libraries/vma/vk_mem_alloc.h:5663:21: note: candidate function
void VmaJsonWriter::ContinueString(uint64_t n)
                    ^
@nikeinikei
Copy link
Contributor

It's not directly the problem, but the Vulkan backend shouldn't be included in the macos build anyway (which is the sole user of VMA), you can try excluding it by modifying cmakelists.txt, the dependency on VMA should be gone then as well.

@ryandesign
Copy link
Contributor Author

#2069 works around the problem on macOS by not building the Vulkan parts and instead building the Metal parts, but you would presumably still run into this error if you use a similar compiler on Linux or Windows.

@slime73
Copy link
Member

slime73 commented May 11, 2024

you would presumably still run into this error if you use a similar compiler on Linux or Windows.

I don't think I've heard of anyone having compile problems when using clang on Linux with love 12. Is it definitely an issue?

@slime73
Copy link
Member

slime73 commented May 11, 2024

Actually it looks like it was an apple-specific issue: GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@3f9f667

If we ever decide to support vulkan on macOS (which currently we don't), we'll just make sure VMA is up to date.

@slime73 slime73 closed this as completed May 11, 2024
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

3 participants