[Hacking-es] [OFF-TOPIC]problema con IRB ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-darwin9.6.0] y readline
Andrés gutiérrez
andresgutgon at gmail.com
Sun Mar 29 14:23:24 GMT 2009
Gracias Daniel, me lo tengo que mirar.
Muchas gracias
Un saludo
2009/3/29 Daniel Rodriguez Troitiño <notzcoolx at yahoo.es>
> 2009/3/29 Andrés gutiérrez <andresgutgon at gmail.com>:
> > Si te soy sincero ya no sé donde me encuentro. He borrado todas las gemas
> y
> > todo los que tiene que ver con el ruby de /usr/local
> > En cuanto a readline lo he recompilado como 8 veces (v. 5.2) y ahora me
> he
> > descargado la (v. 6.0) y tampoco me arregla el problema
> >
> > El readline que viene con mac os x esta ahi, pero no creo que tenga
> porque
> > molestar cundo compilo ruby desde /usr/local/src
> > ya que lo hago así:
> >
> > ./configure --prefix=/usr/local --enable-pthread
> > --with-readline-dir=/usr/local --enable-shared
> >
> >
> > No sé...es una putada gorda porque voy perdido.
> > No quiero usar Mac PORTS para esto. Me gustaría tener todo el ecosistema
> RoR
> > en /usr/local
> >
> >
> > Mi pregunta principal ahora mismo es:
> > ¿cómo hago para asegurarme de que borro READLINE de mi sistema (menos lo
> que
> > viene con MAc OS X)?
> >
> > Un saliudo y gracias
> >
>
> Puedes decirle que utilice el readline de /usr/local para compilar,
> pero no se si eso te asegura que va a utilizar ese durante la
> ejecución (son bibliotecas dinámicas, los ejecutables no incluyen una
> ruta absoluta, simplemente el nombre de la biblioteca). Por eso te
> recomendaba mirar DYLD_*, creo que definen el orden de búsqueda en
> tiempo de ejecución. De
> <
> http://developer.apple.com/DOCUMENTATION/Darwin/Reference/ManPages/man1/dyld.1.html
> >:
>
> DYLD_LIBRARY_PATH
> This is a colon separated list of directories that
> contain libraries. The dynamic linker
> searches these directories before it searches the
> default locations for libraries. It allows
> you to test new versions of existing libraries.
>
> For each library that a program uses, the dynamic
> linker looks for it in each directory in
> DYLD_LIBRARY_PATH in turn. If it still can't find the
> library, it then searches DYLD_FALL-
> BACK_FRAMEWORK_PATH and DYLD_FALLBACK_LIBRARY_PATH in turn.
>
> Use the -L option to otool(1). to discover the
> frameworks and shared libraries that the exe-
> cutable is linked against.
>
> Esto es lo que arroja en mi readline.bundle del Ruby oficial de Apple:
>
> $ otool -L /usr/lib/ruby/1.8/universal-darwin9.0/readline.bundle
> /usr/lib/ruby/1.8/universal-darwin9.0/readline.bundle:
>
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/libruby.1.dylib
> (compatibility version 1.8.0, current version 1.8.6)
> /usr/lib/libedit.2.dylib (compatibility version 2.0.0, current
> version 2.9.0)
> /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current
> version 5.4.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> version 111.1.1)
> /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
> version 1.0.0)
>
> Como ves no hay readline, pero:
>
> $ ls -la /usr/lib/libreadline.dylib
> lrwxr-xr-x 1 root wheel 15 26 oct 2007 /usr/lib/libreadline.dylib
> -> libedit.2.dylib
>
> Y allí...
>
> $ nm /usr/lib/libedit.2.dylib | grep filename
> 00011f07 T _filename_completion_function
> 00010c0c T _fn_filename_completion_function
> 0001704c D _rl_filename_completion_desired
>
> Por lo que creo que deberías ver contra que biblioteca está enlazando
> en momento de ejecución (con otool) e intentar que utilice las de tus
> directorios /usr/local con DYLD_LIBRARY_PATH.
>
> Suerte.
> _______________________________________________
> Hacking-es mailing list
> Hacking-es at lists.simplelogica.net
> http://lists.simplelogica.net/mailman/listinfo/hacking-es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.simplelogica.net/pipermail/hacking-es/attachments/20090329/b3dc58d2/attachment.htm
More information about the Hacking-es
mailing list