Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 894176 - dev-tcltk/tclx-8.4.4-r1 fails to compile (MUSL-CLANG-SYSTEM): tclXunixSock.c:198:13: error: call to undeclared function rresvport; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Summary: dev-tcltk/tclx-8.4.4-r1 fails to compile (MUSL-CLANG-SYSTEM): tclXunixSock.c:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2023-02-13 13:41 UTC by Agostino Sarubbo
Modified: 2023-03-15 21:50 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,95.75 KB, text/plain)
2023-02-13 13:41 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-13 13:41:01 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-tcltk/tclx-8.4.4-r1 fails to compile (MUSL-CLANG-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-CLANG-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc + clang16 but this bug MAY or MAY NOT BE related to musl/clang16.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-13 13:41:03 UTC
Created attachment 850686 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-02-13 13:41:05 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


./generic/tclXprofile.c:323:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
./unix/tclXunixCmds.c:109:1: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
./unix/tclXunixSock.c:198:13: error: call to undeclared function 'rresvport'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Comment 3 Larry the Git Cow gentoo-dev 2023-03-15 21:12:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=281535f88931fec48c2dd2fa3a8f4f3cfac201b0

commit 281535f88931fec48c2dd2fa3a8f4f3cfac201b0
Author:     Alfredo Tupone <tupone@gentoo.org>
AuthorDate: 2023-03-15 21:11:27 +0000
Commit:     Alfredo Tupone <tupone@gentoo.org>
CommitDate: 2023-03-15 21:12:24 +0000

    dev-tcltk/tclx: filter rresvport if not present
    
    Closes: https://bugs.gentoo.org/894176
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>

 dev-tcltk/tclx/files/tclx-8.4.4-musl.patch         | 25 ++++++++++++++++++++++
 .../{tclx-8.4.4-r3.ebuild => tclx-8.4.4-r4.ebuild} |  1 +
 2 files changed, 26 insertions(+)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-15 21:17:19 UTC
rresvport may need _BSD_SOURCE to be available. I'll check later if I remember.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-15 21:17:37 UTC
(Your fix is reasonable, I'm just wondering if musl really doesn't have it)
Comment 6 Alfred Persson 2023-03-15 21:38:13 UTC
(In reply to Sam James from comment #5)
> (Your fix is reasonable, I'm just wondering if musl really doesn't have it)

doesn't seem like it

tested:
>#define _BSD_SOURCE
>#include <netdb.h>
>
>int main() {
>	int port;
>	rresvport(&port);
>	return 0;
>}

and it did not work

also: grep -rsin "rresvport" in musl.git did not return anything.

also^2:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c93e299c4c4db9edf7c120a87a6f132cbbdfef8
Comment 7 Alfred Persson 2023-03-15 21:39:51 UTC
(In reply to Alfred Persson from comment #6)
> (In reply to Sam James from comment #5)
> > (Your fix is reasonable, I'm just wondering if musl really doesn't have it)
> 
> doesn't seem like it
> 
> tested:
> >#define _BSD_SOURCE
> >#include <netdb.h>
> >
> >int main() {
> >	int port;
> >	rresvport(&port);
> >	return 0;
> >}
> 
> and it did not work
> 
> also: grep -rsin "rresvport" in musl.git did not return anything.
> 
> also^2:
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=9c93e299c4c4db9edf7c120a87a6f132cbbdfef8

should probably implement this same patch for those packages too instead of just package.mask:ing. Can't right now though
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-15 21:50:34 UTC
nice, thanks!