Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947100 - sys-devel/bc-1.07.1-r6: fails to compile with musl /gcc15 - getopt.c:1135:1: error: conflicting types for 'getopt'; have 'int(int, char * const*, const char *)'
Summary: sys-devel/bc-1.07.1-r6: fails to compile with musl /gcc15 - getopt.c:1135:1: ...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-12-28 09:14 UTC by meartzheast877
Modified: 2024-12-28 19:31 UTC (History)
2 users (show)

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


Attachments
Build log (build.log,7.18 KB, text/plain)
2024-12-28 09:15 UTC, meartzheast877
Details
emerge --info (info.log,5.93 KB, text/plain)
2024-12-28 09:16 UTC, meartzheast877
Details

Note You need to log in before you can comment on or make changes to this bug.
Description meartzheast877 2024-12-28 09:14:14 UTC
sys-devel/bc crash if you try to compile it using musl and GCC 15. It seems to be the same error of getopt()

Reproducible: Always

Steps to Reproduce:
1. Have a musl system
2. Install GCC 15
3. Try to compile sys-devel/bc
Actual Results:  
The program cannot be compiled

Expected Results:  
It should have compiled and installed successfully.
Comment 1 meartzheast877 2024-12-28 09:15:09 UTC
Created attachment 915345 [details]
Build log
Comment 2 meartzheast877 2024-12-28 09:16:43 UTC
Created attachment 915346 [details]
emerge --info
Comment 3 meartzheast877 2024-12-28 12:33:15 UTC
(In reply to meartzheast877 from comment #0)
> sys-devel/bc doesn't compile using musl and GCC 15. It seems to be the same error of getopt()
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Have a musl system
> 2. Install GCC 15
> 3. Try to compile sys-devel/bc
> Actual Results:  
> The program cannot be compiled
> 
> Expected Results:  
> It should have compiled and installed successfully.
Comment 4 immolo 2024-12-28 19:31:30 UTC
x86_64-pc-linux-musl-gcc -DHAVE_CONFIG_H  -I. -I..  -I. -I.. -I./../h -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -pipe -Wall -funsigned-char -O2 -pipe -Wall -funsigned-char -c -o number.o number.c
getopt.c: In function '_getopt_initialize':
getopt.c:348:21: error: too many arguments to function 'getenv'; expected 0, have 1
  348 |   posixly_correct = getenv ("POSIXLY_CORRECT");
      |                     ^~~~~~  ~~~~~~~~~~~~~~~~~
getopt.c:200:14: note: declared here
  200 | extern char *getenv ();
      |              ^~~~~~
getopt.c: At top level:
getopt.c:1135:1: error: conflicting types for 'getopt'; have 'int(int,  char * const*, const char *)'
 1135 | getopt (int argc, char *const *argv, const char *optstring)
      | ^~~~~~
In file included from getopt.c:106:
./../h/getopt.h:144:12: note: previous declaration of 'getopt' with type 'int(void)'
  144 | extern int getopt ();
      |            ^~~~~~
make[2]: *** [Makefile:319: getopt.o] Error 1