Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529576 - net-libs/libtirpc-0.2.4-r1 fails compilation with sys-libs/musl
Summary: net-libs/libtirpc-0.2.4-r1 fails compilation with sys-libs/musl
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Network Filesystems
URL:
Whiteboard: hardened-devel repo, musl overlay
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-11-16 20:20 UTC by DaggyStyle
Modified: 2014-11-20 02:59 UTC (History)
1 user (show)

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


Attachments
patch (libtirpc.patch,35.06 KB, patch)
2014-11-16 20:20 UTC, DaggyStyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DaggyStyle 2014-11-16 20:20:19 UTC
this patch allow net-libs/libtirpc-0.2.4-r1 to compile and run under gentoo over musl

Reproducible: Always
Comment 1 DaggyStyle 2014-11-16 20:20:54 UTC
Created attachment 389534 [details, diff]
patch
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-17 12:50:30 UTC
What fails?
Comment 3 Felix Janda 2014-11-17 18:07:02 UTC
Compilation fails in part because of missing <sys/cdefs.h> and missing <sys/queue.h>. This patch is very likely intended for the musl branch on the hardened-development overlay, which collects patches to make things work with musl.

For upstreaming the patch should likely be split up. One for fixing the <sys/cdefs.h> portability issue. For <sys/queue.h>, one could try to ask the project to include a copy for systems missing the header. I'm not sure about what the other parts of the patch do.
Comment 4 DaggyStyle 2014-11-17 18:16:54 UTC
(In reply to Jeroen Roovers from comment #2)
> What fails?

compilation fails, thanks for catching this, didn't noticed I was missing something
Comment 5 DaggyStyle 2014-11-17 18:23:03 UTC
(In reply to Felix Janda from comment #3)
> Compilation fails in part because of missing <sys/cdefs.h> and missing
> <sys/queue.h>. This patch is very likely intended for the musl branch on the
> hardened-development overlay, which collects patches to make things work
> with musl.
> 
> For upstreaming the patch should likely be split up. One for fixing the
> <sys/cdefs.h> portability issue. For <sys/queue.h>, one could try to ask the
> project to include a copy for systems missing the header. I'm not sure about
> what the other parts of the patch do.

the patch does 4 things:
1. remove headers (queue.h and cdefs.h)
2. add definitions which are needed (TAILQ and others are being used in the code and there is no implementation for it in musl or THROW)
3. add code parts (for code that is gnu and needed for the program) or includes that have data which is used by the program.
4. the defines __BEGIN_DECLS and __END_DECLS doesn't exists in musl libc, so according to the musl faq at http://wiki.musl-libc.org/wiki/FAQ#Q:_I.27m_trying_to_compile_something_against_musl_and_I_get_error_messages_about_sys.2Fcdefs.h it should be replaced.
Comment 6 SpanKY gentoo-dev 2014-11-20 02:59:45 UTC
removing the __BEGIN_DECLS is not an improvement

at any rate, you should send these fixes to the libtripc people:
libtirpc-devel@lists.sourceforge.net