Hi,

as you can read below there is a patch available that enables building
saint on Ubuntu.  Please drop me a note whether I should apply this
quite simple patch for the Makefile or whether you intend to create a
new upstream version anyway in the near future that might incorporate
this patch.

BTW, we created another patch in the Debian packaging to enable
propagation of hardening options to the compiler.  It is available here:

   
http://anonscm.debian.org/viewvc/debian-med/trunk/packages/saint/trunk/debian/patches/fix-makefile.patch?view=markup

Kind regards

        Andreas.

----- Forwarded message from Julian Taylor <[email protected]> -----

Date: Thu, 30 May 2013 10:36:41 +0200
From: Julian Taylor <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: Bug#710364: saint: fails to build with ld --as-needed
X-Debian-PR-Message: report 710364
X-Debian-PR-Package: saint
X-Debian-PR-Keywords: patch
X-Debian-PR-Source: saint

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

_______________________________________________
Debian-med-packaging mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging


----- End forwarded message -----

-- 
http://fam-tille.de


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to