Bug#725143: unbuildable on some archs

2013-10-18 Thread Rebecca N. Palmer
I don't have any of the affected architectures (hence why it took so 
many attempts to get right); my concern has always been only that the 
strict partial-removal policy (cf. #723770, #724678) would make it hard 
for your reverse dependencies to switch from an any-arch 1.8 to a 
non-any-arch 1.9, and it hence isn't an urgent problem if you don't want 
to transition yet.



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



Bug#725143: unbuildable on some archs

2013-10-17 Thread Rebecca N. Palmer

Control: reopen -1

Looks like upstream forgot that OGRE_GCC_VERSION (the CMake variable) is 
just the version, not multiplied by 100 like OGRE_COMP_VER (the C 
macro), so libatomic never gets enabled.  Fix attached.
Fix version check for enabling libatomic: OGRE_COMP_VER (C macro) is multiplied by 100, OGRE_GCC_VERSION (CMake variable) isn't.
$ diff -up OgreMain/CMakeLists.txt_orig OgreMain/CMakeLists.txt
--- OgreMain/CMakeLists.txt_orig	2013-10-16 15:32:31.0 +0100
+++ OgreMain/CMakeLists.txt	2013-10-17 08:05:37.285790478 +0100
@@ -289,7 +289,7 @@ else()
   set_target_properties(OgreMain PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
 endif()
 
-if(OGRE_GCC_VERSION GREATER 470)
+if(OGRE_GCC_VERSION VERSION_GREATER 4.7)#-dumpversion doesn't include the patch level, so this requires = 4.8
   list(APPEND LIBRARIES -latomic)
 endif()
 


Bug#725143: unbuildable on some archs

2013-10-17 Thread Rebecca N. Palmer
Also, your (debian/rules) gcc version check is the wrong way round, and 
the buildds always use the first alternative build-dep (failing if it 
doesn't exist) unless you use an explicit architecture tag 
(http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614807); fix attached.
Buildds always take the first dependency that isn't _explicitly_ marked as not for their architecture: the build will fail if the first alternative doesn't exist, even if one of the others does. (Example: https://buildd.debian.org/status/fetch.php?pkg=visparch=powerpcver=2.8.0-3stamp=1380322503)
$ diff -up debian/control_orig debian/control
--- debian/control_orig	2013-10-17 17:37:14.876687413 +0100
+++ debian/control	2013-10-17 17:37:03.016687763 +0100
@@ -10,7 +10,7 @@ Vcs-Git: git://anonscm.debian.org/pkg-ga
 Build-Depends: debhelper (= 9~),
dpkg-dev (= 1.16.1~),
cmake (= 2.8.0),
-   g++ (= 4:4.8.0) | g++-4.8,
+   g++-4.8 [powerpc sparc] | g++ (= 4:4.8.0) [mips mipsel powerpc sparc],
pkg-config,
libboost1.54-dev,
libboost-atomic1.54-dev,
Make the gcc version check the right way round (ifneq (,$(findstring means if nonempty, i.e. if the string _is_ found), accept future versions, and only do it on architectures that require it.
$ diff -up debian/rules_orig debian/rules
--- debian/rules_orig	2013-10-17 17:38:26.724685290 +0100
+++ debian/rules	2013-10-17 18:15:26.360619707 +0100
@@ -22,12 +22,13 @@ endif
 
 # see #725143, some architectures fail to build because they lack
 # __sync_fetch_and_add_8, need to link with libatomic (since ~rc2 done
-# upstrema) and depend on the version provided by GCC = 4.8
-ifneq (,$(findstring $(shell g++ --version),4.8))
+# upstream) and depend on the version provided by GCC = 4.8
+ifneq (,$(findstring $(DEB_HOST_ARCH) , mips mipsel powerpc sparc ))
+ifneq (,$(findstring $(shell dpkg --compare-versions `g++ -dumpversion` ge 4.8 || echo old),old))
 export CXX := g++-4.8
 export CC  := gcc-4.8
 endif
-
+endif
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 


Bug#725143: unbuildable on some archs

2013-10-17 Thread Manuel A. Fernandez Montecelo
2013/10/17 Rebecca N. Palmer r.pal...@bham.ac.uk:
 Also, your (debian/rules) gcc version check is the wrong way round, and the
 buildds always use the first alternative build-dep (failing if it doesn't
 exist) unless you use an explicit architecture tag
 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614807); fix attached.

Patch forwarded upstream, thanks:
https://ogre3d.atlassian.net/browse/OGRE-313

As I said before, I don't think that it's useful to spend so much time
on pre-release versions and architectures badly supported and
stumbling on special cases several times during the process, when
probably nobody uses this package in these architectures.  If you (or
somebody else reading) has a personal interest in having this package
in these architectures immediately, please speak up.

Surely GCC 4.8 (and possibly 4.9) will be the default in Jessie
anyway, now that it's known that it'll be frozen only more than a year
for now, so I think that it's better to remove all of these special
cases altogether.

I will not commit more changes immediately, I will wait until they
finally release 1.9.0 (they said that it would take about a month).


Cheers.
-- 
Manuel A. Fernandez Montecelo manuel.montez...@gmail.com


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



Bug#725143: unbuildable on some archs

2013-10-01 Thread Rebecca N. Palmer

Source: ogre-1.9
Tags: patch

Using __sync_fetch_and_add_8 on architectures without native support 
requires the libatomic library 
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56300), which is part of 
GCC 4.8+.


The attached patch links against this library and forces compilation 
with gcc/g++ 4.8.  It also disables --as-needed on ia64 to work around 
bug #718047.


This should fix everything except armhf (crashing make, which is a bug 
there not here), but has not been tested.
$ diff -up rules_orig rules
--- rules_orig	2013-10-01 20:30:06.846713326 +0100
+++ rules	2013-10-01 20:52:56.234672865 +0100
@@ -15,8 +15,13 @@ export DEB_BUILD_MAINT_OPTIONS   := hard
 dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) dpkg-buildflags
 export DEB_CFLAGS_MAINT_APPEND   := -pipe -Wall $(shell $(dpkg_buildflags) --get CPPFLAGS)
 export DEB_CXXFLAGS_MAINT_APPEND := -pipe -Wall $(shell $(dpkg_buildflags) --get CPPFLAGS)
-export DEB_LDFLAGS_MAINT_APPEND  := -Wl,-z,defs -Wl,--as-needed
-
+# -latomic for __sync_fetch_and_add_8
+# disable -Wl,--as-needed on ia64 due to bug #718047
+ifeq($(DEB_HOST_ARCH),ia64)
+export DEB_LDFLAGS_MAINT_APPEND  := -Wl,-z,defs -latomic
+else
+export DEB_LDFLAGS_MAINT_APPEND  := -Wl,-z,defs -Wl,--as-needed -latomic
+endif
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
@@ -47,7 +52,8 @@ override_dh_auto_configure:
 		-DOGRE_INSTALL_DOCS:BOOL=TRUE \
 		-DOGRE_BUILD_SAMPLES:BOOL=FALSE \
 		-DOGRE_INSTALL_SAMPLES:BOOL=FALSE \
-		-DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=FALSE
+		-DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=FALSE \
+		-DCMAKE_C_COMPILER=gcc-4.8 -DCMAKE_CXX_COMPILER=g++-4.8
 
 override_dh_install:
 # Copy files from template for this particular version
$ diff -up control_orig control
--- control_orig	2013-10-01 21:00:50.306658858 +0100
+++ control	2013-10-01 21:02:02.410656727 +0100
@@ -28,7 +28,8 @@ Build-Depends: debhelper (= 9~),
libxaw7-dev,
libxt-dev,
libois-dev [linux-any],
-   chrpath
+   chrpath,
+   g++-4.8
 
 Package: libogre-1.9-dev
 Section: libdevel