Bug#656789: scid: FTBFS: fatal error: tcl.h: No such file or directory

2012-01-23 Thread Oliver Korff

Hi Peter,

thank you very much for your patch. With the upgrade to Source format 
3.0 the patch, that added the arch specific library paths, was 
accidentally missed by me.


You understood the problem right away and I am very glad, that you 
helped out with this smart sed solution.


This should work in ubuntu too, shouldn't it?

Thanks again,

Oliver




--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#656789: scid: FTBFS: fatal error: tcl.h: No such file or directory

2012-01-23 Thread peter green




This should work in ubuntu too, shouldn't it?

Which version of ubuntu?

The package as it stands now should support ubuntu oneiric and precise. 
I just tested building scid 4.3.0.cvs20111216-3 from incoming.debian.org 
under ubuntu precise i386 and it built fine


If you want to support ubuntu natty you will need to change the 
versioning of the dpkg-dev build-depends from (= 1.16.0) to (= 
1.16.0~ubuntu4)


If you want to support ubuntu maverick or earlier you will need to drop 
the versioned dpkg-dev dependency and make sure debian/rules sanely 
handles the case where dpkg-architecturedoesn't define 
DEB_HOST_MULTIARCH (i'm not sure what $(shell in a makefile will do in 
that case..






--
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#656789: scid: FTBFS: fatal error: tcl.h: No such file or directory

2012-01-21 Thread Aaron M. Ucko
Source: scid
Version: 4.3.0.cvs20111216-1
Severity: serious
Justification: fails to build from source (but built successfully in the past)

Builds of scid in minimal environments (such as the autobuilders) are
failing:

  g++  -O3 -fno-rtti -fno-exceptions -Wall   -I/usr/include -o src/pgnscid.o -c 
src/pgnscid.cpp
  In file included from src/namebase.h:20:0,
   from src/index.h:23,
   from src/pgnscid.cpp:17:
  src/misc.h:22:17: fatal error: tcl.h: No such file or directory
  compilation terminated.
  make[2]: *** [src/pgnscid.o] Error 1
  make[2]: Leaving directory `/.../scid-4.3.0.cvs20111216'
  make[1]: *** [override_dh_auto_build] Error 2
  make[1]: Leaving directory `/.../scid-4.3.0.cvs20111216'
  make: *** [build] Error 2

Could you please add a build dependency on libtcl-dev and check (via
pbuilder or the like) that no others are missing?

Thanks!



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#656789: scid: FTBFS: fatal error: tcl.h: No such file or directory

2012-01-21 Thread Aaron M. Ucko
Aaron M. Ucko u...@debian.org writes:

 Builds of scid in minimal environments (such as the autobuilders) are
 failing:

   g++  -O3 -fno-rtti -fno-exceptions -Wall   -I/usr/include -o src/pgnscid.o 
 -c src/pgnscid.cpp
   In file included from src/namebase.h:20:0,
from src/index.h:23,
from src/pgnscid.cpp:17:
   src/misc.h:22:17: fatal error: tcl.h: No such file or directory
   compilation terminated.
   make[2]: *** [src/pgnscid.o] Error 1
   make[2]: Leaving directory `/.../scid-4.3.0.cvs20111216'
   make[1]: *** [override_dh_auto_build] Error 2
   make[1]: Leaving directory `/.../scid-4.3.0.cvs20111216'
   make: *** [build] Error 2

 Could you please add a build dependency on libtcl-dev and check (via
 pbuilder or the like) that no others are missing?

tcl-dev, rather.

 Thanks!

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#656789: scid: FTBFS: fatal error: tcl.h: No such file or directory

2012-01-21 Thread peter green

tags 656789 +patch
thanks


Builds of scid in minimal environments (such as the autobuilders) are
failing:


The package already build-depends on tcl8.5-dev and it built fine when I tried 
it in my pbuilder just now.


Taking another look at the failed build log on i386 I saw the following.


configure: Makefile configuration program for Scid
   Tcl/Tk version: 8.5
   Your operating system is: Linux 2.6.32-5-686-bigmem
   Location of tcl.h: /usr/include/tcl8.5
   Location of tk.h: /usr/include/tcl8.5
   Location of Tcl 8.5 library: /usr/lib
   Location of Tk 8.5 library: /usr/lib
   Location of X11 library: not found
   Checking if your system already has zlib installed: yes.
   Using Makefile.conf.
Not all settings could be determined!
The default Makefile was written.
You will need to edit it before you can compile Scid.


While the last successful i386 build said


configure: Makefile configuration program for Scid
   Renaming Makefile to Makefile.bak
   Tcl/Tk version: 8.5
   Your operating system is: Linux 2.6.32-5-686-bigmem
   Location of tcl.h: /usr/include/tcl8.5
   Location of tk.h: /usr/include/tcl8.5
   Location of Tcl 8.5 library: /usr/lib
   Location of Tk 8.5 library: /usr/lib
   Location of X11 library: /usr/lib/i386-linux-gnu
   Checking if your system already has zlib installed: yes.
   Using Makefile.conf.
The Makefile configured for your system was written.
Now just type make to compile Scid.


So it looks like the real problem is nothing to do with the build-depends* but 
rather a problem in the configure script.


libx11-dev is pulled in indirectly by tk8.5-dev. Since the configure script is 
looking for it explicitly, there should probablly be a direct build-dependency
but it IS getting installed in the autobuild environment so the main question 
is why isn't the configure script detecting it?


So I decided to try the build in my (dirty) i386 chroot and was able to 
reproduce the failure there. YAY


So I added some debug code to configure and got

x11Path=
   /usr/lib
   /usr/X11/lib
   /usr/X11R6/lib
   /usr/local/X11/lib
   /usr/local/X11R6/lib
   /usr/X/lib
   /usr/local/X/lib
   /usr/openwin/lib
   /usr/lib/x86_64-linux-gnu

Looking further reveals that list was hardcoded in configure.

Next I decided to take a look back at the version of the package in testing. 
It seems the version in testing had a list of all multiarch dirs debian uses 
in x11path while the version in unstable only has x86_64-linux-gnu. Looking 
at the current package it seems these directories got lost during patch 
conversions and/or the import of the new upstream version.


It would be possible to simply restore the list. However I think hardcoding 
a list of all multiarch dirs is a bad idea for two reasons. Firstly at some 
point in the future more ports will likely come along which won't be in the 
list. Secondly it raises the possibility of the wrong  directory being 
selected (after all the whole point of multiarch is to allow  multiple 
architecture versions of the same package to be installed).


So i decided to take a different approach, rather than patch the configure
script with a fixed list of paths I simply substitute the correct multiarch 
path into the configure script using sed in debian/rules.


Patch is attatched which adds the sed code to debian/rules and also adds
a build-dependency on libx11-dev (as mentioned above) and 
dpkg-dev (= 1.16.0) (for DEB_HOST_MULTIARCH).






diff -ur scid-4.3.0.cvs20111216/debian/control scid-4.3.0.cvs20111216.new/debian/control
--- scid-4.3.0.cvs20111216/debian/control	2012-01-20 22:53:31.0 +
+++ scid-4.3.0.cvs20111216.new/debian/control	2012-01-22 01:15:26.0 +
@@ -3,7 +3,7 @@
 Priority: extra
 Maintainer: Oliver Korff o...@xynyx.de
 Homepage: http://scid.sf.net
-Build-Depends: debhelper (= 7.0.50~), tcl8.5-dev, tk8.5-dev, zlib1g-dev
+Build-Depends: debhelper (= 7.0.50~), tcl8.5-dev, tk8.5-dev, zlib1g-dev, libx11-dev, dpkg-dev (= 1.16.0)
 Standards-Version: 3.9.2
 
 Package: scid
diff -ur scid-4.3.0.cvs20111216/debian/rules scid-4.3.0.cvs20111216.new/debian/rules
--- scid-4.3.0.cvs20111216/debian/rules	2012-01-20 22:44:56.0 +
+++ scid-4.3.0.cvs20111216.new/debian/rules	2012-01-22 01:19:25.0 +
@@ -16,8 +16,12 @@
 %:
 	dh $@ --sourcedirectory=src 
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
 override_dh_auto_configure:
-	./configure BINDIR=$(CURDIR)/debian/scid/usr/games \
+	sed s/x86_64-linux-gnu/$(DEB_HOST_MULTIARCH)/ configure  configure.sed
+	chmod 755 configure.sed
+	./configure.sed BINDIR=$(CURDIR)/debian/scid/usr/games \
 SHAREDIR=$(CURDIR)/debian/scid/usr/share/scid TB=
 
 override_dh_auto_install:
@@ -32,6 +36,7 @@
 	[ ! -f Makefile ] || $(MAKE) clean
 	rm -f config.sub config.guess Makefile
 	dh_clean
+	rm -f configure.sed
 
 override_dh_auto_build:
 	$(MAKE) all_scid