[Debian-med-packaging] Bug#787746: Bug#777791: ball: ftbfs with GCC-5

Andreas Tille tille at debian.org
Thu Jul 9 14:44:23 UTC 2015


Hi Doko,

thanks for your help on ball

    Andreas. 

On Thu, Jul 09, 2015 at 02:59:48PM +0200, Matthias Klose wrote:
> Control: tags -1 + help
> 
> there is more than one issue involved. I'm now uploading a partial fix,
> including the NMU proposed and agreed in #787746.
> 
> The build now fails with some boost error seen in 1.57. Maybe others could have
> a look how to proceed.
> 

> diff -Nru ball-1.4.2+20140406/debian/changelog ball-1.4.2+20140406/debian/changelog
> --- ball-1.4.2+20140406/debian/changelog	2014-04-10 15:28:05.000000000 +0200
> +++ ball-1.4.2+20140406/debian/changelog	2015-07-09 13:28:01.000000000 +0200
> @@ -1,3 +1,19 @@
> +ball (1.4.2+20140406-1.1) unstable; urgency=medium
> +
> +  [ Lisandro Damián Nicanor Pérez Meyer ]
> +  * Non-maintainer upload.
> +  * Remove qt4-related non-development build dependencies (Closes: #787746).
> +  * Force linking against libX11 with link_against_x11.patch. It seems that
> +    now we require to manually explicit it.
> +  * Add findsip.patch by Dmitry Shachnev to fix sip library detection.
> +
> +  [ Matthias Klose ]
> +  * Fix some build errors with GCC 5 and clang++. Closes: #755225.
> +    Addresses #777791.
> +  * Build using dh-python. Closes: #785941.
> +
> + -- Matthias Klose <doko at debian.org>  Thu, 09 Jul 2015 12:17:06 +0200
> +
>  ball (1.4.2+20140406-1) unstable; urgency=medium
>  
>    * New upstream version (upstream reported better compatibility
> diff -Nru ball-1.4.2+20140406/debian/control ball-1.4.2+20140406/debian/control
> --- ball-1.4.2+20140406/debian/control	2014-04-13 21:41:59.000000000 +0200
> +++ ball-1.4.2+20140406/debian/control	2015-07-09 12:18:22.000000000 +0200
> @@ -8,11 +8,7 @@
>  Build-Depends: debhelper (>= 9),
>                 qt4-dev-tools,
>                 libqt4-dev,
> -               libqt4-gui,
> -               libqt4-opengl,
>                 libqt4-opengl-dev,
> -               libqt4-sql,
> -               libqt4-network,
>                 python-sip-dev,
>                 flex,
>                 bison,
> @@ -32,9 +28,10 @@
>                 libboost-regex-dev,
>                 libxmu-dev,
>                 libglew-dev,
> +               libx11-dev,
>                 tidy,
>                 chrpath,
> -               python-support,
> +	       dh-python,
>                 libqt4-dev-bin
>  Build-Depends-Indep: doxygen,
>                       graphviz,
> diff -Nru ball-1.4.2+20140406/debian/patches/findsip.patch ball-1.4.2+20140406/debian/patches/findsip.patch
> --- ball-1.4.2+20140406/debian/patches/findsip.patch	1970-01-01 01:00:00.000000000 +0100
> +++ ball-1.4.2+20140406/debian/patches/findsip.patch	2015-07-09 12:15:12.000000000 +0200
> @@ -0,0 +1,70 @@
> +Description: fix sip library detection
> + The old algorithm used hard-coded library names and thus could not
> + detect our multi-arched name.
> + .
> + Instead of that, just import sip from Python script and use the
> + __file__ property to find the library.
> +Author: Dmitry Shachnev <mitya57 at debian.org>
> +Forwarded: no
> +Last-Update: 2015-06-13
> +
> +--- a/cmake/FindSIP.cmake
> ++++ b/cmake/FindSIP.cmake
> +@@ -69,6 +69,7 @@ ELSE(SIP_VERSION)
> + 			STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_EXECUTABLE ${sip_config})
> + 			STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config})
> + 			STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config})
> ++			STRING(REGEX REPLACE ".*\nsip_library:([^\n]+).*$" "\\1" SIP_LIBRARIES ${sip_config})
> + 			SET(SIP_FOUND TRUE)
> + 		ENDIF(sip_config)
> + 
> +@@ -100,12 +101,6 @@ IF(NOT SIP_VERSION)
> + 
> + 	SET(OLD_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}" CACHE INTERNAL "")
> + 	SET(CMAKE_FIND_LIBRARY_PREFIXES "")
> +-  FIND_LIBRARY(SIP_LIBRARIES
> +-    NAMES sip libsip
> +-    PATHS ${SIP_POSSIBLE_LIB_DIRS} ${PYTHON_SITE_PACKAGES}
> +-    PATH_SUFFIXES lib dlls
> +-    DOC "SIP module")
> +-	SET(CMAKE_FIND_LIBRARY_PREFIXES "${OLD_CMAKE_FIND_LIBRARY_PREFIXES}")
> + 
> +   # (c) Try to find the sip executable:
> +   
> +@@ -134,27 +129,6 @@ IF(NOT SIP_VERSION)
> +   STRING(REGEX REPLACE "define SIP_VERSION_STR[ \t]+\"([^\"]*)\""  "\\1" SIP_VERSION_STR "${SIP_VERSION_STR}")
> + ENDIF(NOT SIP_VERSION)
> + 
> +-IF(NOT SIP_LIBRARIES)
> +-  # Try to find the sip library:
> +-	EXECUTE_PROCESS ( COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
> +-		OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
> +-		OUTPUT_STRIP_TRAILING_WHITESPACE
> +-	)
> +-
> +-  # Use the path to the python installation as a hint for finding sip
> +-  GET_FILENAME_COMPONENT(SIP_POSSIBLE_LIB_DIRS "${PYTHON_LIBRARIES}"  PATH)
> +-	LIST(APPEND SIP_POSSIBLE_LIB_DIRS "/usr/lib/pyshared/python${PYTHON_VERSION}")
> +-
> +-	SET(OLD_CMAKE_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}" CACHE INTERNAL "")
> +-	SET(CMAKE_FIND_LIBRARY_PREFIXES "")
> +-  FIND_LIBRARY(SIP_LIBRARIES
> +-    NAMES sip libsip
> +-    PATHS ${SIP_POSSIBLE_LIB_DIRS} ${PYTHON_SITE_PACKAGES}
> +-    PATH_SUFFIXES lib dlls
> +-    DOC "SIP module")
> +-	SET(CMAKE_FIND_LIBRARY_PREFIXES "${OLD_CMAKE_FIND_LIBRARY_PREFIXES}")
> +-ENDIF()
> +-
> + INCLUDE(FindPackageHandleStandardArgs)
> + FIND_PACKAGE_HANDLE_STANDARD_ARGS(SIP DEFAULT_MSG
> + 	SIP_EXECUTABLE
> +--- a/cmake/FindSIP.py
> ++++ b/cmake/FindSIP.py
> +@@ -13,3 +13,6 @@ print("sip_version_str:%s" % sipcfg.sip_
> + print("sip_bin:%s" % sipcfg.sip_bin)
> + print("default_sip_dir:%s" % sipcfg.default_sip_dir)
> + print("sip_inc_dir:%s" % sipcfg.sip_inc_dir)
> ++
> ++import sip
> ++print("sip_library:%s" % sip.__file__)
> diff -Nru ball-1.4.2+20140406/debian/patches/gcc5.diff ball-1.4.2+20140406/debian/patches/gcc5.diff
> --- ball-1.4.2+20140406/debian/patches/gcc5.diff	1970-01-01 01:00:00.000000000 +0100
> +++ ball-1.4.2+20140406/debian/patches/gcc5.diff	2015-07-09 13:26:08.000000000 +0200
> @@ -0,0 +1,69 @@
> +--- a/include/BALL/DATATYPE/string.h	2013-03-07 21:15:10.000000000 +0400
> ++++ b/include/BALL/DATATYPE/string.h	2014-07-31 02:12:03.770913795 +0400
> +@@ -47,6 +47,9 @@
> + {
> + 	// forward declaration
> + 	class Substring;
> ++    class String;
> ++    BALL_EXPORT
> ++	std::istream& getline(std::istream& s,  String& string,  char delimiter = '\n');
> + 
> + 	/**	\defgroup String String
> + 			An improved version of STL string.
> +@@ -998,7 +1001,7 @@
> + 
> + 		///
> + 		BALL_EXPORT
> +-		friend std::istream& getline(std::istream& s,  String& string,  char delimiter = '\n');
> ++		friend std::istream& getline(std::istream& s,  String& string,  char delimiter);
> + 
> + 		//@}
> + 
> +--- a/source/FORMAT/molFileFactory.C
> ++++ b/source/FORMAT/molFileFactory.C
> +@@ -39,7 +39,7 @@
> + 			try
> + 			{
> + 				string s;
> +-				ok = std::getline(in,s);
> ++				if (std::getline(in,s)) ok = true;
> + 			}
> + 			catch (const boost::iostreams::gzip_error& e)
> + 			{
> +--- a/source/STRUCTURE/binaryFingerprintMethods.C
> ++++ b/source/STRUCTURE/binaryFingerprintMethods.C
> +@@ -10,7 +10,7 @@
> + #include <BALL/SYSTEM/timer.h>
> + 
> + #include <boost/foreach.hpp>
> +-
> ++#include <boost/unordered_map.hpp>
> + 
> + using namespace std;
> + using namespace boost;
> +@@ -1604,13 +1604,13 @@ bool BinaryFingerprintMethods::connectedComponents(const vector<unsigned int>& s
> + 	{
> + 		
> + 		// STEP 1: Get connected components and member indices
> +-		unordered_map<unsigned int, unordered_map<unsigned int, unsigned int> > ccs_tmp;
> +-		unordered_map<unsigned int, unordered_map<unsigned int, unsigned int> >::iterator ccs_iter;
> ++		boost::unordered_map<unsigned int, boost::unordered_map<unsigned int, unsigned int> > ccs_tmp;
> ++		boost::unordered_map<unsigned int, boost::unordered_map<unsigned int, unsigned int> >::iterator ccs_iter;
> + 		BOOST_FOREACH(Vertex current_vertex, vertices(sim_graph))
> + 		{
> + 			if (ccs_tmp.find(ds->find_set(current_vertex)) == ccs_tmp.end())
> + 			{
> +-				ccs_tmp[ds->find_set(current_vertex)] = unordered_map<unsigned int, unsigned int>();
> ++				ccs_tmp[ds->find_set(current_vertex)] = boost::unordered_map<unsigned int, unsigned int>();
> + 			}
> + 			
> + // 			ccs_tmp[ds->find_set(current_vertex)][current_vertex] = ccs_tmp[ds->find_set(current_vertex)].size();
> +@@ -1628,7 +1628,7 @@ bool BinaryFingerprintMethods::connectedComponents(const vector<unsigned int>& s
> + 		}
> + 		
> + 		// STEP 3: Write information in return data structures
> +-		unordered_map<unsigned int, unsigned int>::iterator cc_iter;
> ++		boost::unordered_map<unsigned int, unsigned int>::iterator cc_iter;
> + 		for (size_iter=cc_sizes.begin(); size_iter!=cc_sizes.end(); ++size_iter)
> + 		{
> + 			ccs.push_back(vector<unsigned int>(size_iter->first, 0));
> diff -Nru ball-1.4.2+20140406/debian/patches/link_against_x11.patch ball-1.4.2+20140406/debian/patches/link_against_x11.patch
> --- ball-1.4.2+20140406/debian/patches/link_against_x11.patch	1970-01-01 01:00:00.000000000 +0100
> +++ ball-1.4.2+20140406/debian/patches/link_against_x11.patch	2015-07-09 12:15:12.000000000 +0200
> @@ -0,0 +1,18 @@
> +Description: Link against libx11
> + Something has changed since Jessie and now we need to explicitely link
> + against X11.
> +Author: Lisandro Damián Nicanor Pérez Meyer <lisandro at debian.org>
> +Forwarded: no
> +Last-Update: 2015-06-05.
> +
> +--- ball-1.4.2+20140406.orig/CMakeLists.txt
> ++++ ball-1.4.2+20140406/CMakeLists.txt
> +@@ -550,7 +550,7 @@ TARGET_LINK_LIBRARIES(BALL ${BALL_DEP_LI
> +                            ${QT_QTCORE_LIBRARY}
> +                            ${QT_QTSQL_LIBRARY}
> +                            ${QT_QTNETWORK_LIBRARY}
> +-                           ${QT_QTXML_LIBRARY})
> ++                           ${QT_QTXML_LIBRARY} -lX11)
> + 
> + 
> + IF(BALL_HAS_VIEW)
> diff -Nru ball-1.4.2+20140406/debian/patches/series ball-1.4.2+20140406/debian/patches/series
> --- ball-1.4.2+20140406/debian/patches/series	2014-04-10 15:28:05.000000000 +0200
> +++ ball-1.4.2+20140406/debian/patches/series	2015-07-09 12:23:36.000000000 +0200
> @@ -7,3 +7,6 @@
>  0103-QT4_EXTRACT_OPTIONS-CMake-macro-changed-in-CMake-2.8.patch
>  nopsboxit.patch
>  HelpSipAmbiguity.patch
> +link_against_x11.patch
> +findsip.patch
> +gcc5.diff
> diff -Nru ball-1.4.2+20140406/debian/rules ball-1.4.2+20140406/debian/rules
> --- ball-1.4.2+20140406/debian/rules	2014-04-11 14:03:12.000000000 +0200
> +++ ball-1.4.2+20140406/debian/rules	2015-07-09 14:22:24.000000000 +0200
> @@ -141,7 +141,7 @@
>  	chrpath -d debian/ballview/usr/bin/BALLView
>  	find debian -name "*.so" | xargs -r chrpath -d 
>  
> -	dh_pysupport -s
> +	dh_python2 -s
>  	dh_sip -s
>  
>  install-indep: build-indep
> @@ -178,7 +178,7 @@
>  	#ln -s ${LIBBALL_TARGET} libball$(SOVERSION)-dev/usr/lib/libBALL.so
>  	#ln -s ${LIBVIEW_TARGET} libballview$(SOVERSION)-dev/usr/lib/libVIEW.so
>  
> -	dh_pysupport -i
> +	dh_python2 -i
>  	dh_sip -i
>  
>  
> @@ -190,7 +190,6 @@
>  	dh_installexamples
>  	dh_install
>  	dh_installmenu
> -#	dh_python
>  	dh_installman
>  	dh_link
>  	dh_strip --dbg-package=ballview-dbg

> _______________________________________________
> Debian-med-packaging mailing list
> Debian-med-packaging at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging


-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list