building graphicsmagick 1.3.38 on Windows
LM <[email protected]> Sun, 17 Apr 2022 11:54:02 -0400
| Newsgroups | gmane.comp.video.graphicsmagick.core |
|---|---|
| Message-ID | <CAFipMOHYvZHwVX6A_OKKX3_DonixFh4F+rNtWc25swGnnR=PeQ@mail.gmail.com> |
--===============1110443973310956412== Content-Type: multipart/alternative; boundary="000000000000b16e4605dcdba7e3" --000000000000b16e4605dcdba7e3 Content-Type: text/plain; charset="UTF-8" Had some problems building GraphicsMagick on my system. I'm using Windows with an older version of MinGW from mingw.org. I also use a lot of non-standard libraries to help with porting to Windows along with the standard ones. I'm attempting to build things statically at this point so I don't have to deal with tracking dependencies quite so much at runtime. Thought I'd share the issues I ran into. First, the configure couldn't add libxml2 and freetype2 It ignored the required packages/libraries from pkg-config. So, configure couldn't compile sample programs with these libraries because required libraries were missing. Had to add the libraries from iconv, bzip2, xz and mman to the LIBS variable to work-around it ignoring the pkg-config required libraries. Then, I hit an issue when it tried to link using libxml2. It couldn't find some of the functions in libxml2. Ran across some information about the issue here: https://stackoverflow.com/questions/4984853/mingw-libxml2-issue Tried building with CPPFLAGS -DIN_LIBXML -DLIBXML_STATIC and that seemed to work-around that issue. Another problem, coders/msl.c, coders/svg.c, coders/url.c define _MSC_VER but they don't give the version they're defining it to. There are multiple instances of code similar to #if (defined(_MSC_VER) && _MSC_VER >= 1500) in GraphicsMagick. Luckily, it's not brought into those files after _MSC_VER is defined or there would be errors that the left side of the _MSC_VER >= 1500 equation was undefined. Unfortunately, some of the libraries I'm using have headers similar to this and they were being pulled into these files. Was getting an error about _MSC_VER being undefined because the preprocessor is replacing _MSC_VER with nothing. Changed the code in those 3 files to define _MSC_VER with a dummy version number to fix the problem. Was able to get GraphicsMagick to build after adding those modifications to my build script. There's code at https://github.com/saitoha/ImageMagick-SIXEL to add sixel support to ImageMagick and it mentions that the code was integrated upstream with ImageMagick. One reason I was trying to build the latest version of GraphicsMagick was to check if there was any sixel support. I don't see it mentioned anywhere in the source. I'm curious how difficult it would be to get the sixel code working with GraphicsMagick. Of course, there are divergences between ImageMagick and GraphicsMagick, so it may not be as easy as I hope. I was able to do something like that several years ago with another format. However, seems even some of that code would no longer work since there have been changes to GraphicsMagick over time as well. If anyone has any tips or ideas on adding other graphics formats like sixel to GraphicsMagick, would be interested to hear them. One last subject I was curious about, I noticed SVG support in GraphicsMagick. Didn't notice any SVG libraries mentioned, so I assume the support is all within the GraphicsMagick code. Was wondering how the SVG support in GraphicsMagick compared to nanosvg and if it would be worth trying to integrate nanosvg or if the current SVG support is more than sufficient to do the same types of rendering. I really like GraphicsMagick and prefer using it in place of ImageMagick, so thanks to everyone who supports and works on it to keep it going. Sincerely, Laura --000000000000b16e4605dcdba7e3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Had some problems building GraphicsMagick on my system.=C2= =A0 I'm using Windows with an older version of MinGW from <a href=3D"ht= tp://mingw.org">mingw.org</a>.=C2=A0 I also use a lot of non-standard libra= ries to help with porting to Windows along with the standard ones.=C2=A0 I&= #39;m attempting to build things statically at this point so I don't ha= ve to deal with tracking dependencies quite so much at runtime. <br><br>Tho= ught I'd share the issues I ran into. =C2=A0<br>First, the configure co= uldn't add libxml2 and freetype2<br>It ignored the required packages/li= braries from pkg-config.=C2=A0 So, configure couldn't compile sample pr= ograms with these libraries because required libraries were missing.=C2=A0 = Had to add the libraries from iconv, bzip2, xz and mman to the LIBS variabl= e to work-around it ignoring the pkg-config required libraries.=C2=A0 Then,= I hit an issue when it tried to link using libxml2.=C2=A0 It couldn't = find some of the functions in libxml2.=C2=A0 Ran across some information ab= out the issue here:<br><a href=3D"https://stackoverflow.com/questions/49848= 53/mingw-libxml2-issue">https://stackoverflow.com/questions/4984853/mingw-l= ibxml2-issue</a><br>Tried building with CPPFLAGS -DIN_LIBXML -DLIBXML_STATI= C and that seemed to work-around that issue.<br>Another problem, coders/msl= .c, coders/svg.c, coders/url.c define _MSC_VER but they don't give the = version they're defining it to.=C2=A0 There are multiple instances of c= ode similar to #if (defined(_MSC_VER) && _MSC_VER >=3D 1500) in = GraphicsMagick.=C2=A0 Luckily, it's not brought into those files after = _MSC_VER is defined or there would be errors that the left side of the _MSC= _VER >=3D 1500 equation was undefined.=C2=A0 Unfortunately, some of the = libraries I'm using have headers similar to this and they were being pu= lled into these files.=C2=A0 Was getting an error about _MSC_VER being unde= fined because the preprocessor is replacing _MSC_VER with nothing.=C2=A0 Ch= anged the code in those 3 files to define _MSC_VER with a dummy version num= ber to fix the problem.<br><div><br></div><div>Was able to get GraphicsMagi= ck to build after adding those modifications to my build script.=C2=A0=C2= =A0</div><div><br></div><div>There's code at=C2=A0<a href=3D"https://gi= thub.com/saitoha/ImageMagick-SIXEL">https://github.com/saitoha/ImageMagick-= SIXEL</a>=C2=A0to add sixel support to ImageMagick and it mentions that the= code was integrated upstream with ImageMagick.=C2=A0 One reason I was tryi= ng to build the latest version of GraphicsMagick was to check if there was = any sixel support.=C2=A0 I don't see it mentioned anywhere in the sourc= e.=C2=A0 I'm curious how difficult it would be to get the sixel code wo= rking with GraphicsMagick.=C2=A0 Of course, there are divergences between I= mageMagick and GraphicsMagick, so it may not be as easy as I hope.=C2=A0 I = was able to do something like that several years ago with another format.= =C2=A0 However, seems even some of that code would no longer work since the= re have been changes to GraphicsMagick over time as well.=C2=A0 If anyone h= as any tips or ideas on adding other graphics formats like sixel to Graphic= sMagick, would be interested to hear them.</div><div><br></div><div>One las= t subject I was curious about, I noticed SVG support in GraphicsMagick.=C2= =A0 Didn't notice any SVG libraries mentioned, so I assume the support = is all within the GraphicsMagick code.=C2=A0 Was wondering how the SVG supp= ort in GraphicsMagick compared to nanosvg and if it would be worth trying t= o integrate nanosvg or if the current SVG support is more than sufficient t= o do the same types of rendering.</div><div><br></div><div>I really like Gr= aphicsMagick and prefer using it in place of ImageMagick, so thanks to ever= yone who supports and works on it to keep it going.</div><div><br></div><di= v>Sincerely,</div><div>Laura</div><div><br></div></div> --000000000000b16e4605dcdba7e3-- --===============1110443973310956412== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1110443973310956412== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Graphicsmagick-core mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-core --===============1110443973310956412==--