[med-svn] [Git][med-team/gatb-core][master] 2 commits: Add -latomic where needed to fix the build on armel, mipsel & powerpc.

Michael R. Crusoe gitlab at salsa.debian.org
Thu Jan 2 15:27:52 GMT 2020



Michael R. Crusoe pushed to branch master at Debian Med / gatb-core


Commits:
f2524ab6 by Michael R. Crusoe at 2020-01-02T15:34:38+01:00
Add -latomic where needed to fix the build on armel, mipsel & powerpc.

- - - - -
a88ca2d3 by Michael R. Crusoe at 2020-01-02T15:47:08+01:00
Avoid -msse2 due to building on qemu

- - - - -


7 changed files:

- debian/changelog
- + debian/patches/avoid_-msse
- debian/patches/fix_install_location.patch
- debian/patches/series
- debian/patches/spelling.patch
- debian/patches/use_debian_packaged_hdf5.patch
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+gatb-core (1.4.1+git20191209.9398f28+dfsg-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * Add -latomic where needed to fix the build on armel, mipsel & powerpc.
+  * new patch to avoid "-msse2" on build hosts that use qemu
+
+ -- Michael R. Crusoe <michael.crusoe at gmail.com>  Thu, 02 Jan 2020 15:33:41 +0100
+
 gatb-core (1.4.1+git20191209.9398f28+dfsg-1) unstable; urgency=medium
 
   * New upstream version


=====================================
debian/patches/avoid_-msse
=====================================
@@ -0,0 +1,51 @@
+Author: Michael R. Crusoe <michael.crusoe at gmail.com>
+Description: Avoid -msse2 due to building on qemu
+--- gatb-core.orig/gatb-core/CMakeLists.txt
++++ gatb-core/gatb-core/CMakeLists.txt
+@@ -121,44 +121,8 @@
+     set (LIBRARY_COMPILE_DEFINITIONS  "${LIBRARY_COMPILE_DEFINITIONS}  -DNONCANONICAL=1")
+ endif()
+ 
+-
+-# detect SSE for popcount 
+-# this was for emphf, maybe it's for something else also? otherwise this part can be removed.
+-#
+-# from https://github.com/rurban/smhasher/blob/master/CMakeLists.txt
+-# i do not see much performance gain for now, but let's keep that code here, might be useful later.
+-# list of performance gain observed:
+-# popcount in Graph::countNeighbors
+-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+-    EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO)
+-    STRING(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE ${CPUINFO})
+-    STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE)
+-    STRING(REGEX REPLACE "^.*(sse4_2).*$" "\\1" SSE_THERE ${CPUINFO})
+-    STRING(COMPARE EQUAL "sse4_2" "${SSE_THERE}" SSE42_TRUE)
+-ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+-    EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
+-        CPUINFO)
+-    STRING(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE ${CPUINFO})
+-    STRING(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE)
+-    STRING(REGEX REPLACE "^.*(SSE4.2).*$" "\\1" SSE_THERE ${CPUINFO})
+-    STRING(COMPARE EQUAL "SSE4.2" "${SSE_THERE}" SSE42_TRUE)
+-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+-IF (SSE2_TRUE)
+-    set(SSE2_FOUND true CACHE BOOL "SSE2 available")
+-ELSE (SSE2_TRUE)
+-    set(SSE2_FOUND false CACHE BOOL "SSE2 not available")
+-ENDIF (SSE2_TRUE)
+-IF (SSE42_TRUE)
+-    set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available")
+-ELSE (SSE42_TRUE)
+-    set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 not available")
+-ENDIF (SSE42_TRUE)
+-# I could use LIBRARY_COMPILE_DEFINITIONS, but it's actually passed to "add_definitions", which isn't made for passing compilation flags, only -D ones.
+-IF(SSE4_2_FOUND AND (NOT NO_SSE))
+-    set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -msse2 -msse4.2 -mpopcnt")
+-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -msse4.2 -mpopcnt")
+-    message ("-- SSE 4.2 detected")
+-ENDIF()
++set(SSE2_FOUND false CACHE BOOL "SSE2 not available")
++set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 not available")
+ 
+ # WARNING !!! For the moment, we need to remove some warnings (on Macos) due to use of offsetof macro on non Plain Old Data
+ set (LIBRARY_COMPILE_DEFINITIONS "${LIBRARY_COMPILE_DEFINITIONS} -Wno-invalid-offsetof") 


=====================================
debian/patches/fix_install_location.patch
=====================================
@@ -2,9 +2,9 @@ Author: Andreas Tille <tille at debian.org>
 Last-Update: Tue, 28 Nov 2017 10:37:22 +0100
 Description: Install examples into correct dir
 
---- a/gatb-core/CMakeLists.txt
-+++ b/gatb-core/CMakeLists.txt
-@@ -283,7 +283,7 @@ ENDIF()
+--- gatb-core.orig/gatb-core/CMakeLists.txt
++++ gatb-core/gatb-core/CMakeLists.txt
+@@ -281,7 +281,7 @@
  
  IF (NOT DEFINED GATB_CORE_EXCLUDE_EXAMPLES)
      # add example snippets into binary archive (use by CPack directive)
