Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939498 - sys-devel/llvm:15/15 missing cstdint includes: ‘uint64_t’ is defined in header ‘<cstdint>’
Summary: sys-devel/llvm:15/15 missing cstdint includes: ‘uint64_t’ is defined in heade...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
: 937779 939504 (view as bug list)
Depends on:
Blocks: gcc-15
  Show dependency tree
 
Reported: 2024-09-12 03:46 UTC by tdr
Modified: 2025-03-14 20:03 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
log where first instance occurs (llvm-fail-log.txt,310.29 KB, text/plain)
2024-09-12 03:47 UTC, tdr
Details
patch for cstdint includes (llvm:15-cstdinst-includes.patch,2.83 KB, application/mbox)
2024-09-12 03:51 UTC, tdr
Details
emerge--info (emerge--info.txt,6.23 KB, text/plain)
2024-09-12 03:52 UTC, tdr
Details
patch for cstdint incudes (llvm-15-cstdinst-includes.patch,2.83 KB, patch)
2024-09-12 03:53 UTC, tdr
Details | Diff
sys-devel/llvm: Bump llvm:15 patchset for more gcc-15 fixes (patchset-bump.patch,3.16 KB, patch)
2024-09-14 05:28 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2024-09-12 03:46:21 UTC
present llvm:15/15 ebuild fails to build with gcc:15 due to missing cstdint includes


Reproducible: Always

Steps to Reproduce:
select current gcc 15 as active compiler (presently sys-devel/gcc-15.0.0_pre20240908)
emerge -va1 sys-devel/llvm:15


Actual Results:  
multiple failure spots that hint at needing to include cstint

example:
/var/tmp/portage/sys-devel/llvm-15.0.7-r6/work/llvm/include/llvm/ADT/SmallVector.h:88:69: error: ‘uint64_t’ was not declared in this scope
   88 |     typename std::conditional<sizeof(T) < 4 && sizeof(void *) >= 8, uint64_t,
      |                                                                     ^~~~~~~~
/var/tmp/portage/sys-devel/llvm-15.0.7-r6/work/llvm/include/llvm/ADT/SmallVector.h:29:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   28 | #include <memory>
  +++ |+#include <cstdint>
   29 | #include <new>


will attach the first build failure log (ones from other missing spots were similar)
will attach working patch that allows it to successfully compile
Comment 1 tdr 2024-09-12 03:47:50 UTC
Created attachment 902683 [details]
log where first instance occurs
Comment 2 tdr 2024-09-12 03:51:11 UTC
Created attachment 902684 [details]
patch for cstdint includes
Comment 3 tdr 2024-09-12 03:52:20 UTC
Created attachment 902685 [details]
emerge--info
Comment 4 tdr 2024-09-12 03:53:52 UTC
Created attachment 902686 [details, diff]
patch for cstdint incudes
Comment 5 tdr 2024-09-12 04:04:07 UTC
>>> Preparing source in /var/tmp/portage/sys-devel/llvm-15.0.7-r6/work/llvm ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sys-devel/llvm-15.0.7-r6/work/llvm"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sys-devel/llvm-15.0.7-r6/work/llvm_build"
 * Applying patches from /var/tmp/portage/sys-devel/llvm-15.0.7-r6/work/llvm-gentoo-patchset-15.0.7-r6 ...
 *   0001-llvm-llvm-config-Clean-up-exported-values.patch ...                                                                                                               [ ok ]
 *   0017-cmake-Disable-GCC-lifetime-DSE.patch ...                                                                                                                          [ ok ]
 *   0018-cmake-Enable-64bit-off_t-on-32bit-glibc-systems.patch ...                                                                                                         [ ok ]
 * ======================================================================================
 * Applying user patches from /etc/portage/patches ...
 * Applying llvm-15-cstdinst-includes.patch ...                                                                                                                                     [ ok ]
 * User patches applied.
 * ======================================================================================

...

>>> Source compiled.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-09-14 05:28:46 UTC
Created attachment 902934 [details, diff]
sys-devel/llvm: Bump llvm:15 patchset for more gcc-15 fixes

I'm sorry, I've just noticed that we already had a patch pending that didn't make it to the ebuild.  Since this patch adds the include to a different file, could you please test if it fixes the issue for you?  Perhaps cstdint gets implicitly included everywhere else.

I'm attaching a patch that bumps the patchset to -r7.
Comment 7 tdr 2024-09-19 05:22:26 UTC
mgorny,

After removing my local patch, and applied the patch use to use LLVM_PATCHSET=${PV/_/-}-r7

Successfully built sys-devel/llvm-15.0.7-r6 with it applied.
Comment 8 Larry the Git Cow gentoo-dev 2024-09-19 10:35:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a37ac78f124acccc62fcd107df270546ed5b90a2

commit a37ac78f124acccc62fcd107df270546ed5b90a2
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-09-19 10:34:49 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-09-19 10:35:36 +0000

    sys-devel/llvm: Backport gcc-15 fixes as 15.0.7-r7
    
    Closes: https://bugs.gentoo.org/939498
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/llvm/Manifest              |   1 +
 sys-devel/llvm/llvm-15.0.7-r7.ebuild | 520 +++++++++++++++++++++++++++++++++++
 2 files changed, 521 insertions(+)
Comment 9 Kostadin Shishmanov 2025-03-14 20:02:00 UTC
*** Bug 937779 has been marked as a duplicate of this bug. ***
Comment 10 Kostadin Shishmanov 2025-03-14 20:03:18 UTC
*** Bug 939504 has been marked as a duplicate of this bug. ***