Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919935 - dev-libs/gmp-6.3.0: error: ‘for’ loop initial declarations are only allowed in C99 mode [Prefix bootstrap/stage2]
Summary: dev-libs/gmp-6.3.0: error: ‘for’ loop initial declarations are only allowed i...
Status: UNCONFIRMED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-15 06:20 UTC by Moritz Brunner
Modified: 2023-12-15 06:25 UTC (History)
0 users

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


Attachments
stage2 bootstrap log (stage2.log.xz,147.70 KB, application/x-xz)
2023-12-15 06:25 UTC, Moritz Brunner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Brunner 2023-12-15 06:20:50 UTC
During stage2 bootstrap of bootstrap-prefix.sh (LATEST_TREE_YES is NOT set), compilation of dev-libs/gmp fails with the following error:

> /srv/moritz/gentoo/tmp/var/tmp/portage/dev-libs/gmp-6.3.0/work/gmp-6.3.0/gen-sieve.c: In function ‘setmask’:
> /srv/moritz/gentoo/tmp/var/tmp/portage/dev-libs/gmp-6.3.0/work/gmp-6.3.0/gen-sieve.c:99:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
>    for (unsigned i = 0; i < 2 * a * b; ++i)
>    ^
> /srv/moritz/gentoo/tmp/var/tmp/portage/dev-libs/gmp-6.3.0/work/gmp-6.3.0/gen-sieve.c:99:3: note: use option -std=c99 or -std=gnu99 to compile your code

The host system is "CentOS 7.9.2009", the host compiler is "gcc version 4.8.5 20150623 (Red Hat 4.8.5-44)"

I assume this problem stems from the fact that newer versions of GCC use a more modern default value for -std by default.

Reproducible: Always

Steps to Reproduce:
1. Run bootstrap-prefix.sh, select testing during questionaire
2. Wait until stage2
Actual Results:  
dev-libs/gmp fails to compile.

Expected Results:  
The bootstrap process should continue without error.
Comment 1 Moritz Brunner 2023-12-15 06:25:54 UTC
Created attachment 879458 [details]
stage2 bootstrap log