@@ -13,7 +13,7 @@ Description: Install examples into correct dir
  ENDIF()
  
  ################################################################################
-@@ -291,9 +291,10 @@ ENDIF()
+@@ -289,9 +289,10 @@
  ################################################################################
  
  IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)


=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@ set_soversion.patch
 dynamic_linking_of_tools.patch
 multiarch.patch
 spelling.patch
+avoid_-msse


=====================================
debian/patches/spelling.patch
=====================================
@@ -2,9 +2,9 @@ Author: Andreas Tille <tille at debian.org>
 Last-Update: Tue, 28 Nov 2017 10:37:22 +0100
 Description: Fix spelling issues
 
---- a/gatb-core/src/gatb/tools/compression/DnaCoder.cpp
-+++ b/gatb-core/src/gatb/tools/compression/DnaCoder.cpp
-@@ -650,7 +650,7 @@ void DnaEncoder::encodeAnchorRead(int an
+--- gatb-core.orig/gatb-core/src/gatb/tools/compression/DnaCoder.cpp
++++ gatb-core/gatb-core/src/gatb/tools/compression/DnaCoder.cpp
+@@ -650,7 +650,7 @@
  		//CompressionUtils::encodeNumeric(_rangeEncoder, _isPrevReadAnchorablePosModel, _isPrevReadAnchorablePos);
  		//}
  	//_prevAnchorAddress = anchorAddress;
@@ -13,7 +13,7 @@ Description: Fix spelling issues
  
  	
  	kmer_type anchor = _kmers[anchorPos];
-@@ -1494,7 +1494,7 @@ void DnaDecoder::decodeAnchorRead(){
+@@ -1494,7 +1494,7 @@
  	#ifdef PRINT_DEBUG_DECODER
  		cout << "\t\t\tRead size: " << _readSize << endl;
  		cout << "\t\t\tAnchor pos: " << anchorPos << endl;
@@ -22,9 +22,9 @@ Description: Fix spelling issues
  		cout << "\t\t\tAnchor: " << anchor.toString(_kmerSize) << endl;
  	#endif
  	
---- a/gatb-core/src/gatb/tools/compression/Leon.cpp
-+++ b/gatb-core/src/gatb/tools/compression/Leon.cpp
-@@ -996,7 +996,7 @@ void Leon::endDnaCompression(){
+--- gatb-core.orig/gatb-core/src/gatb/tools/compression/Leon.cpp
++++ gatb-core/gatb-core/src/gatb/tools/compression/Leon.cpp
+@@ -996,7 +996,7 @@
  
    u_int64_t readsSize = _anchorAdressSize+_anchorPosSize+_readSizeSize+_bifurcationSize+_otherSize;
    getInfo()->add(2, "Reads", "%.2f (%u)", ((readsSize*100) / (double)_compressedSize), readsSize);
@@ -33,9 +33,9 @@ Description: Fix spelling issues
    getInfo()->add(3, "Anchor pos", "%.2f (%u)", ((_anchorPosSize*100) / (double)_compressedSize), _anchorPosSize);
    getInfo()->add(3, "Read size", "%.2f (%u)", ((_readSizeSize*100) / (double)_compressedSize), _readSizeSize);
    getInfo()->add(3, "Bifurcation", "%.2f (%u)", ((_bifurcationSize*100) / (double)_compressedSize), _bifurcationSize);
---- a/gatb-core/src/gatb/debruijn/impl/GraphUnitigs.cpp
-+++ b/gatb-core/src/gatb/debruijn/impl/GraphUnitigs.cpp
-@@ -1276,13 +1276,13 @@ unsigned char GraphUnitigsTemplate<span>
+--- gatb-core.orig/gatb-core/src/gatb/debruijn/impl/GraphUnitigs.cpp
++++ gatb-core/gatb-core/src/gatb/debruijn/impl/GraphUnitigs.cpp
+@@ -1278,13 +1278,13 @@
  template<size_t span>
  void GraphUnitigsTemplate<span>::countNeighbors (const NodeGU &source, size_t &in, size_t &out)  const
  {
@@ -51,7 +51,7 @@ Description: Fix spelling issues
      return NodeGU();
  }
  
-@@ -1899,7 +1899,7 @@ debugBuildNode(string startKmer) const
+@@ -1905,7 +1905,7 @@
              }
          }
      }


=====================================
debian/patches/use_debian_packaged_hdf5.patch
=====================================
@@ -2,8 +2,8 @@ Author: Andreas Tille <tille at debian.org>
 Last-Update: Tue, 28 Nov 2017 10:37:22 +0100
 Description: Use Debian packaged hdf5
 
---- a/gatb-core/thirdparty/CMakeLists.txt
-+++ b/gatb-core/thirdparty/CMakeLists.txt
+--- gatb-core.orig/gatb-core/thirdparty/CMakeLists.txt
++++ gatb-core/gatb-core/thirdparty/CMakeLists.txt
 @@ -5,6 +5,8 @@
  #SET (HDF5_ENABLE_THREADSAFE       ON)
  #SET (H5_HAVE_THREADSAFE 1)
