Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 947175

Summary: app-text/opensp-1.5.2-r10: Fails to compile with musl /gcc15 - dcigettext.c:154:7: error: conflicting types for 'getcwd'; have 'char *(void)'
Product: Gentoo Linux Reporter: meartzheast877
Component: Current packagesAssignee: Benda Xu <heroxbd>
Status: UNCONFIRMED ---    
Severity: normal CC: immoloism, meartzheast877
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 880545    
Attachments: The build log
The output of emerge --info

Description meartzheast877 2024-12-29 16:26:04 UTC
The app-text/opensp package cannot compile on musl systems, I found the bug first in gcc 15, then I tried to test in gcc 14, but the package seemed to compile successfully, so I think the bug only seems to be reproducible in gcc 15.

The two errors are:
dcigettext.c:154:7: error: conflicting types for 'getcwd'; have 'char *(void)'
  154 | char *getcwd ();
      |       ^~~~~~
In file included from dcigettext.c:67:
/usr/include/unistd.h:82:7: note: previous declaration of 'getcwd' with type 'char *(char *, size_t)' {aka 'char *(char *, long unsigned int)'}
   82 | char *getcwd(char *, size_t);
      |       ^~~~~~
dcigettext.c: In function 'libintl_dcigettext':
dcigettext.c:544:17: error: too many arguments to function 'getcwd'; expected 0, have 2
  544 |           ret = getcwd (dirname, path_max);
      |                 ^~~~~~  ~~~~~~~
dcigettext.c:154:7: note: declared here
  154 | char *getcwd ();
      |       ^~~~~~


Reproducible: Always

Steps to Reproduce:
1. Have a musl system
2. Install gcc 15
3. Try to compile app-text/opensp
Actual Results:  
A compilation error appeared and did not allow the program to be installed correctly

Expected Results:  
It should have been compiled and installed successfully.
Comment 1 meartzheast877 2024-12-29 16:26:30 UTC
Created attachment 915487 [details]
The build log
Comment 2 meartzheast877 2024-12-29 16:26:42 UTC
Created attachment 915488 [details]
The output of emerge --info