Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549506 - sys-fs/lvm2: fails to compile against sys-libs/musl
Summary: sys-fs/lvm2: fails to compile against sys-libs/musl
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2015-05-14 22:53 UTC by Fredric Johansson
Modified: 2022-06-16 22:10 UTC (History)
4 users (show)

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


Attachments
Fix stdio usage (lvm2-fix-stdio-usage.patch,3.58 KB, patch)
2015-05-14 22:55 UTC, Fredric Johansson
Details | Diff
fix missing include and pthread constant (lvm2-musl-fixes.patch,1.50 KB, patch)
2015-05-14 22:56 UTC, Fredric Johansson
Details | Diff
Git formatted patch for inclusion in hardened-dev:musl overlay (lvm2-musl-hardened-dev.patch,81.07 KB, patch)
2015-05-14 22:58 UTC, Fredric Johansson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fredric Johansson 2015-05-14 22:53:49 UTC
lvm2-2.02.110 fails to compile against sys-libs/musl with various errors:
- Bad usage of stdio constants
- missing include to fcntl.h
- missing phtread constant PTHREAD_MUTEX_RECURSIVE_NP

Provided is two patches fixing these issues and one git formatted patch for addition to hardened-dev:musl overlay
Comment 1 Fredric Johansson 2015-05-14 22:55:57 UTC
Created attachment 403278 [details, diff]
Fix stdio usage

Patch fixing usage of stdio constants. Patch is taken from alpine linux (http://git.alpinelinux.org/cgit/aports/tree/main/lvm2/fix-stdio-usage.patch)
Comment 2 Fredric Johansson 2015-05-14 22:56:48 UTC
Created attachment 403280 [details, diff]
fix missing include and pthread constant
Comment 3 Fredric Johansson 2015-05-14 22:58:18 UTC
Created attachment 403282 [details, diff]
Git formatted patch for inclusion in hardened-dev:musl overlay
Comment 4 Anthony Basile gentoo-dev 2015-05-15 22:43:32 UTC
(In reply to Fredric Johansson from comment #3)
> Created attachment 403282 [details, diff] [details, diff]
> Git formatted patch for inclusion in hardened-dev:musl overlay

Committed.  Let's think about getting these patches upstream.
Comment 5 Alasdair Kergon 2015-05-15 23:29:29 UTC
Thanks - we'll take a look at these for upstream.  We've just added quite a bit of new code an another daemon too in today's 2.02.120 release so there could be some new things to deal with.
Comment 6 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2015-08-06 18:58:05 UTC
any more testing done for up-streaming this?
Comment 7 Larry the Git Cow gentoo-dev 2022-06-16 22:10:40 UTC
The bug has been closed via the following commit(s):

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

commit 515ec4557c56cf0e82b95873056c40d8c6269694
Author:     Alfred Persson Forsberg <cat@catcream.org>
AuthorDate: 2022-06-16 22:03:41 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-16 22:10:26 +0000

    sys-fs/lvm2: fix building on musl
    
    A few changes to make lvm2 build on musl. Each patch file is commented
    in more detail, see those. The mallinfo patch should be looked back to.
    
    Closes: https://bugs.gentoo.org/712336
    Closes: https://bugs.gentoo.org/549506
    Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
    Closes: https://github.com/gentoo/gentoo/pull/25883
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-fs/lvm2/files/lvm2-2.03.14-r1-add-fcntl.patch  | 24 ++++++++++++
 .../files/lvm2-2.03.14-r1-fopen-to-freopen.patch   | 43 ++++++++++++++++++++++
 sys-fs/lvm2/files/lvm2-2.03.14-r1-mallinfo.patch   | 18 +++++++++
 sys-fs/lvm2/lvm2-2.03.14-r1.ebuild                 |  3 ++
 4 files changed, 88 insertions(+)