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

Re: Patch 7.3.050

Expand Messages
  • Charles E Campbell Jr
    ... On a Centos 5.2 system at work, patches 48-50 compiled and linked just fine. However, on my home computer with Fedora Core 11, its failing: link.sh:
    Message 1 of 19 , Nov 5, 2010
    • 0 Attachment
      Bram Moolenaar wrote:
      > Patch 7.3.050
      > Problem: The link script is clumsy.
      > Solution: Use the --as-needed linker option if available. (Kirill A.
      > Shutemov)
      > Files: src/Makefile, src/auto/configure, src/config.mk.in,
      > src/configure.in, src/link.sh
      >
      >
      On a Centos 5.2 system at work, patches 48-50 compiled and linked just
      fine. However, on my home computer with Fedora Core 11, its failing:

      link.sh: $LINK_AS_NEEDED set to 'yes': invoking linker directly.
      gcc -L/usr/local/lib -Wl,--as-needed -o vim objects/buffer.o
      objects/blowfish.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/hardcopy.o objects/hashtab.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/popupmnu.o objects/quickfix.o objects/regexp.o
      objects/screen.o objects/search.o objects/sha256.o objects/spell.o
      objects/syntax.o objects/tag.o objects/term.o objects/ui.o
      objects/undo.o objects/window.o objects/gui.o objects/gui_gtk.o
      objects/gui_gtk_x11.o objects/pty.o objects/gui_gtk_f.o
      objects/gui_beval.o objects/if_python.o objects/py_config.o
      objects/netbeans.o objects/version.o -lgtk-x11-2.0 -lgdk-x11-2.0
      -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0
      -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0
      -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm
      -lncurses -lelf -lnsl -lselinux -lacl -lattr -lgpm
      -L/usr/lib64/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
      -Xlinker -export-dynamic
      objects/term.o: In function `set_termname':
      /home/cec/.SW/VIM/vim73/src/term.c:1696: undefined reference to `tgetflag'
      /home/cec/.SW/VIM/vim73/src/term.c:1699: undefined reference to `tgetflag'
      /home/cec/.SW/VIM/vim73/src/term.c:1702: undefined reference to `tgetflag'
      /home/cec/.SW/VIM/vim73/src/term.c:1705: undefined reference to `tgetflag'
      /home/cec/.SW/VIM/vim73/src/term.c:1708: undefined reference to `tgetflag'
      /home/cec/.SW/VIM/vim73/src/term.c:1731: undefined reference to `tgetnum'
      /home/cec/.SW/VIM/vim73/src/term.c:1733: undefined reference to `tgetnum'
      /home/cec/.SW/VIM/vim73/src/term.c:1740: undefined reference to `tgetnum'
      /home/cec/.SW/VIM/vim73/src/term.c:1743: undefined reference to `BC'
      /home/cec/.SW/VIM/vim73/src/term.c:1744: undefined reference to `UP'
      /home/cec/.SW/VIM/vim73/src/term.c:1747: undefined reference to `PC'
      objects/term.o: In function `tgetent_error':
      /home/cec/.SW/VIM/vim73/src/term.c:2158: undefined reference to `tgetent'
      /home/cec/.SW/VIM/vim73/src/term.c:2168: undefined reference to `tgetent'
      objects/term.o: In function `vim_tgetstr':
      /home/cec/.SW/VIM/vim73/src/term.c:2195: undefined reference to `tgetstr'
      objects/term.o: In function `getlinecol':
      /home/cec/.SW/VIM/vim73/src/term.c:2219: undefined reference to `tgetnum'
      /home/cec/.SW/VIM/vim73/src/term.c:2221: undefined reference to `tgetnum'
      objects/term.o: In function `out_str':
      /home/cec/.SW/VIM/vim73/src/term.c:2662: undefined reference to `tputs'
      objects/term.o: In function `term_windgoto':
      /home/cec/.SW/VIM/vim73/src/term.c:2682: undefined reference to `tgoto'
      objects/term.o: In function `term_cursor_right':
      /home/cec/.SW/VIM/vim73/src/term.c:2689: undefined reference to `tgoto'
      objects/term.o: In function `term_append_lines':
      /home/cec/.SW/VIM/vim73/src/term.c:2696: undefined reference to `tgoto'
      objects/term.o: In function `term_delete_lines':
      /home/cec/.SW/VIM/vim73/src/term.c:2703: undefined reference to `tgoto'
      objects/term.o: In function `term_set_winpos':
      /home/cec/.SW/VIM/vim73/src/term.c:2717: undefined reference to `tgoto'
      objects/term.o:/home/cec/.SW/VIM/vim73/src/term.c:2725: more undefined
      references to `tgoto' follow
      objects/term.o: In function `clear_termcodes':
      /home/cec/.SW/VIM/vim73/src/term.c:3563: undefined reference to `BC'
      /home/cec/.SW/VIM/vim73/src/term.c:3564: undefined reference to `UP'
      /home/cec/.SW/VIM/vim73/src/term.c:3565: undefined reference to `PC'
      /home/cec/.SW/VIM/vim73/src/term.c:3566: undefined reference to `ospeed'
      collect2: ld returned 1 exit status
      link.sh: Linking failed
      gmake: *** [vim] Error 1

      Regards,
      Chip Campbell


      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Shlomi Fish
      Hi Chip, ... Are you using Fedora 11? If so, it was end-of-lifed on June: http://fedoraproject.org/wiki/Releases/11/Schedule You really should upgrade. There s
      Message 2 of 19 , Nov 6, 2010
      • 0 Attachment
        Hi Chip,

        On Saturday 06 November 2010 04:48:29 Charles E Campbell Jr wrote:
        > Bram Moolenaar wrote:
        > > Patch 7.3.050
        > > Problem: The link script is clumsy.
        > > Solution: Use the --as-needed linker option if available. (Kirill A.
        > >
        > > Shutemov)
        > >
        > > Files: src/Makefile, src/auto/configure, src/config.mk.in,
        > >
        > > src/configure.in, src/link.sh
        >
        > On a Centos 5.2 system at work, patches 48-50 compiled and linked just
        > fine. However, on my home computer with Fedora Core 11, its failing:
        >

        Are you using Fedora 11? If so, it was end-of-lifed on June:

        http://fedoraproject.org/wiki/Releases/11/Schedule

        You really should upgrade. There's already Fedora 14.

        And BTW, it's now "Fedora $N" - not "Fedora Core $N".

        Regards,

        Shlomi Fish

        [SNIPPED]
        --
        -----------------------------------------------------------------
        Shlomi Fish http://www.shlomifish.org/
        What does "Zionism" mean? - http://shlom.in/def-zionism

        <rindolf> She's a hot chick. But she smokes.
        <go|dfish> She can smoke as long as she's smokin'.

        Please reply to list if it's a mailing list post - http://shlom.in/reply .

        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Bram Moolenaar
        ... You do have -lncurses, which provides the missing symbols. I guess the --as-needed feature is broken in this compiler. If you can find out the version of
        Message 3 of 19 , Nov 6, 2010
        • 0 Attachment
          Charles Campbell wrote:

          > Bram Moolenaar wrote:
          > > Patch 7.3.050
          > > Problem: The link script is clumsy.
          > > Solution: Use the --as-needed linker option if available. (Kirill A.
          > > Shutemov)
          > > Files: src/Makefile, src/auto/configure, src/config.mk.in,
          > > src/configure.in, src/link.sh
          > >
          > >
          > On a Centos 5.2 system at work, patches 48-50 compiled and linked just
          > fine. However, on my home computer with Fedora Core 11, its failing:

          You do have -lncurses, which provides the missing symbols. I guess the
          --as-needed feature is broken in this compiler.

          If you can find out the version of gcc we could exclude it in configure.
          gcc -dumpversion
          gcc --version

          --
          An indication you must be a manager:
          You can explain to somebody the difference between "re-engineering",
          "down-sizing", "right-sizing", and "firing people's asses".

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ download, build and distribute -- http://www.A-A-P.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --
          You received this message from the "vim_dev" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • Alexey I. Froloff
          ... Those symbols lives in libtinfo (at least on my system). Try ./configure ... --with-tlib=tinfo ... -- Regards, Sir Raorn. -- You received this message from
          Message 4 of 19 , Nov 9, 2010
          • 0 Attachment
            On Sat, Nov 6, 2010 at 14:09, Bram Moolenaar <Bram@...> wrote:
            > You do have -lncurses, which provides the missing symbols.  I guess the
            > --as-needed feature is broken in this compiler.
            Those symbols lives in libtinfo (at least on my system).

            Try ./configure ... --with-tlib=tinfo ...

            --
            Regards,
            Sir Raorn.

            --
            You received this message from the "vim_dev" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • Bram Moolenaar
            ... The change to --as-needed should not require any configure argument changes. If it built OK before it should still build OK. -- To the optimist, the glass
            Message 5 of 19 , Nov 9, 2010
            • 0 Attachment
              Alexey Froloff wrote:

              > On Sat, Nov 6, 2010 at 14:09, Bram Moolenaar <Bram@...> wrote:
              > > You do have -lncurses, which provides the missing symbols. I guess the
              > > --as-needed feature is broken in this compiler.
              > Those symbols lives in libtinfo (at least on my system).
              >
              > Try ./configure ... --with-tlib=tinfo ...

              The change to --as-needed should not require any configure argument
              changes. If it built OK before it should still build OK.

              --
              To the optimist, the glass is half full.
              To the pessimist, the glass is half empty.
              To the engineer, the glass is twice as big as it needs to be.

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ download, build and distribute -- http://www.A-A-P.org ///
              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

              --
              You received this message from the "vim_dev" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Alexey I. Froloff
              ... libncurses is linked against libtinfo, but vim doesn t use any symbols from libncurses. -lncurses must be changed to -ltinfo, this is how --as-needed
              Message 6 of 19 , Nov 9, 2010
              • 0 Attachment
                On Wed, Nov 10, 2010 at 01:25, Bram Moolenaar <Bram@...> wrote:
                > The change to --as-needed should not require any configure argument
                > changes.  If it built OK before it should still build OK.
                libncurses is linked against libtinfo, but vim doesn't use any symbols from
                libncurses. -lncurses must be changed to -ltinfo, this is how --as-needed
                works.

                --
                Regards,
                Sir Raorn.

                --
                You received this message from the "vim_dev" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              • Alexey I. Froloff
                ... Another possible solution: $ cat /usr/lib/libncursesw.so /* GNU ld script */ GROUP(/usr/lib/libncursesw.so.5 -ltinfo) -- Regards, Sir Raorn. -- You
                Message 7 of 19 , Nov 9, 2010
                • 0 Attachment
                  On Wed, Nov 10, 2010 at 10:48, Alexey I. Froloff <raorn@...> wrote:
                  > libncurses is linked against libtinfo, but vim doesn't use any symbols from
                  > libncurses.  -lncurses must be changed to -ltinfo, this is how --as-needed
                  > works.
                  Another possible solution:

                  $ cat /usr/lib/libncursesw.so
                  /* GNU ld script */
                  GROUP(/usr/lib/libncursesw.so.5 -ltinfo)

                  --
                  Regards,
                  Sir Raorn.

                  --
                  You received this message from the "vim_dev" maillist.
                  Do not top-post! Type your reply below the text you are replying to.
                  For more information, visit http://www.vim.org/maillist.php
                • Bram Moolenaar
                  ... So, it turns out that --as-needed cannot replace the old method from link.sh completely. Since different systems put different things in libraries, and
                  Message 8 of 19 , Nov 10, 2010
                  • 0 Attachment
                    Alexey Froloff wrote:

                    > On Wed, Nov 10, 2010 at 01:25, Bram Moolenaar <Bram@...> wrote:
                    > > The change to --as-needed should not require any configure argument
                    > > changes. =A0If it built OK before it should still build OK.
                    > libncurses is linked against libtinfo, but vim doesn't use any symbols from
                    > libncurses. -lncurses must be changed to -ltinfo, this is how --as-needed
                    > works.

                    So, it turns out that --as-needed cannot replace the old method from
                    link.sh completely.

                    Since different systems put different things in libraries, and ncurses
                    is especially unpredictable, how would a configure check for -ltinfo
                    work? Could we always add -ltinfo when it's available, and then let
                    --as-needed skip ncurses when nothing is used from there?

                    --
                    Sorry, no fortune today.

                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                    /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                    \\\ download, build and distribute -- http://www.A-A-P.org ///
                    \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                    --
                    You received this message from the "vim_dev" maillist.
                    Do not top-post! Type your reply below the text you are replying to.
                    For more information, visit http://www.vim.org/maillist.php
                  • Alexey I. Froloff
                    ... link.sh is a hack, while --as-needed checks symbol usage. ... This is what autoconf was created for: AC_SEARCH_LIBS([tgetflag], [tinfo other different
                    Message 9 of 19 , Nov 10, 2010
                    • 0 Attachment
                      On Wed, Nov 10, 2010 at 13:49, Bram Moolenaar <Bram@...> wrote:
                      > So, it turns out that --as-needed cannot replace the old method from
                      > link.sh completely.
                      link.sh is a hack, while --as-needed checks symbol usage.

                      > Since different systems put different things in libraries, and ncurses
                      > is especially unpredictable, how would a configure check for -ltinfo
                      > work?  Could we always add -ltinfo when it's available, and then let
                      > --as-needed skip ncurses when nothing is used from there?
                      This is what autoconf was created for:

                      AC_SEARCH_LIBS([tgetflag], [tinfo other different libraries ncurses])

                      And appropriate option will be added to LIBS.

                      --
                      Regards,
                      Sir Raorn.

                      --
                      You received this message from the "vim_dev" maillist.
                      Do not top-post! Type your reply below the text you are replying to.
                      For more information, visit http://www.vim.org/maillist.php
                    • Bram Moolenaar
                      ... As the people who ran into the problems have mentioned, link.sh works fine and --as-needed doesn t. ... It s a bit more complicated than that. Checking
                      Message 10 of 19 , Nov 10, 2010
                      • 0 Attachment
                        Alexey Froloff wrote:

                        > On Wed, Nov 10, 2010 at 13:49, Bram Moolenaar <Bram@...> wrote:
                        > > So, it turns out that --as-needed cannot replace the old method from
                        > > link.sh completely.
                        > link.sh is a hack, while --as-needed checks symbol usage.

                        As the people who ran into the problems have mentioned, link.sh works
                        fine and --as-needed doesn't.

                        > > Since different systems put different things in libraries, and ncurses
                        > > is especially unpredictable, how would a configure check for -ltinfo
                        > > work? =A0Could we always add -ltinfo when it's available, and then let
                        > > --as-needed skip ncurses when nothing is used from there?
                        > This is what autoconf was created for:
                        >
                        > AC_SEARCH_LIBS([tgetflag], [tinfo other different libraries ncurses])
                        >
                        > And appropriate option will be added to LIBS.

                        It's a bit more complicated than that. Checking for tinfo before
                        ncurses might work on some machines. But does it work everywhere? Or
                        do we need to add checks for what the library needs to contain?

                        --
                        Q: Why does /dev/null accept only integers?
                        A: You can't sink a float.

                        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                        \\\ download, build and distribute -- http://www.A-A-P.org ///
                        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                        --
                        You received this message from the "vim_dev" maillist.
                        Do not top-post! Type your reply below the text you are replying to.
                        For more information, visit http://www.vim.org/maillist.php
                      • Alexey I. Froloff
                        ... If you use symbols from a library, you must link your application against this particular library, but not a library that is also linked against it. vim
                        Message 11 of 19 , Nov 10, 2010
                        • 0 Attachment
                          On Wed, Nov 10, 2010 at 17:07, Bram Moolenaar <Bram@...> wrote:
                          > It's a bit more complicated than that.  Checking for tinfo before
                          > ncurses might work on some machines.  But does it work everywhere?  Or
                          > do we need to add checks for what the library needs to contain?
                          If you use symbols from a library, you must link your application against
                          this particular library, but not a library that is also linked against it.

                          vim uses no symbols from libncurses itself, but with --no-as-needed
                          libncurses.so.X is present in DT_NEEDED and symbols from libtinfo
                          (which itself is present in libncurses' DT_NEEDED) are sucessfully
                          resolved by ld.so when wim is loaded.

                          All this stuff is described in Drepper's DSO HOWTO.

                          --
                          Regards,
                          Sir Raorn.

                          --
                          You received this message from the "vim_dev" maillist.
                          Do not top-post! Type your reply below the text you are replying to.
                          For more information, visit http://www.vim.org/maillist.php
                        • James Vega
                          ... If tinfo exists, then the symbols Vim uses will be there instead of in ncurses. AC_SEARCH_LIBS does look like the right way to check whether the system is
                          Message 12 of 19 , Nov 10, 2010
                          • 0 Attachment
                            On Wed, Nov 10, 2010 at 9:33 AM, Alexey I. Froloff <raorn@...> wrote:
                            > On Wed, Nov 10, 2010 at 17:07, Bram Moolenaar <Bram@...> wrote:
                            >> It's a bit more complicated than that.  Checking for tinfo before
                            >> ncurses might work on some machines.  But does it work everywhere?  Or
                            >> do we need to add checks for what the library needs to contain?

                            If tinfo exists, then the symbols Vim uses will be there instead of in
                            ncurses. AC_SEARCH_LIBS does look like the right way to check whether
                            the system is using the split ncurses libs or the monolithic lib.

                            > If you use symbols from a library, you must link your application against
                            > this particular library, but not a library that is also linked against it.
                            >
                            > vim uses no symbols from libncurses itself,

                            That obviously depends on how the libraries are built. Fedora/RedHat
                            build ncurses using the --with-termlib configure option which splits the
                            terminfo library out to its own file. I wonder how common that is and
                            whether all the distributions which build with the split libraries use
                            the same name.

                            --
                            James
                            GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan@...>

                            --
                            You received this message from the "vim_dev" maillist.
                            Do not top-post! Type your reply below the text you are replying to.
                            For more information, visit http://www.vim.org/maillist.php
                          • Bram Moolenaar
                            ... This suggests that tinfo was added later, and if it exists it should work to replace ncurses. However, if some system has a tinfo library that doesn t
                            Message 13 of 19 , Nov 10, 2010
                            • 0 Attachment
                              James Vega wrote:

                              > On Wed, Nov 10, 2010 at 9:33 AM, Alexey I. Froloff <raorn@...> wrote:
                              > > On Wed, Nov 10, 2010 at 17:07, Bram Moolenaar <Bram@...> wrote:
                              > >> It's a bit more complicated than that. Checking for tinfo before
                              > >> ncurses might work on some machines. But does it work everywhere? Or
                              > >> do we need to add checks for what the library needs to contain?
                              >
                              > If tinfo exists, then the symbols Vim uses will be there instead of in
                              > ncurses. AC_SEARCH_LIBS does look like the right way to check whether
                              > the system is using the split ncurses libs or the monolithic lib.
                              >
                              > > If you use symbols from a library, you must link your application against
                              > > this particular library, but not a library that is also linked against it.
                              > >
                              > > vim uses no symbols from libncurses itself,
                              >
                              > That obviously depends on how the libraries are built. Fedora/RedHat
                              > build ncurses using the --with-termlib configure option which splits the
                              > terminfo library out to its own file. I wonder how common that is and
                              > whether all the distributions which build with the split libraries use
                              > the same name.

                              This suggests that "tinfo" was added later, and if it exists it should
                              work to replace ncurses.

                              However, if some system has a "tinfo" library that doesn't have all the
                              symbols that Vim needs this will fail. That might be unlikely enough to
                              make the change now and wait for users to complain.

                              --
                              Every person is responsible for the choices he makes.

                              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                              \\\ download, build and distribute -- http://www.A-A-P.org ///
                              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                              --
                              You received this message from the "vim_dev" maillist.
                              Do not top-post! Type your reply below the text you are replying to.
                              For more information, visit http://www.vim.org/maillist.php
                            • Alexey I. Froloff
                              ... And this is why there is an option --with-tlib, that I ve mentioned 9 messages ago... -- Regards, Sir Raorn. -- You received this message from the
                              Message 14 of 19 , Nov 10, 2010
                              • 0 Attachment
                                On Wed, Nov 10, 2010 at 18:05, James Vega <jamessan@...> wrote:
                                > That obviously depends on how the libraries are built.  Fedora/RedHat
                                > build ncurses using the --with-termlib configure option which splits the
                                > terminfo library out to its own file.
                                And this is why there is an option --with-tlib, that I've mentioned 9
                                messages ago...

                                --
                                Regards,
                                Sir Raorn.

                                --
                                You received this message from the "vim_dev" maillist.
                                Do not top-post! Type your reply below the text you are replying to.
                                For more information, visit http://www.vim.org/maillist.php
                              Your message has been successfully submitted and would be delivered to recipients shortly.