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

Re: vim for OS X/Intel?

Expand Messages
  • Jussi Hagman
    ... Great! ... Could you provide me with the relevant entry in the crashlog[1]? I probably won t be able to fix it but it would be interesting to see what is
    Message 1 of 11 , Feb 18, 2006
    • 0 Attachment
      On 18.2.2006, at 23:39, Bernhard Prümmer wrote:
      >
      > I do own an iMac Core-Duo;

      Great!

      > And of course, I am willing to do some testing because the PowerPC
      > version
      > from the macvim homepage shows some serious misbehaviour on my
      > intel mac:
      > At first sight, it runs well under Rosetta, but when you try to
      > save a file
      > you edit, vim is VERY likely to crash (with the system wishing to
      > report this to Apple the usual way).

      Could you provide me with the relevant entry in the crashlog[1]? I
      probably won't be able to fix it but it would be interesting to see
      what is happening.

      > Anyway, it was so annoying that I decided to download the sources
      > from macvim.org and build a native version myself. To my surprise,
      > the source code has no mac-specific stuff, so I created an X11
      > version that runs quite well, except for some lack in comfort.

      Mac specific stuff should be there (os_mac.c, gui_mac.c :) maybe the
      configure script did not understand that you are running a mac.

      > I'll download it and let you know how it works. If you tell me how
      > you built
      > this version, I'm going try it on my machine and see if this makes
      > a difference.

      The process was following: (I hope the commands do not break in wrong
      places, I've got no control over that with Apple's mail:(

      Get the latest vim source from CVS:
      cvs -z3 -d:pserver:anonymous@...:80/cvsroot/vim
      checkout vim

      cd vim

      Edit src/os_mac.h by removing lines 97-99:

      # if !__option(enumsalwaysint)
      # error "You must compile with enums always int!"
      # endif

      THIS IS A DIRTY HACK! The whole file should be checked for
      assumptions that !PPC == 68k.

      Run configure and make
      export CFLAGS="-O -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch
      i386 -arch ppc"
      ./configure --disable-dependency-tracking --enable-multibyte --
      enable-gui=carbon
      make

      (there are quite many warnings but let's ignore them for now)

      Removethe binary as it links only for PPC (or probably Intel on your
      machine) and link it by hand:
      cd src
      rm vim

      (the next is one command and it is unindented for easier copy+paste)

      gcc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 \
      -arch ppc -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_mac.o \
      objects/pty.o objects/os_macosx.o objects/netbeans.o objects/version.o \
      -framework Carbon -lncurses -liconv

      This is also a HACK. I copied the command from the make output (it's
      right in the end) and I added a few flags.

      check that the file is indeed an universal (optional step :)
      $ file vim
      vim: Mach-O fat file with 2 architectures
      vim (for architecture i386): Mach-O executable i386
      vim (for architecture ppc): Mach-O executable ppc

      make the application bundle

      cd ..
      make install

      The application bundle is in src directory as Vim.app

      I hope this helps you and others. If there are any problems feel free
      to contact me by mail, IM or Skype. It would be great to fix the
      compilation, some other things and make a patch for Bram.

      Greetings,
      Jussi

      [1] The file is in ~/Library/Logs/CrashReporter/Vim.crash.log and
      send it to me, preferably only the relevant entry but if there are
      different things you could send the whole file. You can also use /
      Applications/Utilities/Console.app or your favourite editor to look
      at the file.


      --
      Jussi Hagman, jhagman@..., iChat/AIM: jussihagman, ICQ: 54004113
      Studentbyn 4 D 33, 20540 Åbo, Finland +358 50 56 51 170
    • Bernhard Prümmer
      ... Ah-ha! I just tried to reproduce the effects I saw last month but was unable to get them again. Hmm, I updated the iMac to 10.4.5 recently ... could it
      Message 2 of 11 , Feb 18, 2006
      • 0 Attachment
        Am 19.02.2006 um 01:00 schrieb Jussi Hagman:

        >
        > On 18.2.2006, at 23:39, Bernhard Prümmer wrote:
        >>
        >> I do own an iMac Core-Duo;
        >
        > Great!
        >
        >> And of course, I am willing to do some testing because the PowerPC
        >> version
        >> from the macvim homepage shows some serious misbehaviour on my
        >> intel mac:
        >> At first sight, it runs well under Rosetta, but when you try to
        >> save a file
        >> you edit, vim is VERY likely to crash (with the system wishing to
        >> report this to Apple the usual way).
        >
        > Could you provide me with the relevant entry in the crashlog[1]? I
        > probably won't be able to fix it but it would be interesting to see
        > what is happening.
        >
        Ah-ha! I just tried to reproduce the effects I saw last month but was
        unable to get them again.
        Hmm, I updated the iMac to 10.4.5 recently ... could it have been a
        kind of rosetta bug?
        Anyway, I'll send you the requested files, still might be useful.

        >> Anyway, it was so annoying that I decided to download the sources
        >> from macvim.org and build a native version myself. To my surprise,
        >> the source code has no mac-specific stuff, so I created an X11
        >> version that runs quite well, except for some lack in comfort.
        >
        > Mac specific stuff should be there (os_mac.c, gui_mac.c :) maybe
        > the configure script did not understand that you are running a mac.
        >
        I checked the origin of the source files again: http://www.vim.org/
        download.php (section "version 6.x")
        So, they were not from the macvim homepage.

        >> I'll download it and let you know how it works. If you tell me how
        >> you built
        >> this version, I'm going try it on my machine and see if this makes
        >> a difference.
        >
        I tinkered with a few text files the way I usually do - nothing
        strange encountered.
        Even the "About VIM" item from the "Vim" menu does not work - exactly
        like the PowerPC version.
        The only deviation from Benji's version so far is that your Vim icon
        lacks the "im" ... ;-)
        >
        > [1] The file is in ~/Library/Logs/CrashReporter/Vim.crash.log and
        > send it to me, preferably only the relevant entry but if there are
        > different things you could send the whole file. You can also use /
        > Applications/Utilities/Console.app or your favourite editor to look
        > at the file.
        Guess what editor this might be ... ;-)

        Regards
        Bernhard
      • Jussi Hagman
        ... I looked at the file and firstly it is quite hard to say anything, Rosetta does make them harder to interpret, but I guess you are correct. It is quite
        Message 3 of 11 , Feb 19, 2006
        • 0 Attachment
          On 19.2.2006, at 2:39, Bernhard Prümmer wrote:

          >
          > Am 19.02.2006 um 01:00 schrieb Jussi Hagman:
          >
          >>
          >> On 18.2.2006, at 23:39, Bernhard Prümmer wrote:
          >>
          > Ah-ha! I just tried to reproduce the effects I saw last month but
          > was unable to get them again.
          > Hmm, I updated the iMac to 10.4.5 recently ... could it have been a
          > kind of rosetta bug?
          > Anyway, I'll send you the requested files, still might be useful.

          I looked at the file and firstly it is quite hard to say anything,
          Rosetta does make them harder to interpret, but I guess you are
          correct. It is quite likely a Rosetta bug.

          > I checked the origin of the source files again: http://www.vim.org/
          > download.php (section "version 6.x")
          > So, they were not from the macvim homepage.

          OK. The unix archive of sources does apparently not include the
          files, CVS is the way to go. :)

          > I tinkered with a few text files the way I usually do - nothing
          > strange encountered.
          > Even the "About VIM" item from the "Vim" menu does not work -
          > exactly like the PowerPC version.
          > The only deviation from Benji's version so far is that your Vim
          > icon lacks the "im" ... ;-)

          OK :) Good to hear. If you have the time it would be nice (from a mac
          user's point of view, not vim user's) if you could test how much
          faster the the native code is compared to Rosetta. But then again, I
          rarely have any problems with vim speed (apart from some OS X
          specific issues that probably are not affected that much by Rosetta)

          I could try to make some patches to allow the compilation on intel
          macs later today or tomorrow. I'd be grateful if you could be my
          guinea pig to try to compile vim on intel mac after the changes.

          I guess the compilation (of the mac gui version) does not work at the
          moment even on intel based mac without removing the lines I talked
          about earlier.

          >>
          >> [1] The file is in ~/Library/Logs/CrashReporter/Vim.crash.log and
          >> send it to me, preferably only the relevant entry but if there are
          >> different things you could send the whole file. You can also use /
          >> Applications/Utilities/Console.app or your favourite editor to
          >> look at the file.
          > Guess what editor this might be ... ;-)

          Hmm... emacs? :)

          Greetings,
          Jussi

          --
          Jussi Hagman, jhagman@..., iChat/AIM: jussihagman, ICQ: 54004113
          Studentbyn 4 D 33, 20540 Åbo, Finland +358 50 56 51 170
        Your message has been successfully submitted and would be delivered to recipients shortly.