[#10853] Why limit class def to a constant or colon node? — Charles Oliver Nutter <charles.nutter@...>

Is there a historical reason why I can't do something like these:

12 messages 2007/04/03

[#10933] Cannot build with extra library path if previous version already installed — <noreply@...>

Bugs item #10140, was opened at 2007-04-16 17:32

10 messages 2007/04/16
[#10934] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — nobu@... 2007/04/16

Hi,

[#10960] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — "Michal Suchanek" <hramrach@...> 2007/04/18

On 4/16/07, nobu@ruby-lang.org <nobu@ruby-lang.org> wrote:

[#10967] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — Nobuyoshi Nakada <nobu@...> 2007/04/19

Hi,

[#10970] Re: [ ruby-Bugs-10140 ] Cannot build with extra library path if previous version already installed — "Michal Suchanek" <hramrach@...> 2007/04/19

On 4/19/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:> Hi,>> At Wed, 18 Apr 2007 20:21:44 +0900,> Michal Suchanek wrote in [ruby-core:10960]:> > Yes. And this should also apply to extensions. The mkmf tests are now> > fine but the extension is linked with -L/sw/lib before -L../..>> Indeed.>>> Index: configure.in> ===================================================================> --- configure.in (revision 12191)> +++ configure.in (working copy)> @@ -1385,5 +1385,4 @@ if test "$enable_rpath" = yes; then> fi>> -LDFLAGS="-L. $LDFLAGS"> AC_SUBST(ARCHFILE)>This would break the previous fix so I did not even try to apply this ^

[#11003] miniruby loads extensions from already installed ruby — <noreply@...>

Bugs item #10303, was opened at 2007-04-23 10:44

10 messages 2007/04/23

[#11025] gsub with backslash characters in replacement string — "Adam Bozanich" <adam.boz@...>

Hello, spotted this one the other day:

10 messages 2007/04/26

Re: [ ruby-Bugs-10303 ] miniruby loads extensions from already installed ruby

From: "Michal Suchanek" <hramrach@...>
Date: 2007-04-26 17:30:31 UTC
List: ruby-core #11039
On 26/04/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
> Hi,
>
> At Wed, 25 Apr 2007 22:40:28 +0900,
> Michal Suchanek wrote in [ruby-core:11020]:
> > A patch that really fixes the problem for me. It also fixes the weird
> > miniruby crash while loading extensions.
>
> > +    argvptr = strrchr(origargv[0], '/');
> > +    if(!argvptr) argvptr = origargv[0];
> > +    if(!strstr(argvptr, "miniruby")) {
>
> I do not like to include miniruby specific code and remain in
> installed version.  If the problem were just for extensions,
> linking dmydln.o would solve it...
>
I do not like it either. Of course, one could ifdef the change instead
of plain if, and compile the object with a define for miniruby. But I
would not want to maintain such patch.

As it turns out, ruby and miniruby only differ in the way
libruby-static is linked in. For miniruby it is linked directly by
full name, for ruby it is looked up with -l option.
So linking in another file would not fix the extensions for miniruby
nor prevent miniruby from loading potetntially broken and incompatible
extensions that are already installed. I think the object is present
in libruby anyway.
Actually the crash is quite mysterious and has probably something to
do with OS X linker subtleties I do not understand. Apparently it puts
the same objects together in a different way when linking miniruby
resulting in executable that behaves differently.

gcc -g -O2 -pipe -fno-common  -DRUBY_EXPORT  -L. -L/sw/lib   main.o
libruby-static.a -ldl -lobjc   -o miniruby
/usr/bin/ld: warning multiple definitions of symbol _setregid
libruby-static.a(process.o) definition of _setregid in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib(setregid.So)
definition of _setregid
/usr/bin/ld: warning multiple definitions of symbol _setreuid
libruby-static.a(process.o) definition of _setreuid in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib(setreuid.So)
definition of _setreuid
gcc -g -O2 -pipe -fno-common  -DRUBY_EXPORT  -L. -L/sw/lib   main.o
-lruby-static -ldl -lobjc   -o ruby
/usr/bin/ld: warning multiple definitions of symbol _setregid
./libruby-static.a(process.o) definition of _setregid in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib(setregid.So)
definition of _setregid
/usr/bin/ld: warning multiple definitions of symbol _setreuid
./libruby-static.a(process.o) definition of _setreuid in section (__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libdl.dylib(setreuid.So)
definition of _setreuid

Thanks

Michal

In This Thread