Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 947175 - 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)'
Summary: app-text/opensp-1.5.2-r10: Fails to compile with musl /gcc15 - dcigettext.c:1...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Benda Xu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c23-porting
  Show dependency tree
 
Reported: 2024-12-29 16:26 UTC by meartzheast877
Modified: 2024-12-29 22:02 UTC (History)
2 users (show)

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


Attachments
The build log (build.log,27.96 KB, text/x-log)
2024-12-29 16:26 UTC, meartzheast877
Details
The output of emerge --info (info.log,5.93 KB, text/x-log)
2024-12-29 16:26 UTC, meartzheast877
Details

Note You need to log in before you can comment on or make changes to this bug.
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