Loading ...
Sorry, an error occurred while loading the content.

Re: vim +perl etc. on OS X

Expand Messages
  • Bram Moolenaar
    ... The patch that added the configure check for threads is 6.1.438, made by Aron Griffis. I ll include him in the copy list. Aron, can you tell us how to
    Message 1 of 17 , Jan 16, 2004
    • 0 Attachment
      Ken Scott wrote:

      > > Benji Fisher wrote:
      > >
      > >> On Wed, Jan 14, 2004 at 10:07:32AM -0700, Ken Scott wrote:
      > >>>
      > >>> On Jan 14, 2004, at 8:39 AM, Bob Ippolito wrote:
      > >>>
      > >>>> [snip]
      > >>>
      > >>>> That's bizarre, because Python is threaded on OS X 10.3 ... I wonder
      > >>>> what the deal is with that? Is a threaded Python ok because it has
      > >>>> the GIL, or should a non-threaded version be in Vim as well? Or
      > >>>> maybe.. Vim's configure script should take a threaded Perl?
      > >>>
      > >>> If someone can talk me through modifying the configure script, I'll
      > >>> try building it to accept the threaded perl, and see if it can do
      > >>> basic things or not.
      > >>
      > >> Tweaking the configure script is not easy. I prefer to leave
      > >> that for people who understand autoconf. As for perl, I assume
      > >> there is a reason not to link against a threaded version. Bram?
      > >
      > > I do not know why Perl without threads is refused. There is an
      > > explicit configure check for it, thus there must be a good reason.
      > > But perhaps it was only for an old version of Perl? It's also
      > > possible that if_perl.xs is not prepared for threading.
      > >
      > > You could edit src/auto/configure, search for "usethreads" and insert
      > > this below the "eval" command:
      > >
      > > usethreads=undef
      > >
      > > Look out or compile errors and warnings in if_perl.c.
      >
      > I did this; the only warning I saw was a warning for an unused
      > variable. At the end, near the ld steps, I was getting a message that
      > /usr/local/lib does not exist, but I do not think that harmed anything.
      >
      > I ran the Vim.app that was created. It shows +perl, and I am able to
      > run :perl VIM::Msg("This is from Perl in Vim") and get the message
      > displayed. I think this means that the perl interface is working on
      > some very basic level. I do not have the expertise to test this more
      > fully.
      >
      > I am now playing in the auto/configure script to see if the Tcl support
      > can be turned on. It was not finding the includes; I am trying to get
      > the include from /System/Library/Frameworks/Tcl.framework/Headers to be
      > recognized.
      >
      > Onward and upwards...

      The patch that added the configure check for threads is 6.1.438, made by
      Aron Griffis. I'll include him in the copy list.

      Aron, can you tell us how to test that a threaded Perl will break?
      Could this depend on the Perl version somehow? Perhaps the Perl on Mac
      OSX 10.3 does work.

      --
      Not too long ago, cut and paste was done with scissors and glue...

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
    • Aron Griffis
      Bram Moolenaar wrote: [Fri Jan 16 2004, 01:56:47PM EST] ... Last time I tested this was 6.1.411 with Perl 5.8.0. It blew up with link errors like this: gcc
      Message 2 of 17 , Jan 16, 2004
      • 0 Attachment
        Bram Moolenaar wrote: [Fri Jan 16 2004, 01:56:47PM EST]
        > The patch that added the configure check for threads is 6.1.438, made by
        > Aron Griffis. I'll include him in the copy list.

        Last time I tested this was 6.1.411 with Perl 5.8.0. It blew up with
        link errors like this:

        gcc -L/usr/X11R6/lib -rdynamic -L/usr/local/lib -o vim objects/buffer.o objects/charset.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_getln.o objects/fileio.o objects/fold.o objects/getchar.o objects/if_cscope.o objects/if_xcmdsrv.o objects/main.o objects/mark.o objects/memfile.o objects/memline.o objects/menu.o objects/message.o objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/syntax.o objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/window.o objects/if_perl.o objects/if_perlsfio.o objects/if_python.o objects/py_config.o objects/version.o -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -lncurses -lgpm -ldl -rdynamic -L/usr/local/lib /usr/lib/perl5/5.8.0/i686-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.8.0/i686-linux-thread-multi/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -L/usr/lib/python2.2/config -lpython2.2 -ldl -lpthread -lutil -lm -Xlinker -export-dynamic

        objects/if_perl.o(.text+0x21): In function `ex_perl':
        : undefined reference to `Perl_Gthr_key_ptr'
        objects/if_perl.o(.text+0x33): In function `ex_perl':
        : undefined reference to `Perl_Tstack_sp_ptr'

        The full build log is at

        http://bugs.gentoo.org/attachment.cgi?id=10073&action=view
        http://bugs.gentoo.org/show_bug.cgi?id=18555

        It's possible that this works now with threaded Perl. I suppose that if
        it links it will probably work. I will give it a try and follow up.

        Aron
      • Aron Griffis
        [snipped to be accepted by the vim-mac ML] I just tested. I have perl-5.8.2 installed and I m testing 6.2.140 (with a workaround to allow threaded perl). I
        Message 3 of 17 , Jan 16, 2004
        • 0 Attachment
          [snipped to be accepted by the vim-mac ML]

          I just tested. I have perl-5.8.2 installed and I'm testing 6.2.140
          (with a workaround to allow threaded perl). I get the following output:

          gcc -L/usr/X11R6/lib -rdynamic -L/usr/local/lib -o vim objects/buffer.o objects/charset.o objects/diff.o objects/digraph.o objects/edit.o objects/eval.o objects/ex_cmds.o objects/ex_cmds2.o objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/fileio.o objects/fold.o objects/getchar.o objects/if_cscope.o objects/if_xcmdsrv.o objects/main.o objects/mark.o objects/memfile.o objects/memline.o objects/menu.o objects/message.o objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o objects/quickfix.o objects/regexp.o objects/screen.o objects/search.o objects/syntax.o objects/tag.o objects/term.o objects/ui.o objects/undo.o objects/window.o objects/gui.o objects/gui_gtk.o objects/gui_gtk_x11.o objects/pty.o objects/gui_gtk_f.o objects/gui_beval.o objects/if_perl.o objects/if_perlsfio.o objects/netbeans.o objects/version.o -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -lncurses -lgpm -ldl -rdynamic -L/usr/local/lib /usr/lib/perl5/5.8.2/i686-linux-thread-multi/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/5.8.2/i686-linux-thread-multi/CORE -lperl -ldl -lutil -lc
          objects/if_perl.o(.text+0x5c): In function `perl_init':
          /var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:370: undefined reference to `Perl_Gthr_key_ptr'
          objects/if_perl.o(.text+0x66):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:370: undefined reference to `pthread_getspecific'
          objects/if_perl.o(.text+0x156): In function `newWINrv':
          /var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `Perl_Gthr_key_ptr'
          objects/if_perl.o(.text+0x160):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `pthread_getspecific'
          objects/if_perl.o(.text+0x199):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `Perl_Gthr_key_ptr'
          objects/if_perl.o(.text+0x1a3):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `pthread_getspecific'
          objects/if_perl.o(.text+0x1cb):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `Perl_Gthr_key_ptr'
          objects/if_perl.o(.text+0x1d5):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `pthread_getspecific'
          objects/if_perl.o(.text+0x1f8):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `Perl_Gthr_key_ptr'
          objects/if_perl.o(.text+0x202):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `pthread_getspecific'
          objects/if_perl.o(.text+0x222):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `Perl_Gthr_key_ptr'
          objects/if_perl.o(.text+0x22c):/var/tmp/portage/vim-6.2-r5/work/vim62/src/if_perl.xs:467: undefined reference to `pthread_getspecific'
          ...
        • Bram Moolenaar
          ... Juan Fuentes suggested that it should work fine without threads and with the newer thread system, but not with Perl 5.5 threads. Later Perl versions can
          Message 4 of 17 , Jan 17, 2004
          • 0 Attachment
            Aron Griffis wrote:

            > I just tested. I have perl-5.8.2 installed and I'm testing 6.2.140
            > (with a workaround to allow threaded perl). I get the following output:

            Juan Fuentes suggested that it should work fine without threads and with
            the newer thread system, but not with Perl 5.5 threads. Later Perl
            versions can still be build with the 5.5 threads.

            I now have the following configure check for Perl threads. Please try
            this with various versions of Perl.


            *** ../vim-6.2.181/src/auto/configure Mon Dec 29 21:00:25 2003
            --- src/auto/configure Sat Jan 17 12:49:31 2004
            ***************
            *** 1570,1579 ****

            if test "X$vi_cv_path_perl" != "X"; then
            echo $ac_n "checking Perl version""... $ac_c" 1>&6
            ! echo "configure:1480: checking Perl version" >&5
            if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
            eval `$vi_cv_path_perl -V:usethreads`
            if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
            echo "$ac_t""OK" 1>&6
            eval `$vi_cv_path_perl -V:shrpenv`
            if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
            --- 1570,1595 ----

            if test "X$vi_cv_path_perl" != "X"; then
            echo $ac_n "checking Perl version""... $ac_c" 1>&6
            ! echo "configure:1574: checking Perl version" >&5
            if $vi_cv_path_perl -e 'require 5.003_01' >/dev/null 2>/dev/null; then
            eval `$vi_cv_path_perl -V:usethreads`
            if test "X$usethreads" = "XUNKNOWN" -o "X$usethreads" = "Xundef"; then
            + badthreads=no
            + else
            + if $vi_cv_path_perl -e 'require 5.6.0' >/dev/null 2>/dev/null; then
            + eval `$vi_cv_path_perl -V:use5005threads`
            + if test "X$use5005threads" = "XUNKNOWN" -o "X$use5005threads" = "Xundef"; then
            + badthreads=no
            + else
            + badthreads=yes
            + echo "$ac_t"">>> Perl > 5.6 with 5.5 threads cannot be used <<<" 1>&6
            + fi
            + else
            + badthreads=yes
            + echo "$ac_t"">>> Perl 5.5 with threads cannot be used <<<" 1>&6
            + fi
            + fi
            + if test $badthreads = no; then
            echo "$ac_t""OK" 1>&6
            eval `$vi_cv_path_perl -V:shrpenv`
            if test "X$shrpenv" = "XUNKNOWN"; then # pre 5.003_04
            ***************
            *** 1602,1609 ****
            #define FEAT_PERL 1
            EOF

            - else
            - echo "$ac_t"">>> Perl with threads cannot be used <<<" 1>&6
            fi
            else
            echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6
            --- 1618,1623 ----

            --
            FATHER: Who are you?
            PRINCE: I'm ... your son ...
            FATHER: Not you.
            LAUNCELOT: I'm ... er ... Sir Launcelot, sir.
            "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
            \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
          Your message has been successfully submitted and would be delivered to recipients shortly.