[med-svn] [Git][med-team/sight][master] Add new patch to fix i386 FTBFS

Flavien Bridault gitlab at salsa.debian.org
Fri Jul 24 17:22:44 BST 2020



Flavien Bridault pushed to branch master at Debian Med / sight


Commits:
a41fffac by Flavien Bridault at 2020-07-24T18:22:23+02:00
Add new patch to fix i386 FTBFS


- - - - -


4 changed files:

- debian/changelog
- + debian/patches/fix-i386-build.patch
- debian/patches/remove_vrrender_extension.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+sight (20.0.0-2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * d/p: add new patch to fix i386 build
+    Closes: #954711
+
+ -- Flavien Bridault <fbridault at ircad.fr>  Fri, 24 Jul 2020 13:37:53 +0000
+
 sight (20.0.0-1) unstable; urgency=medium
 
   * New upstream version 


=====================================
debian/patches/fix-i386-build.patch
=====================================
@@ -0,0 +1,173 @@
+Author: Flavien Bridault <fbridault at ircad.fr>
+Description: Fix build because of implicit conversions on i386.
+Forwarded: https://git.ircad.fr/sight/sight/-/issues/583
+
+Index: sight/libs/core/fwData/include/fwData/Mesh.hpp
+===================================================================
+--- sight.orig/libs/core/fwData/include/fwData/Mesh.hpp
++++ sight/libs/core/fwData/include/fwData/Mesh.hpp
+@@ -274,7 +274,7 @@ public:
+     fwCampMakeFriendDataMacro((fwData)(Mesh))
+ 
+     typedef std::map< std::string, ::fwData::Array::sptr > ArrayMapType;
+-    typedef std::uint64_t Id;
++    typedef ::fwData::iterator::Id Id;
+ 
+     [[deprecated("replaced by CellType (sight 22.0)")]] typedef enum
+     {
+Index: sight/libs/core/fwData/include/fwData/iterator/MeshIterators.hpp
+===================================================================
+--- sight.orig/libs/core/fwData/include/fwData/iterator/MeshIterators.hpp
++++ sight/libs/core/fwData/include/fwData/iterator/MeshIterators.hpp
+@@ -36,6 +36,8 @@ class Mesh;
+ namespace iterator
+ {
+ 
++typedef size_t Id;
++
+ struct Point {
+     float x;
+     float y;
+@@ -234,9 +236,9 @@ class CellIteratorBase
+ {
+ public:
+ 
+-    typedef typename std::conditional<isConst, const std::uint64_t, std::uint64_t>::type cell_data_value_type;
++    typedef typename std::conditional<isConst, const Id, Id>::type cell_data_value_type;
+     typedef typename std::conditional<isConst, const CellType, CellType>::type cell_type_value_type;
+-    typedef typename std::conditional<isConst, const std::uint64_t, std::uint64_t>::type cell_offset_value_type;
++    typedef typename std::conditional<isConst, const Id, Id>::type cell_offset_value_type;
+ 
+     typedef typename std::conditional<isConst, const RGBA, RGBA>::type rgba_value_type;
+     typedef rgba_value_type& rgba_reference;
+@@ -319,7 +321,7 @@ protected:
+     std::vector< ::fwMemory::BufferObject::Lock > m_locks;
+     difference_type m_idx{0};
+     difference_type m_numberOfElements{0};
+-    std::uint64_t m_cellDataSize{0};
++    size_t m_cellDataSize{0};
+     difference_type m_currentOffset{0};
+ };
+ 
+Index: sight/libs/core/fwData/include/fwData/iterator/MeshIterators.hxx
+===================================================================
+--- sight.orig/libs/core/fwData/include/fwData/iterator/MeshIterators.hxx
++++ sight/libs/core/fwData/include/fwData/iterator/MeshIterators.hxx
+@@ -479,7 +479,7 @@ CellIteratorBase<isConst>& CellIteratorB
+     ++m_cellInfo->type;
+     ++m_cellInfo->offset;
+ 
+-    std::uint64_t offset;
++    Id offset;
+     if (m_idx < m_numberOfElements)
+     {
+         offset = *reinterpret_cast<cell_data_value_type*>(m_cellInfo->offset);
+@@ -492,7 +492,7 @@ CellIteratorBase<isConst>& CellIteratorB
+     const difference_type newOffset = static_cast<difference_type>(offset);
+     m_cellInfo->pointIdx += newOffset - m_currentOffset;
+     m_currentOffset       = newOffset;
+-    std::uint64_t nextOffset;
++    Id nextOffset;
+     if (m_idx < m_numberOfElements-1)
+     {
+         nextOffset = *reinterpret_cast<cell_data_value_type*>(m_cellInfo->offset+1);
+@@ -552,7 +552,7 @@ CellIteratorBase<isConst>& CellIteratorB
+ 
+     m_cellInfo->type   += index;
+     m_cellInfo->offset += index;
+-    std::uint64_t offset;
++    Id offset;
+     if (m_idx < m_numberOfElements)
+     {
+         offset = *reinterpret_cast<cell_data_value_type*>(m_cellInfo->offset);
+@@ -564,7 +564,7 @@ CellIteratorBase<isConst>& CellIteratorB
+     const difference_type newOffset = static_cast<difference_type>(offset);
+     m_cellInfo->pointIdx += newOffset - m_currentOffset;
+     m_currentOffset       = newOffset;
+-    std::uint64_t nextOffset;
++    Id nextOffset;
+     if (m_idx < m_numberOfElements-1)
+     {
+         nextOffset = *reinterpret_cast<cell_data_value_type*>(m_cellInfo->offset+1);
+Index: sight/libs/core/fwDataIO/src/fwDataIO/reader/MeshReader.cpp
+===================================================================
+--- sight.orig/libs/core/fwDataIO/src/fwDataIO/reader/MeshReader.cpp
++++ sight/libs/core/fwDataIO/src/fwDataIO/reader/MeshReader.cpp
+@@ -207,8 +207,6 @@ void MeshReader::read()
+     SLM_TRACE( "Trian file: " + path.string());
+     SLM_ASSERT("Empty path for Trian file", !path.empty() );
+ 
+-    std::streamsize length;
+-    //char *buffer;
+     std::string buf;
+     std::ifstream file;
+     file.open(path.string().c_str(), std::ios::binary );
+@@ -220,21 +218,21 @@ void MeshReader::read()
+     }
+ 
+     file.seekg(0, std::ios::end);
+-    length = file.tellg();
++    const auto length = file.tellg();
+     file.seekg(0, std::ios::beg);
+ 
+     //buffer = new char [length];
+     buf.resize(static_cast<size_t>(length));
+     char* buffer = &buf[0];
+ 
+-    file.read(buffer, length);
++    file.read(buffer, static_cast<size_t>(length));
+     file.close();
+ 
+     ::fwData::Mesh::sptr mesh = getConcreteObject();
+ 
+     mesh->clear();
+ 
+-    if (!parseTrian2(buffer, buffer+length, mesh))
++    if (!parseTrian2(buffer, buffer+static_cast<size_t>(length), mesh))
+     {
+         OSLM_ERROR( "Bad file format : " << path.string());
+         throw std::ios_base::failure("Unable to open " + path.string() + " : Bad file format.");
+Index: sight/libs/core/fwMedData/src/fwMedData/DicomSeries.cpp
+===================================================================
+--- sight.orig/libs/core/fwMedData/src/fwMedData/DicomSeries.cpp
++++ sight/libs/core/fwMedData/src/fwMedData/DicomSeries.cpp
+@@ -108,9 +108,9 @@ void DicomSeries::cachedDeepCopy(const :
+ void DicomSeries::addDicomPath(std::size_t _instanceIndex, const std::filesystem::path& _path)
+ {
+     ::fwMemory::BufferObject::sptr buffer = ::fwMemory::BufferObject::New();
+-    const size_t buffSize = std::filesystem::file_size(_path);
++    const auto buffSize = std::filesystem::file_size(_path);
+     buffer->setIStreamFactory( std::make_shared< ::fwMemory::stream::in::Raw >(_path),
+-                               buffSize, _path, ::fwMemory::RAW);
++                               static_cast<::fwMemory::BufferObject::SizeType>(buffSize), _path, ::fwMemory::RAW);
+     m_dicomContainer[_instanceIndex] = buffer;
+ }
+ 
+Index: sight/libs/core/fwDataIO/src/fwDataIO/reader/DictionaryReader.cpp
+===================================================================
+--- sight.orig/libs/core/fwDataIO/src/fwDataIO/reader/DictionaryReader.cpp
++++ sight/libs/core/fwDataIO/src/fwDataIO/reader/DictionaryReader.cpp
+@@ -293,7 +293,6 @@ void DictionaryReader::read()
+     SLM_ASSERT("Empty path for dictionary file", !path.empty());
+ 
+     // Reading of the file
+-    std::streamsize length;
+     std::string buf;
+     std::ifstream file;
+     file.open(path.string().c_str(), std::ios::binary );
+@@ -302,13 +301,13 @@ void DictionaryReader::read()
+     FW_RAISE_IF(errorOpen, !file.is_open());
+ 
+     file.seekg(0, std::ios::end);
+-    length = file.tellg();
++    const auto length = file.tellg();
+     file.seekg(0, std::ios::beg);
+ 
+     buf.resize(static_cast<size_t>(length));
+     char* buffer = &buf[0];
+ 
+-    file.read(buffer, length);
++    file.read(buffer, static_cast<size_t>(length));
+     file.close();
+ 
+     std::vector < ::fwDataIO::line > dicolines;


=====================================
debian/patches/remove_vrrender_extension.patch
=====================================
@@ -1,5 +1,6 @@
 Author: Flavien Bridault <fbridault at ircad.fr>
 Description: Remove .sh extension from vrrender launcher.
+Forwarded: https://git.ircad.fr/sight/sight/-/issues/582
 
 --- sight.orig/cmake/install/linux_install.cmake
 +++ sight/cmake/install/linux_install.cmake


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 remove_vrrender_extension.patch
+fix-i386-build.patch



View it on GitLab: https://salsa.debian.org/med-team/sight/-/commit/a41fffac7f32b2d4342e9c908e2d1414e494dcb7

-- 
View it on GitLab: https://salsa.debian.org/med-team/sight/-/commit/a41fffac7f32b2d4342e9c908e2d1414e494dcb7
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/20200724/98b28899/attachment-0001.html>


More information about the debian-med-commit mailing list