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

Re: vim + OSX + [perl|python|tcl|ruby]

Expand Messages
  • Bram Moolenaar
    ... That s strange, because I have Python 2.3 on my 10.2 system and I can compile Vim there with Python just fine now. Is there a difference between the
    Message 1 of 13 , Oct 29, 2003
    • 0 Attachment
      Bob Ippolito wrote:

      > On Oct 29, 2003, at 3:36 PM, Bram Moolenaar wrote:
      >
      > > Benji Fisher wrote:
      > >
      > >> I assume that the patch I just snipped is the same as official
      > >> patch 6.2.140 . I tried it with 10.3 and got errors during linking:
      > >>
      > >> ld: Undefined symbols:
      > >> _init_codecs
      > >> _initerrno
      > >> _initzipimport
      > >> make[1]: *** [Vim] Error 1
      > >> make: *** [myself] Error 2
      > >>
      > >> Any suggestions are welcome.
      > >
      > > Is this with/without Perl/Python? I don't recognize these items, they
      > > are not from Vim.
      >
      > Those are indeed from Python. Not sure what you're doing, but those
      > symbols are defined in
      > /System/Library/Frameworks/Python.framework/Python

      That's strange, because I have Python 2.3 on my 10.2 system and I can
      compile Vim there with Python just fine now. Is there a difference
      between the Python 2.3 that's included with 10.3 and the Python that you
      can download and install yourself?

      If nobody can think of a cause I might have to ask a Mac-Python expert...

      --
      Why isn't there mouse-flavored cat food?

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
    • Bob Ippolito
      ... Not as far as Vim is concerned.. the only difference to Vim is that the one you install yourself is in /Library/Frameworks and the one that comes with 10.3
      Message 2 of 13 , Oct 29, 2003
      • 0 Attachment
        On Oct 29, 2003, at 4:40 PM, Bram Moolenaar wrote:

        >
        > Bob Ippolito wrote:
        >
        >> On Oct 29, 2003, at 3:36 PM, Bram Moolenaar wrote:
        >>
        >>> Benji Fisher wrote:
        >>>
        >>>> I assume that the patch I just snipped is the same as official
        >>>> patch 6.2.140 . I tried it with 10.3 and got errors during linking:
        >>>>
        >>>> ld: Undefined symbols:
        >>>> _init_codecs
        >>>> _initerrno
        >>>> _initzipimport
        >>>> make[1]: *** [Vim] Error 1
        >>>> make: *** [myself] Error 2
        >>>>
        >>>> Any suggestions are welcome.
        >>>
        >>> Is this with/without Perl/Python? I don't recognize these items,
        >>> they
        >>> are not from Vim.
        >>
        >> Those are indeed from Python. Not sure what you're doing, but those
        >> symbols are defined in
        >> /System/Library/Frameworks/Python.framework/Python
        >
        > That's strange, because I have Python 2.3 on my 10.2 system and I can
        > compile Vim there with Python just fine now. Is there a difference
        > between the Python 2.3 that's included with 10.3 and the Python that
        > you
        > can download and install yourself?

        Not as far as Vim is concerned.. the only difference to Vim is that the
        one you install yourself is in /Library/Frameworks and the one that
        comes with 10.3 is in /System/Library/Frameworks

        > If nobody can think of a cause I might have to ask a Mac-Python
        > expert...

        I'm one of those ;) I'd have to see the linker flags and possibly take
        a look at Vim source to determine a cause. I can't imagine a reason
        why Vim should be referencing those functions -- they're builtin module
        initializers that you don't need to call when you're embedding Python,
        it should take care of that on its own.

        -bob
      • Benji Fisher
        ... Sorry, I should have included a little more of the make output. Here are the last file compiled and the linking step: gcc -c -I. -Iproto -DHAVE_CONFIG_H
        Message 3 of 13 , Oct 29, 2003
        • 0 Attachment
          On Wed, Oct 29, 2003 at 05:00:40PM -0500, Bob Ippolito wrote:
          >
          > On Oct 29, 2003, at 4:40 PM, Bram Moolenaar wrote:
          >
          > >>Those are indeed from Python. Not sure what you're doing, but those
          > >>symbols are defined in
          > >>/System/Library/Frameworks/Python.framework/Python
          > >
          > >That's strange, because I have Python 2.3 on my 10.2 system and I can
          > >compile Vim there with Python just fine now. Is there a difference
          > >between the Python 2.3 that's included with 10.3 and the Python that
          > >you
          > >can download and install yourself?
          >
          > Not as far as Vim is concerned.. the only difference to Vim is that the
          > one you install yourself is in /Library/Frameworks and the one that
          > comes with 10.3 is in /System/Library/Frameworks
          >
          > >If nobody can think of a cause I might have to ask a Mac-Python
          > >expert...
          >
          > I'm one of those ;) I'd have to see the linker flags and possibly take
          > a look at Vim source to determine a cause. I can't imagine a reason
          > why Vim should be referencing those functions -- they're builtin module
          > initializers that you don't need to call when you're embedding Python,
          > it should take care of that on its own.

          Sorry, I should have included a little more of the "make" output.
          Here are the last file compiled and the linking step:

          gcc -c -I. -Iproto -DHAVE_CONFIG_H -arch ppc -fno-common
          -fpascal-strings -Wall
          -Wno-unknown-pragmas -mdynamic-no-pic -pipe -I. -Iproto
          -I/Developer/Headers/FlatCarbon -O2 -fno-strength-reduce -Wall
          -DMACOS_X_UNIX -no-cpp-precomp
          -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3
          -pthread version.c -o objects/version.o
          gcc: unrecognized option `-pthread'
          gcc -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/if_python.o objects/py_config.o objects/os_macosx.o
          objects/netbeans.o objects/version.o -framework Carbon -ltermcap
          -lncurses -liconv -framework Python
          ld: Undefined symbols:
          _init_codecs
          _initerrno
          _initzipimport
          make[1]: *** [Vim] Error 1
          make: *** [myself] Error 2

          --Benji Fisher
        • Bram Moolenaar
          ... Well, in that case you can perhaps think of a solution where we can build a binary version of Vim that runs on 10.2 and 10.3 with Python 2.2 and Python
          Message 4 of 13 , Oct 30, 2003
          • 0 Attachment
            Bob Ippolito wrote:

            > > If nobody can think of a cause I might have to ask a Mac-Python
            > > expert...
            >
            > I'm one of those ;)

            Well, in that case you can perhaps think of a solution where we can
            build a binary version of Vim that runs on 10.2 and 10.3 with Python 2.2
            and Python 2.3? Previously I thought that dynamically loading the
            library could work, but now this "-framework Python" argument is
            obscuring what is actually being linked with.

            The alternative is that we distribute Vim without Python support (that
            would run on most sytems) and several versions with Python support that
            run on specific systems. Add to that the optional Perl, Tcl and Ruby
            interface and we are soon distributing a dozen different Vim versions...

            --
            An indication you must be a manager:
            You feel sorry for Dilbert's boss.

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
            \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
            \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
          • Bob Ippolito
            ... There is no way to compile vim +python on OS X 10.2 (unless the user has installed Python on their own, or you include your own version of Python in the
            Message 5 of 13 , Oct 30, 2003
            • 0 Attachment
              On Oct 30, 2003, at 6:15, Bram Moolenaar wrote:

              > Bob Ippolito wrote:
              >
              >>> If nobody can think of a cause I might have to ask a Mac-Python
              >>> expert...
              >>
              >> I'm one of those ;)
              >
              > Well, in that case you can perhaps think of a solution where we can
              > build a binary version of Vim that runs on 10.2 and 10.3 with Python
              > 2.2
              > and Python 2.3? Previously I thought that dynamically loading the
              > library could work, but now this "-framework Python" argument is
              > obscuring what is actually being linked with.

              There is no way to compile vim +python on OS X 10.2 (unless the user
              has installed Python on their own, or you include your own version of
              Python in the Vim app bundle). Apple did not provide a dynamic library
              or framework to link to with their installed with OS X 10.2 version of
              Python 2.2.

              It is possible to dynamically load frameworks, it's actually really
              easy (CFBundle). The "core" of a framework is really just a dylib,
              which can be loaded on its own if you really wanted to (but don't do
              that, use CFBundle).

              > The alternative is that we distribute Vim without Python support (that
              > would run on most sytems) and several versions with Python support that
              > run on specific systems. Add to that the optional Perl, Tcl and Ruby
              > interface and we are soon distributing a dozen different Vim
              > versions...

              Not really, why don't you have two.. one for pre-10.3, and one for
              10.3? In 10.3, you can theoretically compile against Python, Perl, Tcl
              and (probably, but haven't looked) Ruby.

              As for the compilation issue that Benji is having, I'm going to have to
              look at the Vim source, I'll do that tonight. It shouldn't be asking
              for those symbols. Perhaps the way that Vim initializes an embedded
              Python is incorrect.

              -bob
            • Bram Moolenaar
              ... The idea is that we compile Vim with Python in such a way that someone that wants Python support can install Python (probably 2.3) and start using it.
              Message 6 of 13 , Oct 30, 2003
              • 0 Attachment
                Bob Ippolito wrote:

                > >>> If nobody can think of a cause I might have to ask a Mac-Python
                > >>> expert...
                > >>
                > >> I'm one of those ;)
                > >
                > > Well, in that case you can perhaps think of a solution where we can
                > > build a binary version of Vim that runs on 10.2 and 10.3 with Python
                > > 2.2
                > > and Python 2.3? Previously I thought that dynamically loading the
                > > library could work, but now this "-framework Python" argument is
                > > obscuring what is actually being linked with.
                >
                > There is no way to compile vim +python on OS X 10.2 (unless the user
                > has installed Python on their own, or you include your own version of
                > Python in the Vim app bundle). Apple did not provide a dynamic library
                > or framework to link to with their installed with OS X 10.2 version of
                > Python 2.2.

                The idea is that we compile Vim with Python in such a way that someone
                that wants Python support can install Python (probably 2.3) and start
                using it. Currently someone also has to install a different version of
                Vim. And that version will crash when you uninstall Python...

                > It is possible to dynamically load frameworks, it's actually really
                > easy (CFBundle). The "core" of a framework is really just a dylib,
                > which can be loaded on its own if you really wanted to (but don't do
                > that, use CFBundle).

                That sounds like something useful.

                > > The alternative is that we distribute Vim without Python support (that
                > > would run on most sytems) and several versions with Python support that
                > > run on specific systems. Add to that the optional Perl, Tcl and Ruby
                > > interface and we are soon distributing a dozen different Vim
                > > versions...
                >
                > Not really, why don't you have two.. one for pre-10.3, and one for
                > 10.3? In 10.3, you can theoretically compile against Python, Perl, Tcl
                > and (probably, but haven't looked) Ruby.

                And next year one for 10.4. Oh, and there are also a few 10.1 users.
                The point is: we would like to solve the problem, not work around it.
                That saves us a lot of work in the future and make it simpler for users.

                > As for the compilation issue that Benji is having, I'm going to have to
                > look at the Vim source, I'll do that tonight. It shouldn't be asking
                > for those symbols. Perhaps the way that Vim initializes an embedded
                > Python is incorrect.

                It works fine for me, thus it must be something strange. Perhaps a
                difference between the Python 2.3 distributed from python.org and the
                version included with 10.3?

                --
                Veni, Vidi, VW -- I came, I saw, I drove around in a little car.

                /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
                \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
                \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
              Your message has been successfully submitted and would be delivered to recipients shortly.