EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s)
From: Mark Rivers <[email protected]>
To: "'Johnson, Andrew N.'" <[email protected]>
Cc: "Gofron, Kazimierz" <[email protected]>, "[email protected]" <[email protected]>
Date: Sun, 18 Feb 2018 14:19:07 +0000

We have established that the files do contain these non-UTF8 characters.  The question is, should this matter?  So far the only problem has been observed by Kaz when building on Windows.  The problem is in perl when creating the .d dependency files.

 

The problem does not occur on Linux because by default the dependency files are generated by the compiler, not by perl.  However, I just changed my CONFIG_SITE.linux-x86_64.linux-x86_64 file in base 7.0.1 to have the following line:

HDEPENDS_METHOD=MKMF

 

This causes it to use perl to generate the dependency file.  I then rebuilt the lcms/src directory on my RHEL 7 system.

 

perl -CSD /corvette/usr/local/epics-devel/base-7.0.1/bin/linux-x86_64/mkmf.pl  -m cmstypes.d -I. -I../O.Common -I. -I. -I.. -I../../../../../include/compiler/gcc -I../../../../../include/os/Linux -I../../../../../include      -I/corvette/home/epics/devel/asyn-4-33/include     -I/corvette/home/epics/devel/areaDetector-3-2/ADSupport/include/os/Linux -I/corvette/home/epics/devel/areaDetector-3-2/ADSupport/include   -I/corvette/home/epics/devel/areaDetector-3-2/ADCore/include -I/corvette/usr/local/epics-devel/base-7.0.1/include/compiler/gcc -I/corvette/usr/local/epics-devel/base-7.0.1/include/os/Linux -I/corvette/usr/local/epics-devel/base-7.0.1/include     -I../../../../../supportApp/GraphicsMagickSrc/lcms/include    cmstypes.o ../cmstypes.c

perl -CSD /corvette/usr/local/epics-devel/base-7.0.1/bin/linux-x86_64/mkmf.pl  -m cmssm.d -I. -I../O.Common -I. -I. -I.. -I../../../../../include/compiler/gcc -I../../../../../include/os/Linux -I../../../../../include      -I/corvette/home/epics/devel/asyn-4-33/include     -I/corvette/home/epics/devel/areaDetector-3-2/ADSupport/include/os/Linux -I/corvette/home/epics/devel/areaDetector-3-2/ADSupport/include   -I/corvette/home/epics/devel/areaDetector-3-2/ADCore/include -I/corvette/usr/local/epics-devel/base-7.0.1/include/compiler/gcc -I/corvette/usr/local/epics-devel/base-7.0.1/include/os/Linux -I/corvette/usr/local/epics-devel/base-7.0.1/include     -I../../../../../supportApp/GraphicsMagickSrc/lcms/include    cmssm.o ../cmssm.c

 

Note that perl did not complain, it built the .d file fine.  This is using perl version 5.16.3.

corvette:GraphicsMagickSrc/lcms/src>perl --version

 

This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi

