Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 292191

Summary: Enable sys-apps/rng-tools-2-r1 to compile on uclibc
Product: Gentoo Linux Reporter: Ed Wildgoose <gentoo>
Component: [OLD] Core systemAssignee: Krzysztof Pawlik (RETIRED) <nelchael>
Status: RESOLVED FIXED    
Severity: normal CC: base-system
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 292189    
Bug Blocks:    
Attachments: rng-tools-uclibc.patch
Patch against configure.ac to test for who provides argp
Patch against rng-tools-2-r1 to apply the test-for-argp.patch
Patch against rng-tools-3 to apply the test-for-argp.patch

Description Ed Wildgoose 2009-11-06 22:40:46 UTC
rng-tools requires argp functions which only exist in glibc.  These functions have been broken out into a separate "argp-standalone" package and linking to this will allow rng-tools to be built on embedded platforms

A small patch is required to tell the build it needs to use this external library. I have depended on the USE flag: elibc_uclibc, in order to decide if we need to use the external argp library

Reproducible: Always

Steps to Reproduce:
Comment 1 Ed Wildgoose 2009-11-06 22:42:16 UTC
Created attachment 209482 [details, diff]
rng-tools-uclibc.patch
Comment 2 Ed Wildgoose 2009-11-06 22:44:04 UTC
This bug depends on bug #292189 for the sys-libs/argp-standalone ebuild
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-11-10 01:54:32 UTC
please ping base-system after the library has been added, not before.
Comment 4 SpanKY gentoo-dev 2012-04-23 04:34:09 UTC
i don't think this is the right way to go about things.  we need something that scales and doesn't involve modifying every ebuild.
Comment 5 Ed Wildgoose 2012-04-23 10:28:56 UTC
Do you mean you want it submitting upstream to uclibc?

Note what else do we have that will ever use it?  Can probably answer that question by looking in alpine-linux tree (or perhaps openembedded/wrt?)

Would your opinion change if we only have one build ever use it?
Comment 6 Anthony Basile gentoo-dev 2012-04-23 10:44:07 UTC
(In reply to comment #5)
> Do you mean you want it submitting upstream to uclibc?
> 
> Note what else do we have that will ever use it?  Can probably answer that
> question by looking in alpine-linux tree (or perhaps openembedded/wrt?)
> 
> Would your opinion change if we only have one build ever use it?

rng-tools should be patched to rework the call to argp with something more mainline, preferably posix compliant.
Comment 7 Ed Wildgoose 2012-04-23 10:47:23 UTC
Surely that's just swapping one patchset for another? How does it scale better?

At least argp_standalone is a drop in library for a rarely required problem that doesn't consume much additional on disk space (which is the main reason it has been declined from uclibc mainline previously)

Note: I'm not disagreeing, I just don't understand what is the core problem so we can solve *that*?
Comment 8 Anthony Basile gentoo-dev 2012-04-27 08:58:06 UTC
(In reply to comment #7)
> Surely that's just swapping one patchset for another? How does it scale
> better?

I wasn't addressing that.

Anyhow, I looked at the code and scratch my idea in comment 6 since there are multiple calls to argp_* friends.  I don't know how many other packages use argp but it might be worth briging it up on the uclibc list.  Since the arpg code has been broken out, it could be important into uclibc.
Comment 9 SpanKY gentoo-dev 2012-05-24 04:56:51 UTC
(In reply to comment #5)

i was thinking argp was in POSIX ... it is not.  scanning my system shows few packages using it (like ~5 out of ~2000), so it prob won't be so bad.

we shouldn't be doing this based on USE=uclibc though.  for autotool packages, we should check to see if the C library provides argp_parse and if not, fall back to the argp library.
Comment 10 Anthony Basile gentoo-dev 2012-05-27 01:16:58 UTC
Created attachment 313197 [details, diff]
Patch against configure.ac to test for who provides argp

I tested this on a glibc system and a uclibc system with/without argp-standalone.  It works as expected.

I'll get the patches against the ebuilds up in a bit.
Comment 11 Anthony Basile gentoo-dev 2012-05-27 01:22:28 UTC
Created attachment 313199 [details, diff]
Patch against rng-tools-2-r1 to apply the test-for-argp.patch
Comment 12 Anthony Basile gentoo-dev 2012-05-27 01:23:15 UTC
Created attachment 313201 [details, diff]
Patch against rng-tools-3 to apply the test-for-argp.patch
Comment 13 Anthony Basile gentoo-dev 2012-07-18 01:24:48 UTC
ping nelchael
Comment 14 Anthony Basile gentoo-dev 2012-07-19 10:45:31 UTC
Patch added with permission.

@Ed, please test and reopen if this is still a problem.


*rng-tools-3-r1 (19 Jul 2012)

  19 Jul 2012; Anthony G. Basile <blueness@gentoo.org> +rng-tools-3-r1.ebuild,
  +files/test-for-argp.patch:
  Patch configure.ac to search for arpg in glibc or libargp, bug #292191