Skip to content

spades: fix missing <cstdint> under GCC 14 - #6269

Open
gonzabotmdp wants to merge 1 commit into
spack:developfrom
gonzabotmdp:fix/spades-gcc14-missing-cstdint
Open

spades: fix missing <cstdint> under GCC 14#6269
gonzabotmdp wants to merge 1 commit into
spack:developfrom
gonzabotmdp:fix/spades-gcc14-missing-cstdint

Conversation

@gonzabotmdp

Copy link
Copy Markdown
Contributor

Summary

Building spades@4.0.0 with GCC 14 fails with e.g.:

src/projects/binspreader/id_map.hpp:18:35: error: 'uint64_t' does not name a type

id_map.hpp uses uint64_t as a default template parameter but never includes <cstdint> -- older GCC pulled it in transitively (via <boost/iterator/iterator_facade.hpp> or one of the other headers it includes), GCC 14's libstdc++ does not.

A static scan of the whole src/ tree found 111 files with the same pattern (using fixed-width int types while relying on a transitive include for <cstdint>/<stdint.h>) -- too many to patch file by file, and too easy for the build to hit a new one further along depending on which +tools/+sra targets get compiled. Forcing the header into every translation unit at the compiler level (-include cstdint for C++, -include stdint.h for C, since <cstdint> is the C++ wrapper and isn't visible to the plain C compiler) covers all of them at once.

Testing

Installed spades@4.0.0 +sra +tools (all optional projects enabled, SPADES_ENABLE_PROJECTS=all) with %gcc@14.2.0 end to end, confirmed spades.py --version and a real assembly run (contigs.fasta/scaffolds.fasta produced) work.

@spackbot-triage spackbot-triage Bot added the update-package Modifications to packages in the repository label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

update-package Modifications to packages in the repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant