From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 457D73858C54; Tue, 6 Feb 2024 22:26:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 457D73858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707258387; bh=YKAtlff+jpBJDP3mn9eBFfhEJ6hSwAzIhodaPKkXt+E=; h=From:To:Subject:Date:From; b=fBD43X5j96oo8mHxMDQG4tS7RpYtGihYvXnovFagJ9ePCdCGx2dLm3ZkOYhyesobj Buh9gjP5VdAfq9TYrGd7Bb/dOSljBhM6lM0QFm0D5fMaFhm1ycEKTSaIKWdPAb6X6/ hR8oPhsppxl1Z9++FzLuU+EJq5gF8gC6GSkmuLKM= From: "danglin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/113792] New: error: '__size_t' was not declared in this scope Date: Tue, 06 Feb 2024 22:26:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: danglin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113792 Bug ID: 113792 Summary: error: '__size_t' was not declared in this scope Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: danglin at gcc dot gnu.org Target Milestone: --- Host: hppa64-hp-hpux11.11 Target: hppa64-hp-hpux11.11 Build: hppa64-hp-hpux11.11 I enabled building rust on hppa64-hp-hpux11.11 and hit this error: /home/dave/gnu/gcc/objdir64/./prev-gcc/x g++ -B/home/dave/gnu/gcc/objdir64/./prev-gcc/ -B/opt/gnu64/gcc/gcc-14/hppa64-hp- hpux11.11/bin/ -nostdinc++ -B/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.1 1/libstdc++-v3/src/.libs -B/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux11.11/ libstdc++-v3/libsupc++/.libs -isystem /home/dave/gnu/gcc/objdir64/prev-hppa64-h p-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11 -isystem /home/dave/gnu/gc c/objdir64/prev-hppa64-hp-hpux11.11/libstdc++-v3/include -isystem /home/dave/gn u/gcc/gcc/libstdc++-v3/libsupc++ -L/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hp ux11.11/libstdc++-v3/src/.libs -L/home/dave/gnu/gcc/objdir64/prev-hppa64-hp-hpux 11.11/libstdc++-v3/libsupc++/.libs -g -O2 -fno-checking -c -o punct.o ../../.. /gcc/libgrust/libproc_macro_internal/punct.cc In file included from /home/dave/gnu/gcc/gcc-trunk/libstdc++-v3/include/c_global /cstdlib:79, from ../../../gcc/libgrust/libproc_macro_internal/punct.cc= :24: /usr/include/stdlib.h:349:25: error: '__size_t' was not declared in this sc= ope; did you mean '__site_t'? 349 | extern void *valloc(__size_t); | ^~~~~~~~ | __site_t make[4]: *** [: punct.o] Error 1 make[4]: Leaving directory '/home/dave/gnu/gcc/objdir64/libgrust/libproc_macro_internal' make[3]: *** [Makefile:421: all-recursive] Error 1 This is an #include_next problem. We have the following in cstdlib: // Need to ensure this finds the C library's not a libstdc++ // wrapper that might already be installed later in the include search path. #define _GLIBCXX_INCLUDE_NEXT_C_HEADERS #include_next #undef _GLIBCXX_INCLUDE_NEXT_C_HEADERS stdlib.h is fixed on this target. The #include_next pulled stdlib.h from /usr/include instead of ./prev-gcc/include-fixed/stdlib.h. Maybe the fix is to just use #include but I'm not sure. There are a couple of other places which define _GLIBCXX_INCLUDE_NEXT_C_HEADERS.=