Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908587 - sys-block/open-iscsi-2.1.9 fails to compile (MUSL-SYSTEM): idbm.c:2230:27: error: GLOB_ONLYDIR undeclared (first use in this function)
Summary: sys-block/open-iscsi-2.1.9 fails to compile (MUSL-SYSTEM): idbm.c:2230:27: er...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2023-06-16 08:17 UTC by Agostino Sarubbo
Modified: 2023-12-22 08:46 UTC (History)
0 users

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


Attachments
build.log (build.log,91.59 KB, text/plain)
2023-06-16 08:17 UTC, Agostino Sarubbo
Details
patch for musl (file_908587.txt,487 bytes, patch)
2023-12-18 03:00 UTC, 2857
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-06-16 08:17:34 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-block/open-iscsi-2.1.9 fails to compile (MUSL-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc but this bug MAY or MAY NOT BE related to musl.
Comment 1 Agostino Sarubbo gentoo-dev 2023-06-16 08:17:36 UTC
Created attachment 863913 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-06-16 08:17:37 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


FAILED: iscsid.p/usr_idbm.c.o 
../open-iscsi-2.1.9/usr/idbm.c:2230:27: error: 'GLOB_ONLYDIR' undeclared (first use in this function)
Comment 3 2857 2023-12-18 02:41:24 UTC
Can confirm, happens on amd64 box, musl profile: 

# eselect profile list | grep \*
  [34]  default/linux/amd64/17.0/musl/hardened (exp) *
Comment 4 2857 2023-12-18 02:45:02 UTC
Seems like musl lacks glob completely.

musl system:
# grep -r GLOB_ONLYDIR /usr/include/
<nothing>

glibc system:
# grep -r GLOB_ONLYDIR /usr/include/
/usr/include/glob.h:# define GLOB_ONLYDIR	 (1 << 13)/* Match only directories.  */
/usr/include/glob.h:			 |GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
Comment 5 2857 2023-12-18 03:00:31 UTC
Upstream has fixed it since: https://github.com/open-iscsi/open-iscsi/pull/426, but there was no new release (yet). I'm attaching the patch which fixes the build.
Comment 6 2857 2023-12-18 03:00:52 UTC
Created attachment 879769 [details, diff]
patch for musl
Comment 7 Larry the Git Cow gentoo-dev 2023-12-22 08:46:39 UTC
The bug has been closed via the following commit(s):

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

commit a4679a1282ec6986ce6f603bc81ab25c29ce7d49
Author:     Stijn Tintel <stijn@linux-ipv6.be>
AuthorDate: 2023-11-03 01:09:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-22 08:46:19 +0000

    sys-block/open-iscsi: fix build against musl
    
    Add an upstream patch that fixes build on musl.
    
    Closes: https://bugs.gentoo.org/908587
    Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
    Closes: https://github.com/gentoo/gentoo/pull/33657
    Signed-off-by: Sam James <sam@gentoo.org>

 ...iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch | 40 ++++++++++++++++++++++
 sys-block/open-iscsi/open-iscsi-2.1.9.ebuild       |  1 +
 2 files changed, 41 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57f8ff49737f8e52ad48753e46fc14b47fd92676

commit 57f8ff49737f8e52ad48753e46fc14b47fd92676
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-12-22 08:46:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-22 08:46:20 +0000

    sys-block/open-iscsi: add upstream ref to patch
    
    Bug: https://bugs.gentoo.org/908587
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch         | 3 +++
 1 file changed, 3 insertions(+)