#4 New fix for BTFS on unsigned-char arches, EOF is not a char is an int.
Merged 5 years ago by ankursinha. Opened 5 years ago by sergiomb.
Unknown source master  into  master

@@ -0,0 +1,41 @@

+ --- ./Testing/Source/Common/Cxx/TestString2.cxx.orig	2019-02-26 22:01:26.738230841 +0000

+ +++ ./Testing/Source/Common/Cxx/TestString2.cxx	2019-02-26 22:59:07.751826144 +0000

+ @@ -16,7 +16,6 @@

+  #include <iostream>

+  

+  #include <string.h> // strlen

+ -#include <stdio.h> // EOF

+  

+  int TestString2(int , char *[])

+  {

+ @@ -26,24 +25,24 @@ int TestString2(int , char *[])

+    gdcm::String<> s2 = "coucou!";

+    std::cout << s2 << " -> " << s2.size() << std::endl;

+  

+ -  gdcm::String<EOF,64,0> s3 = "coucou";

+ +  gdcm::String<'\\',64,0> s3 = "coucou";

+    std::cout << s3.c_str() << " -> " << s3.size() << std::endl;

+  

+ -  gdcm::String<EOF,64,0> s4 = "coucou!";

+ +  gdcm::String<'\\',64,0> s4 = "coucou!";

+    std::cout << s4.c_str() << " -> " << s4.size() << std::endl;

+  

+    const char *s = "coucou!";

+ -  gdcm::String<EOF,64,0> s5( s, strlen(s) );

+ +  gdcm::String<'\\',64,0> s5( s, strlen(s) );

+    std::cout << s5.c_str() << " -> " << s5.size() << std::endl;

+  

+    std::string ss = "coucou!";

+ -  gdcm::String<EOF,64,0> s6( ss );

+ +  gdcm::String<'\\',64,0> s6( ss );

+    std::cout << s6.c_str() << " -> " << s6.size() << std::endl;

+  

+ -  gdcm::String<EOF,64,0> s7( ss, 1, 5 );

+ +  gdcm::String<'\\',64,0> s7( ss, 1, 5 );

+    std::cout << s7.c_str() << " -> " << s7.size() << std::endl;

+  

+ -  gdcm::String<EOF,64,0> s8( ss, 1, 6 );

+ +  gdcm::String<'\\',64,0> s8( ss, 1, 6 );

+    std::cout << s8.c_str() << " -> " << s8.size() << std::endl;

+  

+    return 0;

@@ -1,11 +0,0 @@

- --- ./Source/Common/gdcmString.h.orig	2019-02-25 17:28:26.424232122 +0000

- +++ ./Source/Common/gdcmString.h	2019-02-25 17:28:57.986168143 +0000

- @@ -27,7 +27,7 @@ namespace gdcm

-   *      TMaxLength is only a hint. Noone actually respect the max length

-   *      TPadChar is the string padding (0 or space)

-   */

- -template <char TDelimiter = '\\', unsigned int TMaxLength = 64, char TPadChar = ' '>

- +template <signed char TDelimiter = '\\', unsigned int TMaxLength = 64, signed char TPadChar = ' '>

-  class /*GDCM_EXPORT*/ String : public std::string /* PLEASE do not export me */

-  {

-    // UI wants \0 for pad character, while ASCII ones wants space char... do not allow anything else

file modified
+5 -4
@@ -3,7 +3,7 @@

  

  Name:       gdcm

  Version:    2.8.8

- Release:    3%{?dist}

+ Release:    4%{?dist}

  Summary:    Grassroots DiCoM is a C++ library to parse DICOM medical files

  License:    BSD

  URL:        http://gdcm.sourceforge.net/wiki/index.php/Main_Page
@@ -28,7 +28,7 @@

  Patch6: 0006-Update-for-new-poppler.patch

  # Use unversioned directory name

  Patch7: 0007-Use-unversioned-dir.patch

- Patch8: gdcm-2.8.8-fix-narrow.patch

+ Patch8: gdcm-2.8.8-dont_use_EOF.patch

  

  BuildRequires:  CharLS-devel >= 1.0

  BuildRequires:  cmake
@@ -284,13 +284,14 @@

  %{python3_sitearch}/__pycache__/%{name}*

  

  %changelog

+ * Tue Feb 26 2019 Sérgio Basto <sergio@serjux.com> - 2.8.8-4

+ - New fix for BTFS on unsigned-char arches, EOF is not a char is an int.

+ 

  * Mon Feb 25 2019 Sérgio Basto <sergio@serjux.com> - 2.8.8-3

  - Manually-specified variables were not used by the project:

    GDCM_PDF_DOCUMENTATION

  - Patch for poppler breaks builds for previous releases.

  - Fix BTFS on unsigned-char arches

- - Add -fsigned-char to the build flags. The compiler complaints make sense if

-   char is unsigned.

  

  * Mon Feb 18 2019 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 2.8.8-2

  - Enable tests

As talked in devel Mailing List [1] , test use EOL and EOL is the problem , stdio.h returns and int and template want one char.

[1]
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/QEUN5K7BMOOJ5EYQ6JZBV2VLNNWCZWIJ/

Thanks for looking into this! Unfortunately, this doesn't seem to fix the build @sergiomb (simple-koji-ci failed)

simple-koji-ci failed because ld issue talked in devel ML , Should be fixed now , btw we also need a build for F30 .

Thanks

Pull-Request has been merged by ankursinha

5 years ago

Thanks. Merged. I'll kick off the build when I get home in the evening (I can't do it here from work)

I tested it in copr
https://copr.fedorainfracloud.org/coprs/sergiomb/opencv/build/862799/

Now it fails on s390x: https://koji.fedoraproject.org/koji/taskinfo?taskID=33091998

It doesn't look like a build issue, though. I'll resubmit the build and see how that goes.

Build completed
success

Now we can built it for F30 ! please