Trouble compiling

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spara
    Adept
    • Nov 2014
    • 235

    Trouble compiling

    I upgraded my system to Debian Testing and Angband won't compile anymore. The error I'm getting after make is this. Any idea what's causing it?

    Code:
    ...
    /usr/bin/ld: -r and -pie may not be used together
    collect2: error: ld returned 1 exit status
    Makefile:34: recipe for target 'angband.o' failed
    make[3]: *** [angband.o] Error 1
    ../mk/buildsys.mk:110: recipe for target 'all' failed
    make[2]: *** [all] Error 2
    mk/buildsys.mk:115: recipe for target 'subdirs' failed
    make[1]: *** [subdirs] Error 2
    mk/buildsys.mk:110: recipe for target 'all' failed
    make: *** [all] Error 2
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9637

    #2
    Apparently it's a Debian thing, referred to in this post. Beyond that, I know nothing.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • takkaria
      Veteran
      • Apr 2007
      • 1951

      #3
      Originally posted by spara
      I upgraded my system to Debian Testing and Angband won't compile anymore. The error I'm getting after make is this. Any idea what's causing it?

      Code:
      ...
      /usr/bin/ld: -r and -pie may not be used together
      collect2: error: ld returned 1 exit status
      Makefile:34: recipe for target 'angband.o' failed
      make[3]: *** [angband.o] Error 1
      ../mk/buildsys.mk:110: recipe for target 'all' failed
      make[2]: *** [all] Error 2
      mk/buildsys.mk:115: recipe for target 'subdirs' failed
      make[1]: *** [subdirs] Error 2
      mk/buildsys.mk:110: recipe for target 'all' failed
      make: *** [all] Error 2
      Open 'Makefile' in src/. Edit the bit that says:

      Code:
      $(PROGNAME).o: $(OBJECTS)
          $(LD) -nostdlib -Wl,-r -o $@ $(OBJECTS)
          @printf "%10s %-20s\n" LINK $@
      Add '-no-pie' to this line:

      Code:
          $(LD) -nostdlib [COLOR="DarkOrange"]-no-pie[/COLOR] -Wl,-r -o $@ $(OBJECTS)
      Hopefully that will work.
      takkaria whispers something about options. -more-

      Comment

      • spara
        Adept
        • Nov 2014
        • 235

        #4
        Thanks. Sorted. Did autogen and configure. Then added -no-pie to CC-line in mk/buildsys.mk and did make. Now it compiles and all is well again .

        Comment

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