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

Simplified build procedure for MacVim

Expand Messages
  • björn
    Hi, I have simplified the build procedure for MacVim somewhat and I ll update the Building wiki soon. Until then, this is how to build MacVim: 1. git pull 2.
    Message 1 of 12 , Sep 30, 2009
    • 0 Attachment
      Hi,

      I have simplified the build procedure for MacVim somewhat and I'll
      update the Building wiki soon. Until then, this is how to build
      MacVim:

      1. git pull
      2. ./configure
      3. make

      No need for "--with-gui=macvim" (it is chosen by default), no need to
      "xcodebuild" (it is called from the Makefile). The resulting app
      bundle will be in the usual place (src/MacVim/build/Release).

      The default is to build for the native architecture. This means:

      * 10.4/10.5: 32 bit PPC or Intel (depending on which processor you have)
      * 10.6: 64 bit Intel

      To build a universal binary (with more than one architecture), or e.g.
      force 32 bit on 10.6, you'll have to use the "--with-macarchs" flag
      (note: it is plural now, it used to be "--with-mac-arch"). For
      example:

      ./configure --with-macarchs="i386 x86_64"
      ./configure --with-macarchs=i386

      The default is to build using the "current" SDK version. This can be
      changed by using the "--with-macsdk" flag:

      ./configure --with-macsdk=10.5

      (You'll want to use that one on 10.6 to get 'transp' to work at the
      moment.) There are limitations on the use of this flag -- I can not
      get it to work with "10.4" for instance, but I don't think many people
      will be interested in this flag anyway (my main motivation for adding
      it was so that I can build snapshots easily).


      Björn

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • orestis
      Hello Björn, I am trying to build the latest version from git, but i keep getting errors at the creation of the icons. The commands i use to build are:
      Message 2 of 12 , Sep 30, 2009
      • 0 Attachment
        Hello Björn,

        I am trying to build the latest version from git, but i keep getting
        errors at the creation of the icons.

        The commands i use to build are:

        ./configure --enable-cscope \
        --with-macsdk=10.5
        make

        This is the output i get:
        ....
        # "now", so that the zip is not unzipped in every `make` run.`
        touch Envy\ Code\ R\ Bold.ttf
        make -C makeicns
        cc -fpascal-strings -O2 -c -o makeicns.o makeicns.m
        cc -fpascal-strings -O2 -c -o IconFamily.o IconFamily.m
        cc -fpascal-strings -O2 -c -o NSString+CarbonFSRefCreation.o NSString
        +CarbonFSRefCreation.m
        g++ -o makeicns makeicns.o IconFamily.o NSString+CarbonFSRefCreation.o
        -O2 \
        -framework Foundation -framework AppKit -framework Carbon
        /usr/bin/python make_icons.py /Users/orestis/Code/macvim-build/src/
        MacVim/build/Release/MacVim.app/Contents/Resources
        MacVim-cpp
        Command /bin/sh failed with exit code 2
        Command /bin/sh failed with exit code 2
        Touch build/Release/MacVim.app
        cd /Users/orestis/Code/macvim-build/src/MacVim
        /usr/bin/touch -c /Users/orestis/Code/macvim-build/src/MacVim/
        build/Release/MacVim.app

        ** BUILD FAILED **


        The following build commands failed:
        MacVim:
        PhaseScriptExecution "Make Document Icons" /Users/orestis/Code/macvim-
        build/src/MacVim/build/MacVim.build/Release/MacVim.build/
        Script-1D1C31F00EFFBFD6003FE9A5.sh
        (1 failure)

        make[1]: *** [macvim] Error 1
        make: *** [first] Error 2

        --------------------------------------------------------------------------------------------

        By running make in the directory src/MacVim/icons the following
        message appears
        ....
        make -C makeicns
        make[1]: `makeicns' is up to date.
        /usr/bin/python make_icons.py .
        MacVim-cpp
        Traceback (most recent call last):
        File "make_icons.py", line 199, in <module>
        main()
        File "make_icons.py", line 191, in main
        textrenderer=SmallTextRenderer, backgroundrenderer=NoIconRenderer)
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 572, in makedocicon
        makedocicon_opts(optsFromDict(**kwargs))
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 548, in makedocicon_opts
        icons = dict([(s, renderer.createIconAtSize(s)) for s in sizes])
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 527, in createIconAtSize
        return createIcon(s, self.bgRenderer, self.textRenderer,
        self.testtext)
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 376, in createIcon
        output = bg.backgroundAtSize(s).copy()
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 211, in backgroundAtSize
        self.drawAtSize(s)
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 201, in drawAtSize
        self.bgRenderer.groundAtSize(s).draw()
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 154, in groundAtSize
        self._performSplit(s)
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 168, in _performSplit
        ground, shadow = splitGenericDocumentIcon(self.unsplitted, s)
        File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
        docerator.py", line 253, in splitGenericDocumentIcon
        assert ir == ig == ib
        AssertionError
        make: *** [MacVim-generic.icns] Error 1

        By the way, i am on Snow Leopard.

        Thanks,
        Orestis


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • björn
        ... Hi Orestis, That looks like the bug that Nico patched just recently. Go into src/MacVim/icons and do a make clean and everything should be fine (you did
        Message 3 of 12 , Oct 1, 2009
        • 0 Attachment
          2009/10/1 orestis:
          >
          > I am trying to build the latest version from git, but i keep getting
          > errors at the creation of the icons.
          >
          > The commands i use to build are:
          >
          >    ./configure --enable-cscope \
          >                      --with-macsdk=10.5
          >     make
          >
          > This is the output i get:
          > ....
          >  File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
          > docerator.py", line 253, in splitGenericDocumentIcon
          >    assert ir == ig == ib
          > AssertionError
          > make: *** [MacVim-generic.icns] Error 1

          Hi Orestis,

          That looks like the bug that Nico patched just recently. Go into
          src/MacVim/icons and do a "make clean" and everything should be fine
          (you did remember to "git pull", right?).

          Björn

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • orestis
          Hello Björn, Thanks for the reply. I have already tried cleaning the directory before running make and i still got the same error (sorry for forgetting to
          Message 4 of 12 , Oct 1, 2009
          • 0 Attachment
            Hello Björn,

            Thanks for the reply. I have already tried cleaning the directory
            before running make and i still got the same error (sorry for
            forgetting to mention it).
            I even deleted my local repository and re-pulled it to ensure that i
            have a clean one before building and the same problem keeps popping
            up.

            Whatever i do, it seems that the assertion is always triggered.

            By the way, i don't know if this affects anything (probably not), but
            i am running the Snow Leopard kernel in 32bit mode.

            Thanks,
            Orestis

            On Oct 1, 10:25 am, björn <bjorn.winck...@...> wrote:
            > 2009/10/1 orestis:
            >
            >
            >
            >
            >
            > > I am trying to build the latest version from git, but i keep getting
            > > errors at the creation of the icons.
            >
            > > The commands i use to build are:
            >
            > >    ./configure --enable-cscope \
            > >                      --with-macsdk=10.5
            > >     make
            >
            > > This is the output i get:
            > > ....
            > >  File "/Users/orestis/Code/macvim-build/src/MacVim/icons/
            > > docerator.py", line 253, in splitGenericDocumentIcon
            > >    assert ir == ig == ib
            > > AssertionError
            > > make: *** [MacVim-generic.icns] Error 1
            >
            > Hi Orestis,
            >
            > That looks like the bug that Nico patched just recently.  Go into
            > src/MacVim/icons and do a "make clean" and everything should be fine
            > (you did remember to "git pull", right?).
            >
            > Björn
            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Michael Wookey
            ... There is no need to re-pull the repository. The quickest way to clean out build objects is to use git: $ git clean -dqxf After which, you will have a
            Message 5 of 12 , Oct 1, 2009
            • 0 Attachment
              2009/10/1 orestis <arestis@...>:
              > I even deleted my local repository and re-pulled it to ensure that i
              > have a clean one before building and the same problem keeps popping
              > up.

              There is no need to re-pull the repository. The quickest way to clean
              out build objects is to use git:

              $ git clean -dqxf

              After which, you will have a pristine working directory.

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • björn
              ... I guess you could try starting in 64 bit mode and see if it makes any difference...? I m afraid I don t know what the problem is: lets hope Nico has an
              Message 6 of 12 , Oct 2, 2009
              • 0 Attachment
                2009/10/1 orestis:
                >
                > Thanks for the reply. I have already tried cleaning the directory
                > before running make and i still got the same error (sorry for
                > forgetting to mention it).
                > I even deleted my local repository and re-pulled it to ensure that i
                > have a clean one before building and the same problem keeps popping
                > up.
                >
                > Whatever i do, it seems that the assertion is always triggered.
                >
                > By the way, i don't know if this affects anything (probably not), but
                > i am running the Snow Leopard kernel in 32bit mode.

                I guess you could try starting in 64 bit mode and see if it makes any
                difference...?

                I'm afraid I don't know what the problem is: lets hope Nico has an idea...Nico?

                Björn

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Nico Weber
                ... Not really. Are you running some theming software that replaced your / System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/
                Message 7 of 12 , Oct 2, 2009
                • 0 Attachment
                  >> Thanks for the reply. I have already tried cleaning the directory
                  >> before running make and i still got the same error (sorry for
                  >> forgetting to mention it).
                  >> I even deleted my local repository and re-pulled it to ensure that i
                  >> have a clean one before building and the same problem keeps popping
                  >> up.
                  >>
                  >> Whatever i do, it seems that the assertion is always triggered.
                  >>
                  >> By the way, i don't know if this affects anything (probably not), but
                  >> i am running the Snow Leopard kernel in 32bit mode.
                  >
                  > I guess you could try starting in 64 bit mode and see if it makes any
                  > difference...?
                  >
                  > I'm afraid I don't know what the problem is: lets hope Nico has an
                  > idea...Nico?

                  Not really. Are you running some theming software that replaced your /
                  System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/
                  GenericDocumentIcon.icns ? Can you send me that file?

                  Nico

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • orestis
                  ... I tried to boot in 64bit mode, but i could not get it working. From what i ve read, it seems that apple decided to prevent macbooks (not pros) from booting
                  Message 8 of 12 , Oct 3, 2009
                  • 0 Attachment
                    On Oct 2, 8:07 pm, björn <bjorn.winck...@...> wrote:
                    > 2009/10/1 orestis:
                    >
                    >
                    >
                    > > Thanks for the reply. I have already tried cleaning the directory
                    > > before running make and i still got the same error (sorry for
                    > > forgetting to mention it).
                    > > I even deleted my local repository and re-pulled it to ensure that i
                    > > have a clean one before building and the same problem keeps popping
                    > > up.
                    >
                    > > Whatever i do, it seems that the assertion is always triggered.
                    >
                    > > By the way, i don't know if this affects anything (probably not), but
                    > > i am running the Snow Leopard kernel in 32bit mode.
                    >
                    > I guess you could try starting in 64 bit mode and see if it makes any
                    > difference...?
                    >
                    > I'm afraid I don't know what the problem is: lets hope Nico has an idea...Nico?
                    >
                    > Björn

                    I tried to boot in 64bit mode, but i could not get it working.
                    From what i've read, it seems that apple decided to prevent macbooks
                    (not pros) from booting into 64bit mode.
                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_mac" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • orestis
                    ... Hey Nico thanks! I guess that was the problem :) I used candybar to change that icon, and reverting back to the original icon macvim builds just fine. The
                    Message 9 of 12 , Oct 3, 2009
                    • 0 Attachment
                      On Oct 2, 11:37 pm, Nico Weber <nicolaswe...@...> wrote:
                      > Not really. Are you running some theming software that replaced your /
                      > System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/
                      > GenericDocumentIcon.icns ? Can you send me that file?
                      >
                      > Nico

                      Hey Nico thanks!
                      I guess that was the problem :) I used candybar to change that icon,
                      and reverting back
                      to the original icon macvim builds just fine.

                      The strange thing is that if i specify the following parameters and
                      use the modified icon,
                      macvim builds successfully as well :

                      export CFLAGS="-march=nocona -O2"
                      export CCFLAGS="-march=nocona -O2"

                      ./configure --with-features=big \
                      --enable-cscope \
                      --enable-perlinterp \
                      --enable-multibyte \
                      --disable-netbeans \
                      --with-macsdk=10.5 \
                      --with-macarchs=i386

                      You can find the icon here: http://uploading.com/files/2e446921/GenericDocumentIcon.icns/
                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_mac" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    • Tyson Roberts
                      From what I understand, the 32 bit kernel should not affect anything, really. None of the stuff that touches external apps (including 64 bit libraries/apps)
                      Message 10 of 12 , Oct 3, 2009
                      • 0 Attachment
                        From what I understand, the 32 bit kernel should not affect anything, really.  None of the stuff that touches external apps (including 64 bit libraries/apps) is affected by whether the kernel is running in 32/64 bit.  The 32 bit kernel supports 64 bit apps without change.

                        Also, it's not just the MBs that are affected - almost all models (with the exception of some of their servers) boot into 32 bit kernel by default, mostly out of respect for the fact that most 3rd parties haven't written 64 bit drivers yet.

                        Tyson


                        > > By the way, i don't know if this affects anything (probably not), but
                        > > i am running the Snow Leopard kernel in 32bit mode.
                        >
                        > I guess you could try starting in 64 bit mode and see if it makes any
                        > difference...?
                        >
                        > I'm afraid I don't know what the problem is: lets hope Nico has an idea...Nico?
                        >
                        > Björn

                        I tried to boot in 64bit mode, but i could not get it working.
                        From what i've read, it seems that apple decided to prevent macbooks
                        (not pros) from booting into 64bit mode.



                        --~--~---------~--~----~------------~-------~--~----~
                        You received this message from the "vim_mac" maillist.
                        For more information, visit http://www.vim.org/maillist.php
                        -~----------~----~----~----~------~----~------~--~---

                      • orestis
                        Hello Tyson, Yes i am aware of this as some of the apps already run at 64bit mode. What I am saying is that apple decided to turn off 64bit mode on macbooks
                        Message 11 of 12 , Oct 3, 2009
                        • 0 Attachment
                          Hello Tyson,

                          Yes i am aware of this as some of the apps already run at 64bit mode.
                          What I am saying is that apple decided to turn off 64bit mode on
                          macbooks completely.

                          So even if i change the boot flags as stated here (http://netkas.org/?
                          p=127)
                          or holding down the keys "6" and "4" during boot, i always get into
                          32bit mode.

                          What i was thinking was that the automated build process might had a
                          bug into
                          picking the right libraries / paths and so on, as the configure script
                          uses uname to get information about the system...

                          However, as it seems the problem was due to a modified icon. (thanks
                          Nico).

                          On Oct 3, 11:20 am, Tyson Roberts <nallo...@...> wrote:
                          > From what I understand, the 32 bit kernel should not affect anything,
                          > really.  None of the stuff that touches external apps (including 64 bit
                          > libraries/apps) is affected by whether the kernel is running in 32/64 bit.
                          > The 32 bit kernel supports 64 bit apps without change.
                          >
                          > Also, it's not just the MBs that are affected - almost all models (with the
                          > exception of some of their servers) boot into 32 bit kernel by default,
                          > mostly out of respect for the fact that most 3rd parties haven't written 64
                          > bit drivers yet.
                          >
                          > Tyson
                          >
                          > > > By the way, i don't know if this affects anything (probably not), but
                          > > > > i am running the Snow Leopard kernel in 32bit mode.
                          >
                          > > > I guess you could try starting in 64 bit mode and see if it makes any
                          > > > difference...?
                          >
                          > > > I'm afraid I don't know what the problem is: lets hope Nico has an
                          > > idea...Nico?
                          >
                          > > > Björn
                          >
                          > > I tried to boot in 64bit mode, but i could not get it working.
                          > > From what i've read, it seems that apple decided to prevent macbooks
                          > > (not pros) from booting into 64bit mode.
                          --~--~---------~--~----~------------~-------~--~----~
                          You received this message from the "vim_mac" maillist.
                          For more information, visit http://www.vim.org/maillist.php
                          -~----------~----~----~----~------~----~------~--~---
                        • Tyson Roberts
                          Yeah, I m in the same situation on my MBP - set the flags and did the 6/4 trick to no avail. I suspect that might change in the future, but in any case, not
                          Message 12 of 12 , Oct 3, 2009
                          • 0 Attachment
                            Yeah, I'm in the same situation on my MBP - set the flags and did the 6/4 trick to no avail.

                            I suspect that might change in the future, but in any case, not really worried.  I apologize,
                            was not meaning to preach to the choir on this one. 

                            Anyway, I digress - back to MacVim stuff!

                            - Tyson

                            On Sat, Oct 3, 2009 at 7:50 PM, orestis <arestis@...> wrote:

                            Hello Tyson,

                            Yes i am aware of this as some of the apps already run at 64bit mode.
                            What I am saying is that apple decided to turn off 64bit mode on
                            macbooks completely.

                            So even if i change the boot flags as stated here (http://netkas.org/?
                            p=127
                            )
                            or holding down the keys "6" and "4" during boot, i always get into
                            32bit mode.

                            What i was thinking was that the automated build process might had a
                            bug into
                            picking the right libraries / paths and so on, as the configure script
                            uses uname to get information about the system...

                            However, as it seems the problem was due to a modified icon. (thanks
                            Nico).

                            On Oct 3, 11:20 am, Tyson Roberts <nallo...@...> wrote:
                            > From what I understand, the 32 bit kernel should not affect anything,
                            > really.  None of the stuff that touches external apps (including 64 bit
                            > libraries/apps) is affected by whether the kernel is running in 32/64 bit.
                            > The 32 bit kernel supports 64 bit apps without change.
                            >
                            > Also, it's not just the MBs that are affected - almost all models (with the
                            > exception of some of their servers) boot into 32 bit kernel by default,
                            > mostly out of respect for the fact that most 3rd parties haven't written 64
                            > bit drivers yet.
                            >
                            > Tyson
                            >
                            > > > By the way, i don't know if this affects anything (probably not), but
                            > > > > i am running the Snow Leopard kernel in 32bit mode.
                            >
                            > > > I guess you could try starting in 64 bit mode and see if it makes any
                            > > > difference...?
                            >
                            > > > I'm afraid I don't know what the problem is: lets hope Nico has an
                            > > idea...Nico?
                            >
                            > > > Björn
                            >
                            > > I tried to boot in 64bit mode, but i could not get it working.
                            > > From what i've read, it seems that apple decided to prevent macbooks
                            > > (not pros) from booting into 64bit mode.



                            --~--~---------~--~----~------------~-------~--~----~
                            You received this message from the "vim_mac" maillist.
                            For more information, visit http://www.vim.org/maillist.php
                            -~----------~----~----~----~------~----~------~--~---

                          Your message has been successfully submitted and would be delivered to recipients shortly.