View Single Post
Old December 20, 2016, 20:19   #3
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,859
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by spara View Post
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 -no-pie -Wl,-r -o $@ $(OBJECTS)
Hopefully that will work.
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote