Package: saint Version: 2.3.4+dfsg-1 Severity: wishlist Tags: patch saint fails to build with ld --as-needed this flag requires libraries to be placed after objects needing their symbols. this causes build failures in ubuntu:
gcc -lm -lgsl -lgslcblas -Wl,-Bsymbolic-functions -Wl,-z,relro /tmp/buildd/saint-2.3.4+dfsg/build/*.o -o /tmp/buildd/saint-2.3.4+dfsg/bin/saint-reformat /tmp/buildd/saint-2.3.4+dfsg/build/initdata.o: In function `reformat_data': /tmp/buildd/saint-2.3.4+dfsg/src/SAINTreformat/initdata.c:305: undefined reference to `gsl_sort attached patch fixes the issue.
Description: fix build failure with ld --as-needed libraries need to be placed after objects needing them --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ all: makeDirs \ saint-reformat: $(CC) $(CFLAGS) -c $(SRC)/SAINTreformat/*.c $(SRC)/SAINTreformat/*.h mv *.o $(BUILD) - $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-reformat + $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-reformat $(LIBS) rm $(BUILD)/*.o @echo @echo @@ -52,7 +52,7 @@ saint-reformat: saint-spc-noctrl-matrix: $(CC) $(CFLAGS) -c $(SRC)/SAINTspc-noctrl-matrix/*.c $(SRC)/SAINTspc-noctrl-matrix/*.h mv *.o $(BUILD) - $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-noctrl-matrix + $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-noctrl-matrix $(LIBS) rm $(BUILD)/*.o @echo @echo @@ -60,7 +60,7 @@ saint-spc-noctrl-matrix: saint-spc-noctrl: $(CC) $(CFLAGS) -c $(SRC)/SAINTspc-noctrl/*.c $(SRC)/SAINTspc-noctrl/*.h mv *.o $(BUILD) - $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-noctrl + $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-noctrl $(LIBS) rm $(BUILD)/*.o @echo @echo @@ -69,7 +69,7 @@ saint-spc-noctrl: saint-spc-ctrl: $(CC) $(CFLAGS) -c $(SRC)/SAINTspc-ctrl/*.c $(SRC)/SAINTspc-ctrl/*.h mv *.o $(BUILD) - $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-ctrl + $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-spc-ctrl $(LIBS) rm $(BUILD)/*.o @echo @echo @@ -78,7 +78,7 @@ saint-spc-ctrl: saint-int-ctrl: $(CC) $(CFLAGS) -c $(SRC)/SAINTint-ctrl/*.c $(SRC)/SAINTint-ctrl/*.h mv *.o $(BUILD) - $(CC) $(LIBS) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-int-ctrl + $(CC) $(LDFLAGS) $(BUILD)/*.o -o $(TARGET)/saint-int-ctrl $(LIBS) rm $(BUILD)/*.o @echo @echo

