Bug#617465: Package alex4_1.1-3 failed to build from source on Ubuntu natty

2011-03-09 Thread Peter Pentchev
On Wed, Mar 09, 2011 at 07:27:10PM +0200, Peter Pentchev wrote:
 On Wed, Mar 09, 2011 at 10:28:56AM +0530, Tarun Kumar Mall wrote:
  Package: alex4
  Version: 1.1-3
  Severity: normal
  Tags: patch
  User: ubuntu-de...@lists.ubuntu.com
  Usertags: origin-ubuntu natty ubuntu-patch
  
  Package failed to build from source.
  Here is the error log.
  
  Binary package hint: alex4
  
  cc `allegro-config --libs` -laldmb -ldumb -o alex4 actor.o edit.o map.o 
  player.o shooter.o unix.o bullet.o hisc.o options.o script.o timer.o 
  control.o main.o particle.o scroller.o token.o
 [snip lots of linker errors because of badly ordered linker command line]
  collect2: ld returned 1 exit status
  make[1]: *** [alex4] Error 1
  make[1]: Leaving directory `/home/tarun/source/alex4/alex4-1.1/src'
  make: *** [build-arch-stamp] Error 2
  dpkg-buildpackage: error: debian/rules build gave error exit status 2
  debuild: fatal error at line 1335:
  dpkg-buildpackage -rfakeroot -D -us -uc failed
  
  *** /tmp/tmpdOEglw
  In Ubuntu, we've applied the attached patch to achieve the following:
  
* debian/patches/fix_ftbfs_binutils-gold.patch: changed the order of
  libraries in order to fix FTBFS. (LP: #730653) 
  
  We thought you might be interested in doing the same. 
 
 Tarun, thanka (again - after the same discussion about dma ;) for the bug
 report and the proposed patch!
 
 Peter, what do you think about the attached series of patches that:
 
 1. in the very first patch, fixes this problem (although it does not
cause an FTBFS in Debian, it's still a good idea to clean up
the code - after all, the Unix linker has been documented to work
this way for ages, even though, apparently, GNU ld is a bit lenient)
 
 2. in all the rest of the patches, refreshes the alex4 Debian packaging
a whole lot - 3.0 (quilt), debhelper 8, Policy 3.9.1,
dpkg-buildflags, etc.
 
 If you have no objections, I could commit those patches to the Debian
 Games Subversion repository; of course, as the principal maintainer of
 alex4, it's your call to like or not like some or all of them :)
 
 Thanks to both of you for trying to make the world a better place by
 working on Debian and Ubuntu :)

And here's another patch that makes alex4 *not* FTBFS on unstable with
all the warning options that I've turned on and the -Werror that I always
test with :)

G'luck,
Peter

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org pe...@packetscale.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
What would this sentence be like if it weren't self-referential?
From e7a11784e9a0fbb82fd628d2363c6eaa4bcec1bd Mon Sep 17 00:00:00 2001
From: Peter Pentchev r...@ringlet.net
Date: Wed, 9 Mar 2011 19:50:56 +0200
Subject: [PATCH 16/16] Fix an undefined order of operations problem.

---
 debian/patches/hardening.patch |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/debian/patches/hardening.patch b/debian/patches/hardening.patch
index eb8fb9c..a392eaa 100644
--- a/debian/patches/hardening.patch
+++ b/debian/patches/hardening.patch
@@ -1,6 +1,7 @@
 Description: Harden the build.
  - check the fread() and fwrite() return values
  - swap a return and an fclose()
+ - fix an undefined order of operations problem
 Forwarded: no
 Author: Peter Pentchev r...@ringlet.net
 Last-Update: 2011-03-07
@@ -152,3 +153,15 @@ Last-Update: 2011-03-07
  
  	// close file
  	fclose(fp);
+--- a/src/shooter.c
 b/src/shooter.c
+@@ -903,7 +903,8 @@
+ 	s_var.score += 100;
+ }
+ else {  // increase power
+-	s_var.power_level = MIN(s_var.power_level ++, 7);
++	if (++s_var.power_level  7)
++		s_var.power_level = 7;
+ }
+ play_sound_id(SMPL_HEART);	
+ 
-- 
1.7.2.3



signature.asc
Description: Digital signature


Bug#617465: Package alex4_1.1-3 failed to build from source on Ubuntu natty

2011-03-09 Thread Peter Pentchev
package alex4
tag 617465 + pending
thanks

On Wed, Mar 09, 2011 at 07:53:19PM +0200, Peter Pentchev wrote:
 On Wed, Mar 09, 2011 at 07:27:10PM +0200, Peter Pentchev wrote:
  On Wed, Mar 09, 2011 at 10:28:56AM +0530, Tarun Kumar Mall wrote:
   Package: alex4
   Version: 1.1-3
   Severity: normal
   Tags: patch
   User: ubuntu-de...@lists.ubuntu.com
   Usertags: origin-ubuntu natty ubuntu-patch
   
   Package failed to build from source.
   Here is the error log.
   
   Binary package hint: alex4
   
   cc `allegro-config --libs` -laldmb -ldumb -o alex4 actor.o edit.o map.o 
   player.o shooter.o unix.o bullet.o hisc.o options.o script.o timer.o 
   control.o main.o particle.o scroller.o token.o
  [snip lots of linker errors because of badly ordered linker command line]
   collect2: ld returned 1 exit status
   make[1]: *** [alex4] Error 1
   make[1]: Leaving directory `/home/tarun/source/alex4/alex4-1.1/src'
   make: *** [build-arch-stamp] Error 2
   dpkg-buildpackage: error: debian/rules build gave error exit status 2
   debuild: fatal error at line 1335:
   dpkg-buildpackage -rfakeroot -D -us -uc failed
   
   *** /tmp/tmpdOEglw
   In Ubuntu, we've applied the attached patch to achieve the following:
   
 * debian/patches/fix_ftbfs_binutils-gold.patch: changed the order of
   libraries in order to fix FTBFS. (LP: #730653) 
   
   We thought you might be interested in doing the same. 
  
  Tarun, thanka (again - after the same discussion about dma ;) for the bug
  report and the proposed patch!
  
  Peter, what do you think about the attached series of patches that:
  
  1. in the very first patch, fixes this problem (although it does not
 cause an FTBFS in Debian, it's still a good idea to clean up
 the code - after all, the Unix linker has been documented to work
 this way for ages, even though, apparently, GNU ld is a bit lenient)
  
  2. in all the rest of the patches, refreshes the alex4 Debian packaging
 a whole lot - 3.0 (quilt), debhelper 8, Policy 3.9.1,
 dpkg-buildflags, etc.
  
  If you have no objections, I could commit those patches to the Debian
  Games Subversion repository; of course, as the principal maintainer of
  alex4, it's your call to like or not like some or all of them :)
  
  Thanks to both of you for trying to make the world a better place by
  working on Debian and Ubuntu :)
 
 And here's another patch that makes alex4 *not* FTBFS on unstable with
 all the warning options that I've turned on and the -Werror that I always
 test with :)

