Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337808 - dev-lang/ruby needs Apple thread_hooks patch for USE=threads
Summary: dev-lang/ruby needs Apple thread_hooks patch for USE=threads
Status: VERIFIED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-18 01:39 UTC by Charles Davis
Modified: 2010-10-24 20:46 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Davis 2010-09-18 01:39:07 UTC
When dev-lang/tk is installed with USE=threads, and USE=tk is set on dev-lang/ruby, ruby flat out refuses to emerge--even if threads is also set on ruby.

Reproducible: Always

Steps to Reproduce:
1. Run "USE=threads emerge tk"
2. Run "USE="threads tk" emerge ruby"

Actual Results:  
When attempting to emerge ruby, emerge prints this:
emerge: there are no ebuilds built with USE flags to satisfy "dev-lang/tk[threads=]".
!!! One of the following packages is required to complete your request:
- dev-lang/tk-8.5.8-r1 (Change USE: -threads)
- dev-lang/ruby-1.8.7_p302 (Change USE: +threads)
(dependency required by "dev-lang/ruby-1.8.7_p302" [ebuild])
(dependency required by "ruby" [argument])


Expected Results:  
Emerge should emerge tk with threads, then emerge ruby with threads and tk support.

Portage 2.2.01.16365-prefix (prefix/darwin/macos/10.6/x86, gcc-4.2.1, unavailable, 10.4.0 i386)
=================================================================
                        System Settings
=================================================================
System uname: Darwin-10.4.0-i386-32bit
Timestamp of tree: Sat, 18 Sep 2010 00:10:26 +0000
distcc 3.1-toolwhip.1 i386-apple-darwin10.0 [disabled]
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r2
dev-util/cmake:      2.8.1-r2
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.9.6-r3, 1.11.1
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
ACCEPT_KEYWORDS="~x86-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-apple-darwin10"
CFLAGS="-O2 -pipe -march=core2"
CHOST="i686-apple-darwin10"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/portage /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=core2"
DISTDIR="/Users/chip/Gentoo/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixlafiles fixpackages news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-dead_strip_dylibs"
MAKEOPTS="-j4"
PKGDIR="/Users/chip/Gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/chip/Gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Users/chip/Gentoo/var/tmp"
PORTDIR="/Users/chip/Gentoo/usr/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua bash-completion berkdb coreaudio cracklib crypt curl cxx dbus exceptions expat extensions gdbm gnutls gpg iconv icu ipv6 jbig jpeg ldap libssh2 lzma lzo mmx mmxext mng modules mysql ncurses nls objc objc++ pch perl png prefix python qt3support readline ruby sql sqlite3 sse sse2 ssl subversion tcl threads tiff tk truetype unicode vim-syntax x86-macos xml zlib" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

=================================================================
                        Package Settings
=================================================================

dev-lang/tk-8.5.8-r1 was built with the following:
USE="aqua (prefix) threads truetype -debug -xscreensaver"
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-09-18 01:48:22 UTC
(In reply to comment #0)

> Steps to Reproduce:
> 1. Run "USE=threads emerge tk"
> 2. Run "USE="threads tk" emerge ruby"

> !!! One of the following packages is required to complete your request:
> - dev-lang/tk-8.5.8-r1 (Change USE: -threads)
> - dev-lang/ruby-1.8.7_p302 (Change USE: +threads)


I don't see how this is a bug. The output tells you that you either need to set -threads on tk or +threads on ruby. That means you cannot do "USE=threads emerge tk ruby".
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-09-18 02:00:44 UTC
Of course, it is abit confusing. I may be wrong too after thinking about it more. =/
Comment 3 Charles Davis 2010-09-20 03:15:17 UTC
I figured out why this is failing. The threads flag is forced off on Mac OS X:

[ebuild   R   ] dev-lang/ruby-1.8.7_p302  USE="berkdb gdbm ipv6 ncurses readline ssl tk -debug -doc -examples -libedit -rubytests -socks5 (-threads) -xemacs" 0 kB

Notice the parentheses around the '-threads' USE flag.

MacPorts seems to have a special variant for their Ruby port (that's on by default):

ruby has the variants:
   ...
[+]thread_hooks: apply Apple's thread_hooks patch

Apparently, Apple has locally modified Ruby, and this "thread_hooks" patch is needed to make threading work on Mac OS X. I don't know if this will allow us to stop forcing USE=threads off for ruby, but it's worth a shot IMO.
Comment 4 Fabian Groffen gentoo-dev 2010-09-20 06:44:24 UTC
I don't know where the mask comes from, but it feels like we indeed can apply MacPort's patch for USE=threads on OSX.
Comment 5 Fabian Groffen gentoo-dev 2010-09-21 17:14:45 UTC
The patch that macports applies, is actually not (no longer?) applied by Apple.  So I rather don't have it.
Comment 6 Fabian Groffen gentoo-dev 2010-09-21 18:05:36 UTC
The threads mask is simply out-of-date.  I removed the mask, that should fix this bug.
Comment 7 Charles Davis 2010-10-24 20:46:36 UTC
Closing. Thanks for fixing this!