Link warning

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9637

    Link warning

    I've been getting this weird linker warning for a while in FA, and i'm wondering if anyone can enlighten me on it's cause and seriousness:

    Code:
    /usr/bin/ld: Warning: type of symbol `format' changed from 1 to 2 in z-form.o
    My z-form.c is vary similar to V3.1.0, the only differences being inclusion of the xchar stuff from NPP (which I don't think can be related) and some use of C_MAKE and KILL instead of C_RNEW and FREE in vformat() (which I guess could be it).
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.
  • Pete Mack
    Prophet
    • Apr 2007
    • 6883

    #2
    How old is your copy of the linker? It looks there was a patch to ld sometime after early 2004.

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9637

      #3
      Originally posted by Pete Mack
      How old is your copy of the linker? It looks there was a patch to ld sometime after early 2004.
      ld -v says

      Code:
      GNU ld (GNU Binutils for Ubuntu) 2.18.93.20081009
      Googling tells me that 2.19 is the latest version - maybe I should try and upgrade first...

      ...although apparently I have the current Ubuntu binutils package, and I usually don't go deeper than the package level with system modification.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Pete Mack
        Prophet
        • Apr 2007
        • 6883

        #4
        I guess the linker's not the problem. In that case, I have no idea.

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9637

          #5
          It looks like the answer should be that 'format' has been used as a variable name before it's use as a function name in z-form.c; problem is I can't find any such thing. I'm wondering if somehow it's included from some library or include file or something. In any case, it looks more like an annoyance than a worry.
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          • Magnate
            Angband Devteam member
            • May 2007
            • 5110

            #6
            Originally posted by Nick
            It looks like the answer should be that 'format' has been used as a variable name before it's use as a function name in z-form.c; problem is I can't find any such thing. I'm wondering if somehow it's included from some library or include file or something.
            'format' is one of the arguments taken by file_putf ... do you still use that?
            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

            Comment

            • Nick
              Vanilla maintainer
              • Apr 2007
              • 9637

              #7
              Originally posted by Magnate
              'format' is one of the arguments taken by file_putf ... do you still use that?
              It's still hanging around in z-file.c, but not used - and the argument it takes is fmt.

              I'm annoyed and baffled about this, but I don't think it's actually causing any problems.
              One for the Dark Lord on his dark throne
              In the Land of Mordor where the Shadows lie.

              Comment

              • Magnate
                Angband Devteam member
                • May 2007
                • 5110

                #8
                Originally posted by Nick
                It's still hanging around in z-file.c, but not used - and the argument it takes is fmt.
                The argument is fmt in most places, but it's format in wiz-spoil.c, if you still have that ....
                "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                Comment

                • Nick
                  Vanilla maintainer
                  • Apr 2007
                  • 9637

                  #9
                  Originally posted by Magnate
                  The argument is fmt in most places, but it's format in wiz-spoil.c, if you still have that ....
                  I think my wizard1.c is the equivalent, and it has no format.
                  One for the Dark Lord on his dark throne
                  In the Land of Mordor where the Shadows lie.

                  Comment

                  • s0be
                    Apprentice
                    • Jan 2008
                    • 96

                    #10
                    Nick,

                    Care to share your source tree? I'll chase it down real quick like.

                    Comment

                    • Nick
                      Vanilla maintainer
                      • Apr 2007
                      • 9637

                      #11
                      Originally posted by s0be
                      Care to share your source tree? I'll chase it down real quick like.
                      It has been an issue for at least a couple of versions including the latest, 0.3.6.
                      One for the Dark Lord on his dark throne
                      In the Land of Mordor where the Shadows lie.

                      Comment

                      • s0be
                        Apprentice
                        • Jan 2008
                        • 96

                        #12
                        ld 2.19.1.... no linker errors here.

                        Comment

                        • Nick
                          Vanilla maintainer
                          • Apr 2007
                          • 9637

                          #13
                          Originally posted by s0be
                          ld 2.19.1.... no linker errors here.
                          Cool. I'll wait the 6 days until the next Ubuntu release, which apparently will have 2.19.1 in it - maybe this time an error will be fixed as well as new ones introduced.
                          One for the Dark Lord on his dark throne
                          In the Land of Mordor where the Shadows lie.

                          Comment

                          Working...
                          😀
                          😂
                          🥰
                          😘
                          🤢
                          😎
                          😞
                          😡
                          👍
                          👎