On 13/03/10 20:51, Peter Thomas wrote:


On Mar 13, 2:47 am, Tony Mechelynck<[email protected]>
wrote:
On 13/03/10 10:02, Peter Thomas wrote:



I'm trying to build a version of vim with perl support that will run
under the cygwin terminal (ie. *not* the win32 build). The configure/
make/make install sequence runs to completion with no errors, however
when I fire up vim and do a test perl command like ":perl 'my $i=1;'",
vim quits with this message:

    Vim: Caught deadly signal SEGV
    Vim: Finished.
    Segmentation fault

Versions used:
    - latest cygwin as of this post (setup.exe v2.686)
    - vim 7.2 sources (runtime, lang, and extras), applied patches 001
through 394
    - Perl 5.10.1-3 (the one that comes with cygwin)

Steps followed:
    - open a cygwin terminal...
    - download, unzip and patch vim sources from vim.org
    - cd vim72/src
    - run './configure --enable-perlinterp --prefix=/opt/vimtest'    (to
avoid interfering with cygwin's pre-existing vim)
    - run 'make&&    make install'
    - run '/opt/vimtest/bin/vim.exe'
    - try a ":perl" command ->    observed segfault

Is there something I've overlooked? Can someone please point me in the
right direction, either to fix or to troubleshoot?

Thanks very much,
Peter

Running configure separately is dangerous if the "requirements" of the
Makefile have been modified, because in that case "make" will rebuild
the Makefile, running configure in the process (without your handcrafted
command-line arguments).

I recommend to set configure arguments via environment variables passed
to make, seehttp://users.skynet.be/antoine.mechelynck/vim/compunix.htm
for an example.

I'm not saying that this is necessarily your problem, but it could be,
since you applied quite a number of patches and some of them modify one
or more of Makefile, auto/configure, config.mk etc.

Also, if configure has a problem, it will return a nonzero exit code,
and in that case (if configure was invoked by make) the "compile" step
will not be launched. The config log should tell you what went wrong (I
recommend logging the console messages from configure and make via tee,
but a more detailed config.log is put in the src/auto directory; I
usually don't need that much detail to know what went wrong.

To reconfigure and recompile, use either

         make reconfig

(one step) or

         make config
         make

(two steps), in both cases after setting the proper environment variables.

Best regards,
Tony.
--
FIRST HEAD: All right! All right! We'll kill him first and then have tea and
              biscuits.
                   "Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD


Thanks for your quick reply, Tony.

I've followed your instructions on the above HowTo page, but
unfortunately the segfault problem persists. As a "control"
experiment, I also tried the procedure below replacing
'CONF_OPT_PERL=--enable-perlinterp' with 'CONF_OPT_PYTHON=--enable-
pythoninterp' - the resulting vim.exe handles ":python 'foo=123'"
flawlessly. The trouble seems to be Perl-specific.

Here's a breakdown of the steps I followed (from the HowTo):

   # starting with a fresh source dir described at the top of the
thread (runtime/lang/extras + patches 001-394 applied)
   cd vim 72/src

   export  CONF_OPT_PERL=--enable-perlinterp
   export  CONF_OPT_FEAT=--with-features=huge
   export  CONF_OPT_COMPBY="[email protected]"
   export  CONF_OPT_MULTIBYTE=--enable-multibyte
   # I left the remaining CONF_OPT env variables unset for simplicity
(no ruby, tk, etc)

   make config 2>&1 | tee config.log     # ran ok  ($? was 0)
   make 2>&1 | tee make.log    # also ran ok

But running the resulting vim.exe with command ":perl 'my $foo=123;'"
still causes the same segfault, unfortunately.

Is there anything else I could try?

Best regards,
Peter



Hm... Which perl interpreter are you using? For a Vim "for Cygwin", _both_ the Perl interpreter used to convert src/if_perl.xs to src/auto/if_perl.c (before compiling src/auto.if_perl.c to src/objects/if_perl.o or similar) _and_ the one used to interpret Perl commands issued from Vim must be the same version of Perl, which in this case must be IIUC _not_ a Perl "for Windows" but a Perl "for Cygwin" -- but I'm not sure that I did UC.

So: What is the reply to "which perl" at the Cygwin bash prompt? Does it look like a path to a "Cygwin" program or to a "Windows" program? Are you running Vim-for-Cygwin from Cygwin bash (recommended), from a Windows Dos Box, from a desktop icon, or in some other way...?


Best regards,
Tony.
--
Excellent time to become a missing person.

--
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

Raspunde prin e-mail lui