vim mlcscope interface issues

Fred Ma
Wed Jan 3 00:07:00 GMT 2007

Just a update on the result of compiling cscope (which requires flex
and libncurses-devel).  The same error is gotten as that with

   cs_read_prompt EOF: No error

   E609: Cscope error:
   cscope: cannot read trailer offset from file cscope.out

I also tried cscope from the command line.  Without options, cscope
tends to update cscope.out even though there are no newer files.  This
means that if you don't specify non-C-filenames, it will find nothing,
and generate a rather empty cscope.out.  So cscope must be invoked
together with the source filenames e.g. for matlab files, "cscope
*.m".  In this case it properly regenerates cscope.out, even though it
isn't necessary, and even without the -u option.  In this, cscope
finds any searched-for symbols as expected.

One revealing result occurs when "cscope -d" is issued.  This should
force cscope to not regenerate the perfectly good cscope.out, which
may already exist from a preceding "cscope -b -u *.m" or "cscope *.m".
Instead of working as expected, cscope gives the same error as above:

   cscope: cannot read trailer offset from file cscope.out

I have to call it quits for today.  I may pick it up again, or simply
revert to vimgrep.  Thanks for any feedback.


On 1/2/07, Fred Ma <> wrote:
> If this shows up more than once, I apologize.  Gmail is telling me it
> didn't get sent (twice), and it doesn't show up on the mailing list
> archive, though that may be due to transit delay.
> I'm ran into hanging problems with the the following combination,
> updated today:
>    cygwin   1.5.23-2
>    vim      7.0.122-1
>    mlcscope 14.1.8-2
> The problem had to do with shelling out to build the cscope database
> via "mlcscope -b -u *".  I specified the files "*" because I had
> Matlab files; Matlab is ont a recognized language, so the files would
> not be acted on by default.  I think the problem arose because "*"
> also included the output file being built (cscope.out), so it
> cscope.out kept get bigger as it analyzed itself.  Narrowing the files
> down to "*.m" restricted the files to Matlab files only, and bypassed
> that hanging problem.
> However, I get the following error trying to add the connection to
> cscope.out:
>    cs_read_prompt EOF: No error
>    E609: Cscope error:
>    mlcscope: cannot read trailer offset from file cscope.out
> The only reference I've found to it is
> I don't have cscope on my system, so that's not the explanation.  I
> also have cscopeprg=/usr/bin/mlcscope.
> I'll be downloading cscope as my next step.  Since I've gotten
> vim/cscope to work on solaris before, I'm hopeful that it will be
> straightforward.
> I'm curious as to whether there has been any succcess or failures with
> the current cygwin/vim/mlcscope combination, which will hint at
> whether it is my setup or not.
>> Date: Sun, 15 Oct 2006 17:03:42 -0500
>> From: Dave & Diane <daveanddiane at kringlecottage dot com>
>> Subject: Re: vim mlcscope interface issues
>> Delivered-To: mailing list cygwin at cygwin dot com
>> Interesting find. Looks like I'll have to work with the vim folks to see
>> if they will add support for mlcscope. It is a completely different
>> version than cscope, but the interface is generically the same so I
>> don't think it would be too difficult to add support in vim and fix
>> if_cscope.c to support both.
>> In the meantime, if you don't have sourceforge cscope installed, you
>> might try creating a symbol link called cscope and see if that works too.
>>Frodak wrote:
>>> Over the last several days I've been trying to use vim
>>> with mlcscope and have come to the conclusion that the
>>> two won't place nice.  Whenever performing a ":cs find
>>> ..." vim would hang until I killed the mlcscope
>>> process.  I couldn't find anything on-line about
>>> compatibly issues between the two.  I downloaded
>>> sourceforge cscope and had no issues with it working
>>> with vim.
>>> I've decided to look at the vim source file
>>> if_cscope.c line 633 and changed it to key off of the
>>> string "mlcscope" instead of "cscope" it started to
>>> work.
>>> Anyways, I thought I'd mention it because I had such a
>>> tough time with it.

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list