Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 850115 - app-office/gnucash-4.8/4.10: fails to compile with gcc-12.1* and <sys-libs/glibc-2.35
Summary: app-office/gnucash-4.8/4.10: fails to compile with gcc-12.1* and <sys-libs/gl...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Aaron W. Swenson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-12
  Show dependency tree
 
Reported: 2022-06-06 16:12 UTC by Matthias Maier
Modified: 2022-06-06 16:32 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,271.54 KB, text/x-log)
2022-06-06 16:12 UTC, Matthias Maier
Details
emerge --info (emerge.info,7.68 KB, text/plain)
2022-06-06 16:13 UTC, Matthias Maier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Maier gentoo-dev 2022-06-06 16:12:42 UTC
Created attachment 783149 [details]
build.log

Relevant portion of build log:

/usr/sbin/x86_64-pc-linux-gnu-gcc -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DG_LOG_DOMAIN=\"gnc.app-utils\" -DHAVE_CONFIG_H -DHAVE_GUILE22 -D_GNU_SOURCE -Dgnc_app_utils_EXPORTS -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/app-utils -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/app-utils/calculation -I/usr/lib64/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/libxml2 -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/backend -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/engine -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10_build/common -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/common -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/borrowed/libc -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10_build/libgnucash/core-utils -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/core-utils -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/tax -I/var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/bindings/guile -I/usr/include/guile/2.2  -Wno-error=deprecated-declarations -Wno-error=parentheses -Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused -march=native -O2 -pipe -ggdb -fPIC -std=gnu11 -MD -MT libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/file-utils.c.o -MF libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/file-utils.c.o.d -o libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/file-utils.c.o -c /var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/app-utils/file-utils.c
In file included from /usr/include/features.h:490,
                 from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/limits.h:26,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include-fixed/limits.h:203,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include-fixed/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include-fixed/limits.h:34,
                 from /usr/lib64/glib-2.0/include/glibconfig.h:11,
                 from /usr/include/glib-2.0/glib/gtypes.h:32,
                 from /usr/include/glib-2.0/glib/galloca.h:32,
                 from /usr/include/glib-2.0/glib.h:30,
                 from /var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/app-utils/file-utils.c:24:
In function ‘read’,
    inlined from ‘gncReadFile’ at /var/tmp/portage/app-office/gnucash-4.10/work/gnucash-4.10/libgnucash/app-utils/file-utils.c:96:10:
/usr/include/bits/unistd.h:38:10: error: ‘__read_alias’ specified size 18446744073709551614 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
   38 |   return __glibc_fortify (read, __nbytes, sizeof (char),
      |          ^~~~~~~~~~~~~~~
/usr/include/bits/unistd.h: In function ‘gncReadFile’:
/usr/include/bits/unistd.h:26:16: note: in a call to function ‘__read_alias’ declared with attribute ‘access (write_only, 2, 3)’
   26 | extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf,
      |                ^~~~~~~~~~
cc1: all warnings being treated as errors
Comment 1 Matthias Maier gentoo-dev 2022-06-06 16:13:02 UTC
Created attachment 783152 [details]
emerge --info
Comment 2 Matthias Maier gentoo-dev 2022-06-06 16:17:19 UTC
The gcc-12 compiler carries the following patch which enables _FORTIFY_SOURCE=3

osprey ~ # cat /etc/portage/patches/sys-devel/gcc:12/fortify_source.patch 
--- a/gcc/c-family/c-cppbuiltin.cc
+++ b/gcc/c-family/c-cppbuiltin.cc
@@ -1513,7 +1513,7 @@ c_cpp_builtins (cpp_reader *pfile)
 #if !defined(ACCEL_COMPILER)
   /* Fortify Source enabled by default for optimization levels > 0 */
   if (optimize)
-    builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
+    builtin_define_with_int_value ("_FORTIFY_SOURCE", 3);
 #endif

   /* Misc.  */
Comment 3 Matthias Maier gentoo-dev 2022-06-06 16:32:14 UTC
Turns out that this is an issue with <sys-libs/glibc-2.35.