Package: gosmore
Version: 0.0.0.20100711-2
Severity: serious
Tags: patch
Justification: fails to build from source
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch



*** /tmp/tmpiep5TA

In Ubuntu, the attached patch was applied to achieve the following:

This package failed to build with GCC-4.6. The associated bug report is 
(https://bugs.launchpad.net/ubuntu/oneiric/+source/gosmore/+bug/770751). 

The error is at linking time, and by changing the order of parameters, it 
builds correctly. The attached patch contains the following change:

  * Makefile.in: Reordered linker parameters to avoid problem with GCC-4.6.

Thanks for considering the patch.

-- System Information:
Debian Release: squeeze/sid
  APT prefers natty-updates
  APT policy: (500, 'natty-updates'), (500, 'natty-security'), (500, 
'natty-proposed'), (500, 'natty')
Architecture: i386 (i686)

Kernel: Linux 2.6.38-8-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u gosmore-0.0.0.20100711/debian/changelog gosmore-0.0.0.20100711/debian/changelog
only in patch2:
unchanged:
--- gosmore-0.0.0.20100711.orig/Makefile.in
+++ gosmore-0.0.0.20100711/Makefile.in
@@ -34,8 +34,8 @@
 # I found that it's more reliable and more portable to use aplay, but
 # gnome sound can still be activated with this:
 #  `pkg-config --cflags --libs libgnomeui-2.0 && echo -DUSE_GNOMESOUND`
-XMLFLAGS=`pkg-config --cflags libxml-2.0 || echo -I /usr/include/libxml2` \
-  `pkg-config --libs libxml-2.0 || echo -l xml2 -lm`
+XMLFLAGS=`pkg-config --cflags libxml-2.0 || echo -I /usr/include/libxml2`
+XMLLIBS= `pkg-config --libs libxml-2.0 || echo -l xml2 -lm`
 ARCH=arm-mingw32ce-
 else
 # To compile with mingw, install MSYS and mingw, and then download
@@ -58,11 +58,11 @@
 # it. THE CODE IS NOT FINISHED. Linux version looks promising.
 gosmore:	gosmore.cpp libgosm.cpp libgosm.h bboxes.c
 		g++ -DCHILDREN=16 ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
-                  gosmore.cpp libgosm.cpp -o gosmore ${EXTRA}
+                  gosmore.cpp libgosm.cpp -o gosmore ${EXTRA} ${XMLLIBS}
 
 gosmore16:	gosmore.cpp libgosm.cpp libgosm.h
 		g++ -DGOSMZ=16 ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
-                  gosmore.cpp libgosm.cpp -o gosmore16 ${EXTRA}
+                  gosmore.cpp libgosm.cpp -o gosmore16 ${EXTRA} ${XMLLIBS}
 
 $(ARCH)gosmore.exe:	gosmore.cpp libgosm.cpp gosmore.rsc resource.h \
                     libgosm.h ceglue.h ceglue.c bboxes.c
@@ -83,7 +83,7 @@
 		wget -O - ${WIKIPAGE}/Translations |./extract >translations.c
 
 extract:	extract.c
-		${CC} ${CFLAGS} ${XMLFLAGS} extract.c -o extract
+		${CC} ${CFLAGS} ${XMLFLAGS} extract.c -o extract ${XMLLIBS}
 
 bboxes.c:	density.c density.txt
 		gcc -lm density.c -o density
@@ -93,7 +93,7 @@
 
 osmunda:	osmunda.cpp libgosm.cpp libgosm.h
 		g++ ${CFLAGS} ${WARNFLAGS} ${XMLFLAGS} \
-		  osmunda.cpp libgosm.cpp -o osmunda
+		  osmunda.cpp libgosm.cpp -o osmunda ${XMLLIBS}
 voices:
 		echo '(voice_rab_diphone)' >/tmp/voice_rab_diphone
 		echo 'At the junction, turn left.' | festival_client \

Reply via email to