Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 943867 - =sci-libs/superlu-5.3.0 fails with c23/gcc-15.0.0_pre20241117: sreadtriple.c:137:16: error: conflicting types for ‘fopen’; have ‘FILE *(void)’
Summary: =sci-libs/superlu-5.3.0 fails with c23/gcc-15.0.0_pre20241117: sreadtriple.c:...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-11-18 21:55 UTC by tdr
Modified: 2024-11-18 21:56 UTC (History)
2 users (show)

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


Attachments
failed build log (superlu-5.3.0:20241118-214240.build.log,50.34 KB, text/plain)
2024-11-18 21:55 UTC, tdr
Details
emerge --info (tdr-emerge--info.txt,6.41 KB, text/plain)
2024-11-18 21:56 UTC, tdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2024-11-18 21:55:28 UTC
gcc-15.0.0_pre20241117 default to using -std=gnu23 (which is stricter)

conflicting type retired + too  many arguments

Reproducible: Always

Actual Results:  
[12/184] /usr/bin/x86_64-pc-linux-gnu-gcc -Dsuperlu_EXPORTS -I/var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC  -DUSE_VENDOR_BLAS -DPRNTlevel=0 -DDEBUGlevel=0 -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fPIC -MD -MT SRC/CMakeFiles/superlu.dir/sreadtriple.c.o -MF SRC/CMakeFiles/superlu.dir/sreadtriple.c.o.d -o SRC/CMakeFiles/superlu.dir/sreadtriple.c.o -c /var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c
FAILED: SRC/CMakeFiles/superlu.dir/sreadtriple.c.o
/usr/bin/x86_64-pc-linux-gnu-gcc -Dsuperlu_EXPORTS -I/var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC  -DUSE_VENDOR_BLAS -DPRNTlevel=0 -DDEBUGlevel=0 -march=native -O3 -flto=56 -mprefer-vector-width=512 -fno-vect-cost-model -pipe -fPIC -MD -MT SRC/CMakeFiles/superlu.dir/sreadtriple.c.o -MF SRC/CMakeFiles/superlu.dir/sreadtriple.c.o.d -o SRC/CMakeFiles/superlu.dir/sreadtriple.c.o -c /var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c
/var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c: In function ‘sreadrhs’:
/var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c:137:16: error: conflicting types for ‘fopen’; have ‘FILE *(void)’
  137 |     FILE *fp, *fopen();
      |                ^~~~~
In file included from /var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/slu_sdefs.h:91,
                 from /var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c:22:
/usr/include/stdio.h:264:14: note: previous declaration of ‘fopen’ with type ‘FILE *(const char * restrict,  const char * restrict)’
  264 | extern FILE *fopen (const char *__restrict __filename,
      |              ^~~~~
/var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c:141:17: error: too many arguments to function ‘fopen’
  141 |     if ( !(fp = fopen("b.dat", "r")) ) {
      |                 ^~~~~
/var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c:137:16: note: declared here
  137 |     FILE *fp, *fopen();
      |                ^~~~~
/var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c: In function ‘sreadtriple’:
/var/tmp/portage/sci-libs/superlu-5.3.0/work/superlu-5.3.0/SRC/sreadtriple.c:48:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]


works with CFLAGS="${CFLAGS} -std=gnu17"
also works with =gcc-15.0.0_pre20241110
Comment 1 tdr 2024-11-18 21:55:55 UTC
Created attachment 909668 [details]
failed build log
Comment 2 tdr 2024-11-18 21:56:09 UTC
Created attachment 909669 [details]
emerge --info