2017-11-26 16:25 GMT+09:00 Ilya Mikhaltsou <[email protected]>: > > > Read the code of the current version of configure.ac. > > Great reference… one comment in code, mentioned in the top of the thread > by me myself. > > > > > No. If vim were to make any attempt to link against a static library > just like you claim, the code would be > > > > > > if test -f "$rubylibdir/$librubya"; then > > librubyarg="$librubya" > > > > > > instead of the current > > > > > > > > if test -f "$rubylibdir/$librubya"; then > > librubyarg="$librubyarg" > > > > > > Currently, if $rubylibdir/$librubya exists, then it uses $librubyarg > instead of $librubya. Basically, $librubyarg is '-lruby'. > > Then the whole thing with libruby_a makes no sense. Why even check for it? > > > However, as the code indicates, there's a case where $librubyarg is set > to libruby.a. > > Only for that case, libruby.a is chosen (This is OK since it turns out > to exist). Otherwise, -lruby is chosen even if libruby.a exists. > > I see nothing like this in the code. I see: > > if test -f $rubylibdir/$librubya ; then # we check if the static library > exists > librubyarg="$librubyarg" # this seems like a perfect piece of code that > does literally nothing! > RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" # at least we add the library > directory > elif # here goes osx 10.3 section > ... > fi > > if test "X$librubyarg" != "X"; then # test if ruby actually gave us > anything to link to > RUBY_LIBS="$librubyarg $RUBY_LIBS" # add that > fi > > So no, I don't see how what you say is represented in code. Are we reading > different code or are we reading code differently? >
See: https://github.com/vim/vim/blob/master/src/configure.ac#L1878-L1879 . What I quoted is part of src/configure.ac in our official repository. And, the first two lines of those snippets of code are identical with each other except for, in the latter snippet, the comments given by someone. > > > >> What we need to care are two things: (1) the in-existence of the static > library and (2) the sanity of the ruby configuration. When both are met, we > decide that there simply is no static library at all. > > > > Too abstract for me to understand. > > > > Huh?.. > > > > Note that the question was made last May: https://stackoverflow.com/ > questions/43956208/does-mac-os-x-have-the-dev-ptmx-file , and that Patch > 8.0.1166 was merged last September. You can't drop the support for old Mac > OS X's in favor of your patch. > > > > Cool, you convinced me… to install OS X 10.3. > > Yep, OK, I can agree with you that LIBRUBYARG is indeed "libruby.a". But > also, LIBRUBY_A is "libruby.a". Cool, huh? > That's exactly what the code tells me. I've already known about that. > > See here: https://d.pr/i/ASPsxd > > So I don't see how my patch is going to break anything, but then again > there are some other concerns and refinements to make, i.e. writing the > logic in a more explicit and understandable way. > > Your patch, appears to actually break OS X 10.3 build — you try to include > "libruby.a" in RUBY_LIBS. > That will never happen: After applying my patch, the relevant part of configure.ac becomes 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" fi RUBY_LIBS="-L$rubylibdir $librubyarg $RUBY_LIBS" It is clear from the code above that RUBY_LIBS includes $librubyarg which is to be set to '-lruby' if $librubyarg is libruby.a and if the file $librubydir/$librubya does not exist, where $librubya is "libruby.a" for 10.3. So, when you ask someone for something, how about making more attempt to make your questions look more well-posed or intelligent? > > -- > -- > 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.
