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

Bug 646232

Summary: app-shells/mksh-52 - In file included from lalloc.c:21:0: sh.h:416:12: error: conflicting types for 'getrusage'
Product: Gentoo Linux Reporter: Alexander Hof <gentoobugs>
Component: Current packagesAssignee: Haelwenn (lanodan) Monnier <contact>
Status: RESOLVED OBSOLETE    
Severity: normal CC: gentoobugs, proxy-maint
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
emerge --info mksh
emerge -pqv mksh
build log
environment

Description Alexander Hof 2018-01-31 19:10:28 UTC
Created attachment 517282 [details]
emerge --info

Building mksh fails with "error: conflicting types for 'getrusage'"

Same compile time error on more recent versions.
Comment 1 Alexander Hof 2018-01-31 19:11:13 UTC
Created attachment 517284 [details]
emerge --info mksh
Comment 2 Alexander Hof 2018-01-31 19:11:46 UTC
Created attachment 517288 [details]
emerge -pqv mksh
Comment 3 Alexander Hof 2018-01-31 19:12:55 UTC
Created attachment 517290 [details]
build log
Comment 4 Alexander Hof 2018-01-31 19:13:14 UTC
Created attachment 517292 [details]
environment
Comment 5 Alexander Hof 2018-01-31 19:45:20 UTC
PS: With USE='-static' it (obviously) works.
Comment 6 Pacho Ramos gentoo-dev 2019-01-12 10:57:36 UTC
does 56c release work?
Comment 7 Alexander Hof 2019-01-13 13:48:40 UTC
(In reply to Pacho Ramos from comment #6)
> does 56c release work?

Same with 52. USE='-static' works, USE='static' fails.
Comment 8 Alexander Hof 2019-03-20 10:06:06 UTC
(In reply to Alexander Hof from comment #7)
> (In reply to Pacho Ramos from comment #6)
> > does 56c release work?
> 
> Same with 52. USE='-static' works, USE='static' fails.

Still present in 57.
Comment 9 Alexander Hof 2019-04-30 09:27:11 UTC
(In reply to Alexander Hof from comment #8)
> (In reply to Alexander Hof from comment #7)
> > (In reply to Pacho Ramos from comment #6)
> > > does 56c release work?
> > 
> > Same with 52. USE='-static' works, USE='static' fails.
> 
> Still present in 57.

Also in 57-r1.
Comment 10 Haelwenn (lanodan) Monnier 2019-05-19 04:06:13 UTC
Can you try with adding -DMKSH_NO_LIMITS to the CFLAGS? With this being added it then works for me. If it works for you too I'll fix the ebuild, otherwise I'll drop the dependency on klibc and use the system libc when possible (ie. musl).
Comment 11 Alexander Hof 2019-05-22 12:26:52 UTC
(In reply to Haelwenn Monnier from comment #10)
> Can you try with adding -DMKSH_NO_LIMITS to the CFLAGS? With this being
> added it then works for me. If it works for you too I'll fix the ebuild,
> otherwise I'll drop the dependency on klibc and use the system libc when
> possible (ie. musl).

It compiles with -DMKSH_NO_LIMITS, but then you lose mksh's ulimit abilities...
Comment 12 Haelwenn (lanodan) Monnier 2019-05-22 13:18:05 UTC
(In reply to Alexander Hof from comment #11)
> (In reply to Haelwenn Monnier from comment #10)
> > Can you try with adding -DMKSH_NO_LIMITS to the CFLAGS? With this being
> > added it then works for me. If it works for you too I'll fix the ebuild,
> > otherwise I'll drop the dependency on klibc and use the system libc when
> > possible (ie. musl).
> 
> It compiles with -DMKSH_NO_LIMITS, but then you lose mksh's ulimit
> abilities...

Well, I guess this is a limit of klibc, but AFAIK using klibc is the only way to get USE=static to properly work with ELIBC=glibc / TARGET=*-gnu* because glibc is broken.
Comment 13 Haelwenn (lanodan) Monnier 2019-12-09 17:28:56 UTC
Note: app-shells/mksh-57-r2 removes dependency on klibc so USE=static is masked by default and unmasked in uClibc and musl (so basically use-masking on glibc/TARGET=*-gnu*).

Tagging it as resolved-obsolete because it's not applicable to the current ~* version.