After an approval from Peter de Wachter via private e-mail, I've
committed my patches to the Debian Games Team's Subversion repository,
built the package, uploaded it to mentors.debian.net[0] and put up an
RFS on the Games Team's sponsors queue Wiki page.

Once again, thanks to both of you for your work on alex4.

G'luck,
Peter

[0] http://mentors.debian.net/debian/pool/main/a/alex4/alex4_1.1-4.dsc

-- 
Peter Pentchev  r...@ringlet.net r...@freebsd.org pe...@packetscale.com
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
because I didn't think of a good beginning of it.


signature.asc
Description: Digital signature


Bug#617465: Package alex4_1.1-3 failed to build from source on Ubuntu natty

2011-03-08 Thread Tarun Kumar Mall
Package: alex4
Version: 1.1-3
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu natty ubuntu-patch


Package failed to build from source.
Here is the error log.

Binary package hint: alex4

cc `allegro-config --libs` -laldmb -ldumb -o alex4 actor.o edit.o map.o 
player.o shooter.o unix.o bullet.o hisc.o options.o script.o timer.o control.o 
main.o particle.o scroller.o token.o
edit.o: In function `line':
/usr/include/allegro/inline/draw.inl:72: undefined reference to `gui_fg_color'
/usr/include/allegro/inline/draw.inl:72: undefined reference to `gui_fg_color'
edit.o: In function `rect':
/usr/include/allegro/inline/draw.inl:112: undefined reference to `gui_bg_color'
edit.o: In function `draw_edit_mode':
/home/tarun/source/alex4/alex4-1.1/src/edit.c:72: undefined reference to 
`textprintf_ex'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:73: undefined reference to 
`textprintf_ex'
edit.o: In function `rect':
/usr/include/allegro/inline/draw.inl:112: undefined reference to `gui_bg_color'
edit.o: In function `line':
/usr/include/allegro/inline/draw.inl:72: undefined reference to `gui_bg_color'
edit.o: In function `draw_edit_mode':
/home/tarun/source/alex4/alex4-1.1/src/edit.c:83: undefined reference to 
`get_filename'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:83: undefined reference to 
`textprintf_ex'
edit.o: In function `clear_to_color':
/usr/include/allegro/inline/gfx.inl:96: undefined reference to `gui_bg_color'
edit.o: In function `draw_edit_mode':
/home/tarun/source/alex4/alex4-1.1/src/edit.c:102: undefined reference to 
`gui_bg_color'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:102: undefined reference to 
`gui_fg_color'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:107: undefined reference to 
`get_filename'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:107: undefined reference to 
`textprintf_ex'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:109: undefined reference to 
`textprintf_ex'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:110: undefined reference to 
`textprintf_ex'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:111: undefined reference to 
`textprintf_ex'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:112: undefined reference to 
`textprintf_ex'
edit.o:/home/tarun/source/alex4/alex4-1.1/src/edit.c:113: more undefined 
references to `textprintf_ex' follow
edit.o: In function `update_edit_mode':
/home/tarun/source/alex4/alex4-1.1/src/edit.c:155: undefined reference to 
`keypressed'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:318: undefined reference to `key'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:319: undefined reference to `key'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:322: undefined reference to `key'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:322: undefined reference to `key'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:323: undefined reference to `key'
edit.o:/home/tarun/source/alex4/alex4-1.1/src/edit.c:323: more undefined 
references to `key' follow
edit.o: In function `update_edit_mode':
/home/tarun/source/alex4/alex4-1.1/src/edit.c:339: undefined reference to 
`clear_keybuf'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:340: undefined reference to `key'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:354: undefined reference to 
`mouse_b'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:355: undefined reference to 
`clear_keybuf'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:359: undefined reference to 
`keypressed'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:370: undefined reference to `key'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:372: undefined reference to `key'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:156: undefined reference to 
`readkey'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:176: undefined reference to 
`file_select_ex'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:181: undefined reference to 
`exists'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:208: undefined reference to 
`file_select_ex'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:360: undefined reference to 
`readkey'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:183: undefined reference to 
`get_filename'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:184: undefined reference to 
`alert'
/home/tarun/source/alex4/alex4-1.1/src/edit.c:367: undefined reference to 
`gui_fg_color'
map.o: In function `draw_map':
/home/tarun/source/alex4/alex4-1.1/src/map.c:283: undefined reference to 
`set_clip_rect'
/home/tarun/source/alex4/alex4-1.1/src/map.c:370: undefined reference to 
`gfx_driver'
/home/tarun/source/alex4/alex4-1.1/src/map.c:327: undefined reference to 
`masked_blit'
/home/tarun/source/alex4/alex4-1.1/src/map.c:324: undefined reference to `blit'
/home/tarun/source/alex4/alex4-1.1/src/map.c:339: undefined reference to `font'
/home/tarun/source/alex4/alex4-1.1/src/map.c:339: undefined reference to 
`textout_ex'
/home/tarun/source/alex4/alex4-1.1/src/map.c:336: undefined reference to `font'
/home/tarun/source/alex4/alex4-1.1/src/map.c:336: undefined