2017-11-26 3:22 GMT+09:00 Ilya Mikhaltsou <[email protected]>:

> суббота, 25 ноября 2017 г., 8:46:21 UTC-8 пользователь Kazunobu Kuriyama
> написал:
> > 2017-11-26 1:23 GMT+09:00 Ilya Mikhaltsou <[email protected]>:
> >
> >
> > суббота, 25 ноября 2017 г., 8:20:44 UTC-8 пользователь Ilya Mikhaltsou
> написал:
> >
> >
> >
> > > суббота, 25 ноября 2017 г., 0:46:39 UTC-8 пользователь Kazunobu
> Kuriyama написал:
> >
> > > > Could you help me with trying the following patch and see if it
> works even under the rvm environment?  Please remember to do `make
> autoconf` after applying the patch and before running configure.
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > > diff --git a/src/configure.ac b/src/configure.ac
> >
> > > > index 938a77f91..c5b2ef8c7 100644
> >
> > > > --- a/src/configure.ac
> >
> > > > +++ b/src/configure.ac
> >
> > > > @@ -1875,18 +1875,15 @@ if test "$enable_rubyinterp" = "yes" -o
> "$enable_rubyinterp" = "dynamic"; then
> >
> > > >     librubyarg=`$vi_cv_path_ruby -r rbconfig -e "print
> $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBYARG']])"`
> >
> > > >     librubya=`$vi_cv_path_ruby -r rbconfig -e "print
> $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['LIBRUBY_A']])"`
> >
> > > >     rubylibdir=`$vi_cv_path_ruby -r rbconfig -e "print
> $ruby_rbconfig.expand($ruby_rbconfig::CONFIG[['libdir']])"`
> >
> > > > -   if test -f "$rubylibdir/$librubya"; then
> >
> > > > -     librubyarg="$librubyarg"
> >
> > > > -     RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
> >
> > > > -   elif test "$librubyarg" = "libruby.a"; then
> >
> > > > -     dnl required on Mac OS 10.3 where libruby.a doesn't exist
> >
> > > > +
> >
> > > > +   if test "$librubyarg" = "libruby.a" -a ! -f
> "$rubylibdir/$librubya"; then
> >
> > > > +          dnl Workaround for the case where $librubyarg is set to
> non-existent
> >
> > > > +          dnl libruby.a.  Use the shared library instead.  This
> happens with Mac
> >
> > > > +          dnl OS X 10.3.
> >
> > > >       librubyarg="-lruby"
> >
> > > > -     RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
> >
> > > >     fi
> >
> > > > +        RUBY_LIBS="-L$rubylibdir $librubyarg $RUBY_LIBS"
> >
> > > >
> >
> > > > -   if test "X$librubyarg" != "X"; then
> >
> > > > -     RUBY_LIBS="$librubyarg $RUBY_LIBS"
> >
> > > > -   fi
> >
> > > >     rubyldflags=`$vi_cv_path_ruby -r rbconfig -e "print
> $ruby_rbconfig::CONFIG[['LDFLAGS']]"`
> >
> > > >     if test "X$rubyldflags" != "X"; then
> >
> > > >       dnl Ruby on Mac OS X 10.5 adds "-arch" flags but these should
> only
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > > --
> >
> > > >
> >
> > > > --
> >
> > > >
> >
> > > > You received this message from the "vim_dev" maillist.
> >
> > > >
> >
> > > > Do not top-post! Type your reply below the text you are replying to.
> >
> > > >
> >
> > > > For more information, visit http://www.vim.org/maillist.php
> >
> > > >
> >
> > > >
> >
> > > >
> >
> > > > ---
> >
> > > >
> >
> > > > You received this message because you are subscribed to the Google
> Groups "vim_dev" group.
> >
> > > >
> >
> > > > To unsubscribe from this group and stop receiving emails from it,
> send an email to [email protected].
> >
> > > >
> >
> > > > For more options, visit https://groups.google.com/d/optout.
> >
> > >
> >
> > > Could you explain please what you did here and the logic behind this?
> It seems to me like you have created a dead code section and made the
> addition of libdir unconditional.
> >
> > >
> >
> > > I think it would work, and will test soon; but why this way?
> >
> >
> >
> > I’m sorry to point this out, but it also seems to me like you took no
> care in reading my replies. I.e. you still have the condition that will
> never fire.
> >
> >
> >
> > Wha do you mean by that?
> >
> >
> >
> >
> > --
> >
> > --
> >
> > You received this message from the "vim_dev" maillist.
> >
> > Do not top-post! Type your reply below the text you are replying to.
> >
> > For more information, visit http://www.vim.org/maillist.php
> >
> >
> >
> > ---
> >
> > You received this message because you are subscribed to the Google
> Groups "vim_dev" group.
> >
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> >
> > For more options, visit https://groups.google.com/d/optout.
>
> You have again used $librubyarg, which never is going to be “libruby.a”.


That's the case of recent macOS versions.

Judging from the code, 10.3 returns libruby.a as $librubyarg while it
doesn't have such a static library, but does have a shared library.  As a
result,  RUBY_LIBS is set to something like "libruby.a -L/.../" which
causes link error.  Therefore, libruby.a must be replaced with -lruby if
$librubydir/libruby.a doesn't exist and if $librubyarg is equal to libruby.a

The correct variable is $librubya.


No.  Our goal is to set RUBY_LIBS to canonical "-L$rubylibdir $librubyarg",
which would look like, e.g., "-L/usr/local/lib -lruby".  Only for 10.3 (or
systems having the same RbConfig bug), $librubyarg must be replaced with
-lruby to avoid link error.  We don't need to care about
libruby-X.Y..Z-static.a at all from the outset.

Besides that, as I already wrote above, your current patch makes the code
> about macOS completely useless. And I’m trying to ask you what is the point
> of it.
>

You argued on the basis of a wrong assumption (See above). Rather, your
patch breaks 10.3 build.

>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui