Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 299152 - app-admin/eselect-python-20091230 fails to build on systems without strtok_r()
Summary: app-admin/eselect-python-20091230 fails to build on systems without strtok_r()
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All HPUX
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-12-31 18:43 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2010-03-21 22:02 UTC (History)
0 users

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


Attachments
build.log (build.log,6.74 KB, text/plain)
2009-12-31 18:44 UTC, Jeremy Olexa (darkside) (RETIRED)
Details
info.txt (info.txt,2.29 KB, text/plain)
2009-12-31 21:00 UTC, Jeremy Olexa (darkside) (RETIRED)
Details
Patch to use strtok when strtok_r is unavalilable (fix-hpux.patch,973 bytes, patch)
2009-12-31 21:34 UTC, Jonathan Callen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-31 18:43:53 UTC
(incidentally, looks like this is an odd \n placed in the error message)

 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * python-wrapper.c:59: warning: implicit declaration of function 'strtok_r'
 * 
 * QA Notice: Package has poor programming practices which may compile
 *            but will almost certainly crash on 64bit architectures.
 * 
 * Function `strtok_r' implicitly converted to pointer at python-wrapper.c:59
 * 
 *  Please file a bug about this at http://bugs.gentoo.org/
 *  with the maintaining herd of the package.
 * 
 * ERROR: app-admin/eselect-python-20090824-r00.1 failed:
 *   install aborted due to poor programming practices shown above
 * 
 * Call stack:
 *   misc-functions.sh, line 1435:  Called install_qa_check
 *   misc-functions.sh, line   91:  Called install_qa_check_misc
 *   misc-functions.sh, line  523:  Called die
 * The specific snippet of code:
 *                             die "install aborted due to" \
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-31 18:44:21 UTC
Created attachment 214788 [details]
build.log
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-31 20:54:46 UTC
14:16 <@darkside_> Arfrever: yo, can you look at a bug for me?
14:16 <@Arfrever> Which bug?
14:17 <@darkside_> bug 299152
14:17 <+Willikins> darkside_: https://bugs.gentoo.org/299152 
                   "app-admin/eselect-python-20090824-r00.1 fails to build on 
                   hpux ia64"; Gentoo/Alt, Prefix Support; NEW; 
                   darkside@g.o:prefix@g.o
14:17 <@Arfrever> darkside_: eselect-python-20091230 was released.
14:18 <@darkside_> ok, does it fix that error noted in the build.log? Function 
                   `strtok_r' implicitly converted to pointer at 
                   python-wrapper.c:59
14:27 <@Arfrever> darkside_: No. strtok_r is documented in 
http://www.opengroup.org/onlinepubs/9699919799/functions/strtok.html
14:30  * Blackb|rd recommends reading the "CONFORMING TO" section of the stpcpy 
          manpage
14:32 <@darkside_> indeed.
14:42 <@darkside_> Arfrever: so, can you fix it?
14:43 <@Arfrever> darkside_: If somebody creates a patch, then I could review 
                  it.
14:44 <@darkside_> great, another blocker due to eselect-python. cool.
14:45 <@darkside_> please don't write code that is needed at the system level 
                   that doesn't work on all archs
14:46 <@Arfrever> darkside_: It's rather a bug in hpux's libc.

I'm not qualified to help any further.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-12-31 21:00:00 UTC
Created attachment 214791 [details]
info.txt
Comment 4 Jonathan Callen (RETIRED) gentoo-dev 2009-12-31 21:34:19 UTC
Created attachment 214796 [details, diff]
Patch to use strtok when strtok_r is unavalilable
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-01-04 22:34:22 UTC
(In reply to comment #4)
> Created an attachment (id=214796) [details]
> Patch to use strtok when strtok_r is unavalilable
> 

Thanks for the patch, I have a feeling it will work but it doesn't apply to 200908* and to bump it requires significant work that I don't have time for *right* now.
Comment 6 Fabian Groffen gentoo-dev 2010-01-05 07:23:11 UTC
Is there any reason to use strtok_r() at all?  There is nothing multi-threadingish going on in this wrapper (I hope), right?
Comment 7 Fabian Groffen gentoo-dev 2010-01-07 15:39:37 UTC
I've fixed this in 20091230-r00.1 with the plain-c patch.
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-01-07 17:18:04 UTC
I'm planning to apply a patch based on patch from comment #4.
Nothing has been changed yet in eselect-python trunk, so this bug shouldn't be closed.
Comment 9 Fabian Groffen gentoo-dev 2010-01-07 17:24:25 UTC
Rediculous.  But fine, do as you think is useful, it'll undoubtedly break again in some other way.
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-21 12:36:09 UTC
Fixed in r315.
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-21 22:02:09 UTC
Fixed in app-admin/eselect-python-20100321.