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

Re: vim for OS X/Intel?

Expand Messages
  • Trenton Schulz
    ... I would give it a shot at first. QuickDraw is certainly deprecated, but I find it hard to believe that they removed it from the Intel Mac s. They would
    Message 1 of 11 , Jan 13, 2006
    • 0 Attachment
      On Jan 13, 2006, at 6:12 AM, Benji Fisher wrote:

      > On Fri, Jan 13, 2006 at 12:04:39AM +1100, Tom Birch wrote:
      >> I've got a DTK (the developer machine, not a new one announced
      >> yesterday), it doesn't compile now because of dependency on
      >> quickdraw, which hasn't been ported to intel, so i guess the first
      >> job is to get rid of that, if you send me stuff i'll be happy to
      >> spend some time compiling/debugging but unfortunately I can't give
      >> you an account as that would involve giving you access to our login
      >> server
      >>
      >> cheers,
      >> Tom
      >
      > The list of credits at http://macvim.org/OSX/index.php#Credits
      > may
      > be a little out of date, but this part is still correct:
      >
      > This site, including some of the binaries here, is maintained by
      > Benji Fisher. That is all I do: I am not competent to program
      > for the Mac,
      >
      > In other words, someone else has to get the code to the point where
      > "make" will work; I can take it from there. Perhaps I should repeat:
      >
      > Help!
      >
      > On Thu, Jan 12, 2006 at 02:06:25PM +0100, Trenton Schulz wrote:
      >>
      >> Apple has posted a tech note that should be relevant:
      >>
      >> http://developer.apple.com/technotes/tn2005/tn2137.html
      >
      > Thanks, that looks like a good place to start. I can handle
      > adding
      > a few options to CFLAGS and LDFLAGS. I have not tried it yet, but
      > if I
      > understand Tom correctly, it will not work without some changes to the
      > code first.

      I would give it a shot at first. QuickDraw is certainly deprecated,
      but I find it hard to believe that they removed it from the Intel
      Mac's. They would need to have it working for Rosetta at least. And I
      can't believe that Apple would be so arrogant to remove the library
      in a minor OS release.


      >
      >> Otherwise, I don't think the current Project Builder file included
      >> with vim works anymore. I toyed with the idea of trying to make an
      >> Xcode-based one (if only for getting a PCH and stuff) but quickly
      >> abandoned it. Besides the editor in Xcode is so sub-par compared to
      >> vim (and the vi integration leaves a lot to be desired) why would you
      >> want to use it? :)
      >>
      >> Good luck,
      >>
      >> -- Trenton
      >
      > The only reason I considered using Xcode is that it might be the
      > easiest way to cross-compile, or create a "universal" binary.

      Everything that Xcode does can be done on the command line (well, OK,
      most of it). I'd try what's suggested in the tech note. If things
      don't work, then there would be an estimation as to how much work is
      needed to get further.

      Bien Suerte!

      -- Trenton
    • Stephen Riehm
      Hi guys, Benji, before I go too far, I have to say that i have a: never written any carbon code and b: don t know my way around the vim code. But before my
      Message 2 of 11 , Jan 13, 2006
      • 0 Attachment
        Hi guys, Benji,

        before I go too far, I have to say that i have a: never written any
        carbon code and b: don't know my way around the vim code.

        But before my beloved vim becomes obsolete, I'll stand up and fight
        with the best of them :-)

        So on the positive side, I can offer two G4's - one in a powerbook
        and one in a mac mini - and a whole lot of unix/C/perl/make experience.

        I too think that an xcode project would be the way to go - anyone who
        wants to compile anything on a mac has to install the developer
        package anyway, so then it's just a matter of click and go.

        Since I'm so 'out of it' I'd appreciate some starting pointers (I'll
        look through the technote you provided) and it'd be good if there was
        someone prepared to test whatever I produce. Even better would be if
        there were more than one of us doing the dirty work :-)

        So to sum up, count me in, but I'd be happier if a mac/vim aficionado
        was standing by.

        Cheers,

        Steve


        On 13.01.2006, at 09:59, Trenton Schulz wrote:

        >
        > On Jan 13, 2006, at 6:12 AM, Benji Fisher wrote:
        >
        >> On Fri, Jan 13, 2006 at 12:04:39AM +1100, Tom Birch wrote:
        >>> I've got a DTK (the developer machine, not a new one announced
        >>> yesterday), it doesn't compile now because of dependency on
        >>> quickdraw, which hasn't been ported to intel, so i guess the first
        >>> job is to get rid of that, if you send me stuff i'll be happy to
        >>> spend some time compiling/debugging but unfortunately I can't give
        >>> you an account as that would involve giving you access to our login
        >>> server
        >>>
        >>> cheers,
        >>> Tom
        >>
        >> The list of credits at http://macvim.org/OSX/
        >> index.php#Credits may
        >> be a little out of date, but this part is still correct:
        >>
        >> This site, including some of the binaries here, is maintained by
        >> Benji Fisher. That is all I do: I am not competent to program
        >> for the Mac,
        >>
        >> In other words, someone else has to get the code to the point where
        >> "make" will work; I can take it from there. Perhaps I should repeat:
        >>
        >> Help!
        >>
        >> On Thu, Jan 12, 2006 at 02:06:25PM +0100, Trenton Schulz wrote:
        >>>
        >>> Apple has posted a tech note that should be relevant:
        >>>
        >>> http://developer.apple.com/technotes/tn2005/tn2137.html
        >>
        >> Thanks, that looks like a good place to start. I can handle
        >> adding
        >> a few options to CFLAGS and LDFLAGS. I have not tried it yet, but
        >> if I
        >> understand Tom correctly, it will not work without some changes to
        >> the
        >> code first.
        >
        > I would give it a shot at first. QuickDraw is certainly deprecated,
        > but I find it hard to believe that they removed it from the Intel
        > Mac's. They would need to have it working for Rosetta at least. And
        > I can't believe that Apple would be so arrogant to remove the
        > library in a minor OS release.
        >
        >
        >>
        >>> Otherwise, I don't think the current Project Builder file included
        >>> with vim works anymore. I toyed with the idea of trying to make an
        >>> Xcode-based one (if only for getting a PCH and stuff) but quickly
        >>> abandoned it. Besides the editor in Xcode is so sub-par compared to
        >>> vim (and the vi integration leaves a lot to be desired) why would
        >>> you
        >>> want to use it? :)
        >>>
        >>> Good luck,
        >>>
        >>> -- Trenton
        >>
        >> The only reason I considered using Xcode is that it might be the
        >> easiest way to cross-compile, or create a "universal" binary.
        >
        > Everything that Xcode does can be done on the command line (well,
        > OK, most of it). I'd try what's suggested in the tech note. If
        > things don't work, then there would be an estimation as to how much
        > work is needed to get further.
        >
        > Bien Suerte!
        >
        > -- Trenton
        >

        Steve
      • Benji Fisher
        ... Hi, Steve. ... I do not think there is any danger of that. Unless autoconf is seriously broken on OS X/Intel, anyone who owns one of the new machines
        Message 3 of 11 , Jan 16, 2006
        • 0 Attachment
          On Fri, Jan 13, 2006 at 07:09:00PM +0100, Stephen Riehm wrote:
          > Hi guys, Benji,

          Hi, Steve.

          > before I go too far, I have to say that i have a: never written any
          > carbon code and b: don't know my way around the vim code.
          >
          > But before my beloved vim becomes obsolete, I'll stand up and fight
          > with the best of them :-)

          I do not think there is any danger of that. Unless autoconf is
          seriously broken on OS X/Intel, anyone who owns one of the new machines
          should be able to compile vim on it. (One thing that worries me is that
          there may be places in the code where #ifdef's are used to deal with
          big-endian vs. little-endian architectures, and that may have to be
          changed.) The only issue I see is how soon we will be able to provide
          ready-to-run binaries for those who prefer not to compile for
          themselves. (My wife is already talking about replacing our PowerBook
          G4, but we will probably wait for the price to come down and maybe OS X
          10.5.1 or so, so I do not expect to be the first on this list with an
          Intel Mac.)

          > So on the positive side, I can offer two G4's - one in a powerbook
          > and one in a mac mini - and a whole lot of unix/C/perl/make experience.
          >
          > I too think that an xcode project would be the way to go - anyone who
          > wants to compile anything on a mac has to install the developer
          > package anyway, so then it's just a matter of click and go.

          I am not sure that Xcode is the way to go, but maybe it is. Anyone
          who installs the developer package also has gcc, make, and autoconf as
          well. If you do work on getting Xcode to work, please give instructions
          for command-line (non-GUI) compilation using Xcode. I, for one, like
          being able to automate the process, so I am not interested in GUI
          compilation.

          > Since I'm so 'out of it' I'd appreciate some starting pointers (I'll
          > look through the technote you provided) and it'd be good if there was
          > someone prepared to test whatever I produce. Even better would be if
          > there were more than one of us doing the dirty work :-)

          If you want to work on Xcode, there are two steps: converting to
          Xcode and then compiling for Intel. Plenty of us can help test the
          first step; we can worry about testing Step 2 once Step 1 is working.

          The structure is already in place for Project Builder. It should
          be possible to convert that to Xcode; look into the Apple docs for how
          to do that. I hope there is a way to convert directly to Xcode 2.1. If
          worst comes to worst, my PowerBook is still running OS X 10.3 and (I
          think) Xcode 1.0, so we should be able to convert PB to Xcode 1.0 to
          Xcode 2.1.

          Unless you change your mind and decide to stick with autoconf/make,
          I suggest you start there.

          > So to sum up, count me in, but I'd be happier if a mac/vim aficionado
          > was standing by.
          >
          > Cheers,
          >
          > Steve

          --Benji Fisher
        • Jussi Hagman
          ... Good to hear that you take your job seriously! :) ... Yes. ... I doubt it, haven t tried for a while though. ... I don t have an intel mac yet (and won t
          Message 4 of 11 , Feb 18, 2006
          • 0 Attachment
            On 12.1.2006, at 8:06, Benji Fisher wrote:

            > As the maintainer of the binaries on http://macvim.org/OSX/ I guess
            > it is my job to compile for OS X on Intel-based Macs.

            Good to hear that you take your job seriously! :)

            > Does anyone know how to cross-compile, or make a "universal"
            > binary, without using the XCode GUI?

            Yes.

            > Is it currently possible to compile vim *with* XCode?

            I doubt it, haven't tried for a while though.

            > Who is going to be the first on the block to buy an Intel-based Mac and
            > test it?

            I don't have an intel mac yet (and won't have one for a while I guess)
            but I've just used a few hours for a good cause in a bar drinking wine
            and tweaking+compiling manually an universal binary of vim 6.4. A friend
            tried it briefly on an intel-iMac he has loaned from Apple for a review.
            He unfortunately does not know vim well so he was unable to do any real
            testing.

            I'll try to find time later this weekend to document the (stupid) way I
            did it. :)

            I'm not claiming that this is a properly working version but if anyone
            has an intel mac please test it and Benji, if you like you can add it to
            macvim.org but only with a note that it is not a properly tested
            version.

            You can find the universal version of vim 6.4 here:

            http://infa.abo.fi/~jhagman/vim-universal-test.zip

            Greetings,
            Jussi


            --
            Jussi Hagman, jhagman@..., iChat/AIM: jussihagman, ICQ: 54004113
            Studentbyn 4 D 33, 20540 Åbo, Finland +358 50 56 51 170
          • Bernhard Prümmer
            ... I do own an iMac Core-Duo; I decided it was time for a new Mac at the beginning of this year, and thought it should be wise to wait for Steve s keynote on
            Message 5 of 11 , Feb 18, 2006
            • 0 Attachment
              Am 18.02.2006 um 21:20 schrieb Jussi Hagman:

              >
              >> Who is going to be the first on the block to buy an Intel-based
              >> Mac and
              >> test it?
              >
              > I don't have an intel mac yet (and won't have one for a while I guess)
              > but I've just used a few hours for a good cause in a bar drinking wine
              > and tweaking+compiling manually an universal binary of vim 6.4. A
              > friend
              > tried it briefly on an intel-iMac he has loaned from Apple for a
              > review.
              > He unfortunately does not know vim well so he was unable to do any
              > real
              > testing.
              >
              > I'll try to find time later this weekend to document the (stupid)
              > way I
              > did it. :)
              >
              I do own an iMac Core-Duo; I decided it was time for a new Mac at the
              beginning
              of this year, and thought it should be wise to wait for Steve's
              keynote on
              Jan. 10th. So, now it's an Intel-based iMac instead of an iMac G5.
              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). Interestingly, vim has no problems to create and use
              swap files
              in the same directory while you edit. [ ??? :-( ]
              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.

              > I'm not claiming that this is a properly working version but if anyone
              > has an intel mac please test it and Benji, if you like you can add
              > it to
              > macvim.org but only with a note that it is not a properly tested
              > version.
              >
              > You can find the universal version of vim 6.4 here:
              >
              > http://infa.abo.fi/~jhagman/vim-universal-test.zip
              >
              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.

              > Greetings,
              > Jussi
              >
              Cheers
              Bernhard
            • 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 6 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 7 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 8 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.