Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690426 - sys-apps/gentoo-functions-0.12: fails to build on musl-1.1.23
Summary: sys-apps/gentoo-functions-0.12: fails to build on musl-1.1.23
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL: https://git.musl-libc.org/cgit/musl/c...
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-sysmacros
  Show dependency tree
 
Reported: 2019-07-22 05:19 UTC by Georgy Yakovlev
Modified: 2020-10-08 02:17 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev gentoo-dev 2019-07-22 05:19:30 UTC
A commit landed to musl recently:

https://git.musl-libc.org/cgit/musl/commit/?id=a31a30a0076c284133c0f4dfa32b8b37883ac930

TLDR: they no longer #include <sys/sysmacros.h>
in sys/types.h

thus gentoo-functions fails to build on musl-1.1.23

with

consoletype.c: In function 'check_devnode':
consoletype.c:60:8: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
  maj = major(sb.st_rdev);
        ^~~~~
/usr/lib/gcc/x86_64-gentoo-linux-musl/8.3.0/../../../../x86_64-gentoo-linux-musl/bin/ld: /tmp/portage/sys-apps/gentoo-functions-0.12/temp/ccNhcnoC.o: in function `main':
consoletype.c:(.text.startup+0x15a): undefined reference to `major'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: consoletype] Error 1
Comment 1 Jory A. Pratt gentoo-dev 2019-08-22 02:15:14 UTC
This is only an issue for musl due to the GLIBC define in headers.h. This should be assigned to the maintainers and not the musl team.
Comment 2 Anthony Basile gentoo-dev 2019-08-23 15:43:58 UTC
The correct header to include for the macros major()/minor() is <sys/sysmacros.h>.  This is correct for any libc and I've added the change to gentoo-functions.  See

https://github.com/gentoo/gentoo-functions/commit/1518beca0b5a2730a87da9ce82299ef6469bfe8a

@WilliamH  Do you want to cut a new release of gentoo-functinos.  I've tested on glibc and older versions of musl.  It doesn't break backward compat and it is needed going forward.
Comment 3 Anthony Basile gentoo-dev 2019-08-24 00:23:13 UTC
I've added the fix to the musl overlay as a stop gap until it hits the main tree:

https://gitweb.gentoo.org/proj/musl.git/commit/?id=6c92304798f4ccb6b27b9248fc150f7085247711
Comment 4 Larry the Git Cow gentoo-dev 2020-10-08 02:17:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/musl.git/commit/?id=7b05fe46328060611df260888d7aa05d9347eda0

commit 7b05fe46328060611df260888d7aa05d9347eda0
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-10-08 02:15:31 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-10-08 02:16:29 +0000

    sys-apps/gentoo-functions: drop, ::gentoo version works fine.
    
    Closes: https://bugs.gentoo.org/690426
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-apps/gentoo-functions/Manifest                 |  1 -
 .../files/gentoo-functions-sysmacros.patch         | 32 ----------------------
 .../gentoo-functions/gentoo-functions-0.12.ebuild  | 32 ----------------------
 sys-apps/gentoo-functions/metadata.xml             | 21 --------------
 4 files changed, 86 deletions(-)