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

Bug 940683

Summary: sys-process/parallel: PERL_FEATURES=ithreads should be required
Product: Gentoo Linux Reporter: Emanuele Torre <torreemanuele6>
Component: Current packagesAssignee: Sam James <sam>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Emanuele Torre 2024-10-03 06:08:45 UTC
The parcat tool installed by this package doesn't work at all without
PERL_FEATURES=ithreads.  It fails immediately at the "use threads;" at
the top of /usr/bin/parcat:

    $ parcat
    This Perl not built to support threads
    Compilation failed in require at /usr/bin/parcat line 29.
    BEGIN failed--compilation aborted at /usr/bin/parcat line 29.

An optfeatures should at least mention that PERL_FEATURES=ithreads is
required, or parcat should be gated by a local USE flag that requires
perl[perl_features_ithreads], and not installed otherwise.


However, even though I understand it may be inconvenient since
PERL_FEATURES=ithreads is not the default, I think that
sys-process/parallel should really always require it.

I didn't get a chance to test this because I only noticed it after
already having rebuilt everything with PERL_FEATURES=ithreads, but it
seems that parallel itself (and the sem utility that is a symlink to
parallel equivalent to parallel --semaphore) conditionally uses an
embedded version of parcat that requires threads for certain options:

* line 594 of /usr/bin/parallel run for --pipe --shard or --pipe --bin
    @Global::cat_prepends =
	map { "perl -e $parcat ".
		  join(" ",shell_quote(@$_))." | "} @parcatfifos;

And, from briefly inspecting the code, it doesn't even seem to check for
failure of that command: it just assumes that it will succeed because it
assumes that perl supports threads.


o/
 emanuele6