@@ -13,7 +13,7 @@ Description: Use Debian packaged hdf5
  ##########  MOMENTARY DEACTIVATED => CRASH ON MACOS TO BE INVESTIGATED  ##########
  SET (HDF5_BUILD_TOOLS             ON CACHE BOOL "Build HDF5 Tools")
  #SET (CMAKE_EXE_LINKER_FLAGS       "-lpthread -lz")
-@@ -16,9 +18,9 @@ SET (HDF5_EXTERNALLY_CONFIGURED     ON)
+@@ -16,9 +18,9 @@
  SET (HDF5_INSTALL_BIN_DIR           bin)
  SET (HDF5_INSTALL_LIB_DIR           lib)
  
@@ -26,7 +26,7 @@ Description: Use Debian packaged hdf5
  
  IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
      SET (HDF5_EXPORTED_TARGETS          "gatb-hdf5")
-@@ -32,23 +34,6 @@ ENDIF()
+@@ -32,23 +34,6 @@
  set (COMPILE_DEFINITIONS  "${COMPILE_DEFINITIONS}  -w")
  add_definitions (${COMPILE_DEFINITIONS})
  
@@ -50,7 +50,7 @@ Description: Use Debian packaged hdf5
  # include other smaller libraries (json, Boophf)
  
  add_custom_target (thirdparty_copy ALL)
-@@ -63,7 +48,5 @@ add_custom_command (TARGET thirdparty_co
+@@ -63,7 +48,5 @@
  #  INSTALL 
  ################################################################################
  IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
@@ -58,9 +58,9 @@ Description: Use Debian packaged hdf5
 -    INSTALL (DIRECTORY ${PROJECT_BINARY_DIR}/include/${CMAKE_BUILD_TYPE}/json DESTINATION include)
      INSTALL (DIRECTORY ${PROJECT_BINARY_DIR}/include/${CMAKE_BUILD_TYPE}/BooPHF DESTINATION include)
  ENDIF ()
---- a/gatb-core/CMakeLists.txt
-+++ b/gatb-core/CMakeLists.txt
-@@ -99,7 +99,7 @@ endif()
+--- gatb-core.orig/gatb-core/CMakeLists.txt
++++ gatb-core/gatb-core/CMakeLists.txt
+@@ -99,7 +99,7 @@
  # GENERAL DEFINITIONS
  ################################################################################
  set (LIBRARY_COMPILE_DEFINITIONS "-std=c++11")
@@ -69,7 +69,7 @@ Description: Use Debian packaged hdf5
  
  if (CMAKE_BUILD_TYPE STREQUAL "Debug")
      set (debug 1)
-@@ -211,16 +211,22 @@ set (gatb-core-flags ${LIBRARY_COMPILE_D
+@@ -209,16 +209,22 @@
  set (gatb-core-includes ${PROJECT_BINARY_DIR}/include  ${PROJECT_BINARY_DIR}/include/${CMAKE_BUILD_TYPE} ${PROJECT_SOURCE_DIR}/src  ${PROJECT_SOURCE_DIR}/thirdparty ${gatb-core-extra-libraries-inc})
  
  # We define the libraries used for linking binary based on gatb core
@@ -98,7 +98,7 @@ Description: Use Debian packaged hdf5
  
  ################################################################################
  #  LIBRARY GENERATION 
-@@ -253,11 +259,11 @@ ENDIF()
+@@ -251,11 +257,11 @@
  ################################################################################
  ADD_SUBDIRECTORY(thirdparty)
  
@@ -115,7 +115,7 @@ Description: Use Debian packaged hdf5
  
  ################################################################################
  #  DOCUMENTATION GENERATION 
-@@ -288,7 +294,7 @@ IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUD
+@@ -286,7 +292,7 @@
      INSTALL (FILES ${PROJECT_SOURCE_DIR}/doc/misc/README.txt  DESTINATION . OPTIONAL)
      INSTALL (FILES ${PROJECT_SOURCE_DIR}/LICENCE              DESTINATION . OPTIONAL)
      INSTALL (FILES ${PROJECT_SOURCE_DIR}/THIRDPARTIES.md      DESTINATION . OPTIONAL)


=====================================
debian/rules
=====================================
@@ -3,6 +3,11 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+ifneq (,$(filter $(DEB_HOST_ARCH),armel mipsel powerpc))
+  EXTRA=-DCMAKE_CXX_STANDARD_LIBRARIES=-latomic
+endif
+
+
 include /usr/share/dpkg/default.mk
 pkgtestdata=$(DEB_SOURCE)-testdata
 



View it on GitLab: https://salsa.debian.org/med-team/gatb-core/compare/435ccc218507941291049ae6ea70486cf1ec4d8a...a88ca2d365b55ce41ac0c1d36ce6d682ade460cd

-- 
View it on GitLab: https://salsa.debian.org/med-team/gatb-core/compare/435ccc218507941291049ae6ea70486cf1ec4d8a...a88ca2d365b55ce41ac0c1d36ce6d682ade460cd
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200102/3e1b265b/attachment-0001.html>


More information about the debian-med-commit mailing list