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

Bug 256787

Summary: dev-lang/ruby-1.8.6_p287-r1[01] fails to emerge on OS X
Product: Gentoo/Alt Reporter: MATSUI Tetsushi <VED03370>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: OS X   
Whiteboard:
Package list:
Runtime testing required: ---

Description MATSUI Tetsushi 2009-01-29 13:33:29 UTC
The compilation of ruby fails at ext/readline.


Reproducible: Always

Steps to Reproduce:
1.emerge ruby on OS X

Actual Results:  
make[1]: Entering directory `/Users/tetsushi/Gentoo/var/tmp/portage/dev-lang/ruby-1.8.6_p287-r11/work/ruby-1.8.6-p287/ext/readline'
i686-apple-darwin9-gcc -I. -I../.. -I../../. -I../.././ext/readline -DHAVE_READLINE_READLINE_H -DHAVE_READLINE_HISTORY_H -DHAVE_RL_DEPREP_TERM_FUNCTION -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_BASIC_WORD_BREAK_CHARACTERS -DHAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS -DHAVE_RL_BASIC_QUOTE_CHARACTERS -DHAVE_RL_COMPLETER_QUOTE_CHARACTERS -DHAVE_RL_FILENAME_QUOTE_CHARACTERS -DHAVE_RL_ATTEMPTED_COMPLETION_OVER -DHAVE_RL_LIBRARY_VERSION -DHAVE_RL_EVENT_HOOK -DHAVE_RL_CLEANUP_AFTER_SIGNAL -DHAVE_REPLACE_HISTORY_ENTRY -DHAVE_REMOVE_HISTORY   -fno-common -O2 -march=nocona -pipe -fno-strict-aliasing  -fno-common -pipe -fno-common  -c readline.c
readline.c: In function 'filename_completion_proc_call':
readline.c:703: error: 'filename_completion_function' undeclared (first use in this function)
readline.c:703: error: (Each undeclared identifier is reported only once
readline.c:703: error: for each function it appears in.)
readline.c:703: warning: assignment makes pointer from integer without a cast
readline.c: In function 'username_completion_proc_call':
readline.c:730: error: 'username_completion_function' undeclared (first use in this function)
readline.c:730: warning: assignment makes pointer from integer without a cast
make[1]: *** [readline.o] Error 1
make[1]: Leaving directory `/Users/tetsushi/Gentoo/var/tmp/portage/dev-lang/ruby-1.8.6_p287-r11/work/ruby-1.8.6-p287/ext/readline'
make: *** [all] Error 1
 * ERROR: dev-lang/ruby-1.8.6_p287-r11 failed:
 *   emake failed
 * 
 * Call stack:
 *               ebuild.sh:  49: <call src_compile>
 *             environment:3263:     emake EXTLDFLAGS="${LDFLAGS}" || die "emake failed"
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.


Expected Results:  
ruby is emerged successfully

Some web sources suggest that on OS X ruby needs --with-readline-dir specified. 
So there is a workaround adding
myconf="--with-readline-dir=${EPREFIX}/usr ${myconf}"
above econf line of ebuild.
I tried it for -r10 by myself (yes, it works), but maybe you have a better way.
Comment 1 Fabian Groffen gentoo-dev 2009-01-30 20:05:28 UTC
Nope, it's fine to tell ruby where it should look for readline.  I applied your suggestion to the ebuild.  Thanks!