(with 33 registered patches, see perl -V for more detail

 

I then rebuilt using a Fedora 26 system and perl generated the error:

 

perl -CSD /corvette/usr/local/epics-devel/base-7.0.1/bin/linux-x86_64/mkmf.pl  -m cmstypes.d -I. -I../O.Common -I. -I. -I.. -I../../../../../include/compiler/gcc -I../../../../../include/os/Linux -I../../../../../include      -I/corvette/home/epics/devel/asyn-4-33/include     -I/corvette/home/epics/devel/areaDetector-3-2/ADSupport/include/os/Linux -I/corvette/home/epics/devel/areaDetector-3-2/ADSupport/include   -I/corvette/home/epics/devel/areaDetector-3-2/ADCore/include -I/corvette/usr/local/epics-devel/base-7.0.1/include/compiler/gcc -I/corvette/usr/local/epics-devel/base-7.0.1/include/os/Linux -I/corvette/usr/local/epics-devel/base-7.0.1/include     -I../../../../../supportApp/GraphicsMagickSrc/lcms/include    cmstypes.o ../cmstypes.c

Malformed UTF-8 character (fatal) at /corvette/usr/local/epics-devel/base-7.0.1/bin/linux-x86_64/mkmf.pl line 136, <FILE> line 5573.

 

This is perl version 5.24.3.  So whether the characters are a problem depends on the version of perl.  Kaz sees it with perl on Windows, but I do not.  My Windows perl version is 5.14.2.  Kaz, what version of perl are you running on Windows?

 

There is one thing I do not understand is why grep finds the non-UTF8 characters on Fedora 26, but apparent not on RHEL 7?  These are the same physical file on disk.  Can someone explain this?

 

RHEL 7:

corvette:GraphicsMagickSrc/lcms/src>grep -axv '.*' cmstypes.c                                                                                                 

corvette:GraphicsMagickSrc/lcms/src>

 

Fedora 26:

[epics@millenia src]$ grep -axv '.*' cmstypes.c

    //(see clause 4.1 for the definition of ▒aligned▒). Because the Unicode language

//The device representation corresponds to the header▒s ▒color space of data▒ field.

//This representation should be consistent with the ▒number of device components▒

//The PCS representation corresponds to the header▒s PCS field. The PCS representation

//CIE ▒absolute▒ illuminant white point tristimulus values and CIE ▒absolute▒

// The first curve segment always starts at ▒Infinity, and the last curve segment always ends at +Infinity. The

// array = [e11, e12, ▒, e1P, e21, e22, ▒, e2P, ▒, eQ1, eQ2, ▒, eQP, e1, e2, ▒, eQ]

            // Y = (Max ▒ Min) * (X ^ Gamma) + Min

            // a = (Max ▒ Min) ^ ( 1 / Gamma)

 

My conclusion is that the characters are not a problem when using perl 5.14.2 or 5.16.3, but they are a problem when using perl 5.24.3.  Is there a switch to later versions of perl that would suppress this error?

 

Kaz wrote:

Ø  It might be a larger issue than just GraphicsMagick, since Microsoft Unicode characters are in many more files than just GraphicsMagick package. I am finding them in Pilatus detector as well.

 

You have not seen a problem when building ADPilatus.  There could be 3 reasons for this:

-          The ADPilatus Makefile only builds on Linux and Darwin.  Since you only use perl for dependencies on Windows it does not happen.

-          If you switched to using perl on Linux as in my test above you might have the problem, depending on the version of perl.

-          It appears that only some files with non-UTF8 characters have the problem.  In lcms/src lots of files have the characters, but only cmstypes.h generates the perl error.

 

Mark

 

 

From: Johnson, Andrew N. [mailto:[email protected]]
Sent: Saturday, February 17, 2018 6:33 PM
To: Mark Rivers <[email protected]>
Cc: Gofron, Kazimierz <[email protected]>; [email protected]
Subject: Re: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s)

 

Hi,Mark,

 

When you got the original source file it was probably not encoded as UTF-8. Converting it from whatever encoding it did use to UTF-8 wouldn’t really be changing the meaning of the files. The upstream repo may not even know that they have this problem, but you’ll probably want to ask them what encoding they think they’re using and maybe offer them a fixed version or this file if they want it to be UTF-8 (or change the smart quotes to regular ones instead).

- Andrew

 

-- 

Sent from my iPad


On Feb 17, 2018, at 2:29 PM, Mark Rivers <[email protected]> wrote:

I will fix these files to remove the offending characters since it seems to cause Perl to fail.


On second thought I would like to get input from Andrew Johnson or others on whether it would be possible to have Perl simply not generate the fatal error in this case.  I am reluctant to change those files, because they are from the GraphicsMagick distribution, and then we need to patch them each time we get a new release.

Mark


 


Replies:
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Gofron, Kazimierz
Re: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Andrew Johnson
Re: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) J. Lewis Muir
References:
ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Gofron, Kazimierz
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Mark Rivers
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Gofron, Kazimierz
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Mark Rivers
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Gofron, Kazimierz
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Mark Rivers
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Gofron, Kazimierz
Re: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Mark Rivers
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Gofron, Kazimierz
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Mark Rivers
RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Mark Rivers
Re: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Johnson, Andrew N.

Navigate by Date:
Prev: Fw: Dexela .dll missing when compiling WITH_PVA=YES Mark Rivers
Next: RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Gofron, Kazimierz
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Johnson, Andrew N.
Next: RE: ADSupport compilation problem due to GraphicsMagick Malformed UTF-8 character(s) Gofron, Kazimierz
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 20 Feb 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·