Vendored LIEF fails to build with Clang 22
Open
Beginner friendly
Nobody has claimed this yet.
stale
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
Version
26.2.0
Platform
macOS 14, 15
Subsystem
No response
What steps will reproduce the bug?
./configure && make
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
Build succeeds
What do you see instead?
../deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/format.h:747:28: error: use of undeclared identifier 'malloc'
747 | T* p = static_cast<T*>(malloc(n * sizeof(T)));
../deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/format.h:752:35: error: call to function 'free' that is neither visible in the template definition nor found by argument-dependent lookup
752 | void deallocate(T* p, size_t) { free(p); }
Additional information
This has already been fixed in spdlog to have the correct includes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with deps/LIEF/third-party/spdlog/include/spdlog/fmt/bundled/format.h and reproduce the failure with ./configure && make on macOS using Clang 22. Compare the vendored code with the linked spdlog fix for the missing allocation-function includes, then verify that the build succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100