Bug 272566 - lang/gcc14-devel: Build error due to unused variable entry_count
Summary: lang/gcc14-devel: Build error due to unused variable entry_count
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Lorenzo Salvadore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-18 09:59 UTC by John F. Carr
Modified: 2023-09-13 17:11 UTC (History)
0 users

See Also:
salvadore: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John F. Carr 2023-07-18 09:59:43 UTC
After 571e27fe859a20d6f6a7fbf31576c3ce5f8d7be7 poudriere fails to build lang/gcc14-devel with the compile error

/wrkdirs/usr/ports/lang/gcc14-devel/work/.build/./prev-gcc/xg++ -B/wrkdirs/usr/ports/lang/gcc14-devel/work/.build/./prev-gcc/ -B/usr/local/x86_64-portbld-freebsd13.2/bin/ -nostdinc++ -B/wrkdirs/usr/ports/lang/gcc14-devel/work/.build/prev-x86_64-portbld-freebsd13.2/libstdc++-v3/src/.libs -B/wrkdirs/usr/ports/lang/gcc14-devel/work/.build/prev-x86_64-portbld-freebsd13.2/libstdc++-v3/libsupc++/.libs  -isystem /wrkdirs/usr/ports/lang/gcc14-devel/work/.build/prev-x86_64-portbld-freebsd13.2/libstdc++-v3/include/x86_64-portbld-freebsd13.2  -isystem /wrkdirs/usr/ports/lang/gcc14-devel/work/.build/prev-x86_64-portbld-freebsd13.2/libstdc++-v3/include  -isystem /wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/libstdc++-v3/libsupc++ -L/wrkdirs/usr/ports/lang/gcc14-devel/work/.build/prev-x86_64-portbld-freebsd13.2/libstdc++-v3/src/.libs -L/wrkdirs/usr/ports/lang/gcc14-devel/work/.build/prev-x86_64-portbld-freebsd13.2/libstdc++-v3/libsupc++/.libs  -fPIC -c   -g -O2 -fno-checking -gtoggle -DIN_GCC    -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -fPIC -I. -I. -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/. -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/../include  -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/../libcpp/include -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/../libcody -I/usr/local/include  -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/../libdecnumber -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/../libdecnumber/dpd -I../libdecnumber -I/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/../libbacktrace  -DLIBICONV_PLUG -o tree-ssa-loop-ivcanon.o -MT tree-ssa-loop-ivcanon.o -MMD -MP -MF ./.deps/tree-ssa-loop-ivcanon.TPo /wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/tree-ssa-loop-ivcanon.cc
[...interleaved parallel build output removed...]
/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/tree-ssa-loop-ivcanon.cc: In function 'bool try_peel_loop(loop*, edge, tree, bool, long int)':
/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230716/gcc/tree-ssa-loop-ivcanon.cc:1170:17: error: variable 'entry_count' set but not used [-Werror=unused-but-set-variable]
 1170 |   profile_count entry_count = profile_count::zero ();
      |                 ^~~~~~~~~~~


I am running 13.2-STABLE on amd64.
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2023-07-18 12:16:49 UTC
Thanks for your report.

I had tested the port successfully both on amd64 13.2-RELEASE and on amd64 14.0-CURRENT, but my CURRENT version is pretty old.

I will test again on a recent amd64 13.2-STABLE and study the problem.
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2023-07-19 08:57:15 UTC
I have reproduced the bug. I will search for a solution as soon as possible.
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2023-07-24 08:06:59 UTC
The bug also affects the official package builders.

I have done more tests: it seems that disabling the bootstrap option completes the build successfully.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-07-26 14:02:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=69d3a975f2d7523f765ba97f0d94f5e4f9080ca4

commit 69d3a975f2d7523f765ba97f0d94f5e4f9080ca4
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2023-07-24 03:02:59 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2023-07-26 14:00:45 +0000

    lang/gcc14-devel: Update to 14.0.0.s20230723

    According to my tests, this snapshot should also fix PR 272566.

    PR:             272566

 lang/gcc14-devel/Makefile | 2 +-
 lang/gcc14-devel/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 5 Lorenzo Salvadore freebsd_committer freebsd_triage 2023-07-27 15:04:47 UTC
John, is the problem solved for you?

On my machine tests were fine, but the official package builders are now failing again with a new error (i386 only for now):


20230723/gcc/testsuite/selftests
/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230723/gcc/bitmap.cc:2912: test_set_range: FAIL: ASSERT_FALSE ((bitmap_bit_p (b, 6)))
cc1: internal compiler error: in fail, at selftest.cc:47
/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230723/gcc/bitmap.cc:2912: test_set_range: FAIL: ASSERT_FALSE ((bitmap_bit_p (b, 6)))
cc1plus: internal compiler error: in fail, at selftest.cc:47
0x851dd87 ???
/usr/local/poudriere/jails/main-i386/usr/src/lib/csu/i386/crt1_s.S:88
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
gmake[4]: *** [/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230723/gcc/c/Make-lang.in:153: s-selftest-c] Error 1
gmake[4]: *** Waiting for unfinished jobs....
0x8608bb7 ???
/usr/local/poudriere/jails/main-i386/usr/src/lib/csu/i386/crt1_s.S:88
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
gmake[4]: *** [/wrkdirs/usr/ports/lang/gcc14-devel/work/gcc-14-20230723/gcc/cp/Make-lang.in:255: s-selftest-c++] Error 1
rm gfdl.pod gcc.pod gfortran.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod
gmake[4]: Leaving directory '/wrkdirs/usr/ports/lang/gcc14-devel/work/.build/gcc'
gmake[3]: *** [Makefile:5024: all-stage2-gcc] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/lang/gcc14-devel/work/.build'
gmake[2]: *** [Makefile:25743: stage2-bubble] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/lang/gcc14-devel/work/.build'
gmake[1]: *** [Makefile:25966: bootstrap-lean] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/gcc14-devel/work/.build'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/gcc14-devel
Comment 6 John F. Carr 2023-07-27 17:49:53 UTC
With the latest ports tree lang/gcc14-devel builds on my systems.
Comment 7 John F. Carr 2023-09-13 17:11:18 UTC
This was fixed upstream, apparently.