<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<p style="box-sizing: border-box; margin-top: 0px !important; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
Hi, I am trying to build Openslide for Windows 10 64bit using Cygwin.</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
I have followed the instructions in ReadMe file and I am keep running into the same error while building libpng.</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
For Cygwin system, I currently have<br style="box-sizing: border-box">
x86_64-w64-mingw32-gcc g++ 9.2.0 (for both)<br style="box-sizing: border-box">
cmake 3.14.5<br style="box-sizing: border-box">
make 4.3</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
For python, I have python 3.7 (anaconda) installed on my system.</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
So my question is:</p>
<ol style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
<li style="box-sizing: border-box">
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px">To build Openslide, do I need Python installed on my computer? If so, how do I specify an environment that Cygwin can work with?</p>
</li><li style="box-sizing: border-box; margin-top: 0.25em">
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px">From what I am searching online and seeing in the command prompt, it seems like its most likely due to a version issue with the package version of programs such as make, cmake, mingw64
 gcc, etc. Can someone provide me with a working versions of each necessary programs?</p>
</li></ol>
<ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
<li style="box-sizing: border-box">MinGW-w64 gcc and g++ for the target architecture (<code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; padding: 0.2em 0.4em; margin: 0px; background-color: rgba(27, 31, 35, 0.05); border-radius: 3px">i686</code><span> </span>or<span> </span><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; padding: 0.2em 0.4em; margin: 0px; background-color: rgba(27, 31, 35, 0.05); border-radius: 3px">x86_64</code>)</li><li style="box-sizing: border-box; margin-top: 0.25em">NASM</li><li style="box-sizing: border-box; margin-top: 0.25em">OpenJDK</li><li style="box-sizing: border-box; margin-top: 0.25em">Apache Ant</li><li style="box-sizing: border-box; margin-top: 0.25em">CMake</li><li style="box-sizing: border-box; margin-top: 0.25em">gettext utility programs</li><li style="box-sizing: border-box; margin-top: 0.25em">glib2 utility programs</li><li style="box-sizing: border-box; margin-top: 0.25em">Native gcc and binutils for your build platform</li></ul>
<ol start="3" style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
<li style="box-sizing: border-box">If it is not due to program versions, then can someone help me how to fix this error I am encountering?</li></ol>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
libtool: link: x86_64-w64-mingw32-gcc -static-libgcc -O2 -g -mms-bitfields -fexceptions -ftree-vectorize -static-libgcc -Wl,--enable-auto-image-base -Wl,--dynamicbase -Wl,--nxcompat -o .libs/png-fix-itxt.exe contrib/tools/png-fix-itxt.o -L/cygdrive/c/users/junhy/openslide2017/openslide-winbuild-20160612/64/root/lib
 -lz</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
libtool: link: /usr/bin/x86_64-w64-mingw32-nm -B .libs/png.o .libs/pngerror.o .libs/pngget.o .libs/pngmem.o .libs/pngpread.o .libs/pngread.o .libs/pngrio.o .libs/pngrtran.o .libs/pngrutil.o .libs/pngset.o .libs/pngtrans.o .libs/pngwio.o .libs/pngwrite.o .libs/pngwtran.o
 .libs/pngwutil.o | sed -n -e 's/^.<em style="box-sizing: border-box">[ ]([ABCDGIRSTW][ABCDGIRSTW]</em>)[ ][ ]<em style="box-sizing: border-box">([_A-Za-z][_A-Za-z0-9]</em>)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' | /usr/bin/sed -e '/^[BCDGRS][ ]/s/.<em style="box-sizing: border-box">[
 ]([^ ]</em>)/\1 DATA/;s/^.<em style="box-sizing: border-box">[ ]<strong style="box-sizing: border-box; font-weight: 600">nm</strong>([^ ]</em>)[ ][^ ]<em style="box-sizing: border-box">/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.</em><span> </span>//' | sort | uniq
 > .libs/libpng16.exp</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
libtool: link: if test DEF = "<code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; padding: 0.2em 0.4em; margin: 0px; background-color: rgba(27, 31, 35, 0.05); border-radius: 3px">/usr/bin/sed
 -n -e 's/^[ ]*//' -e '/^\(;.*\)*$/d' -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' -e q .libs/libpng16.def</code>" ; then cp .libs/libpng16.def .libs/libpng16-16.dll.def; else echo EXPORTS > .libs/libpng16-16.dll.def; cat .libs/libpng16.def >> .libs/libpng16-16.dll.def;
 fi<br style="box-sizing: border-box">
libtool: link: x86_64-w64-mingw32-gcc -static-libgcc -shared .libs/libpng16-16.dll.def .libs/png.o .libs/pngerror.o .libs/pngget.o .libs/pngmem.o .libs/pngpread.o .libs/pngread.o .libs/pngrio.o .libs/pngrtran.o .libs/pngrutil.o .libs/pngset.o .libs/pngtrans.o
 .libs/pngwio.o .libs/pngwrite.o .libs/pngwtran.o .libs/pngwutil.o -L/cygdrive/c/users/junhy/openslide2017/openslide-winbuild-20160612/64/root/lib -lz -O2 -g -mms-bitfields -Wl,--enable-auto-image-base -Wl,--dynamicbase -Wl,--nxcompat -o .libs/libpng16-16.dll
 -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libpng16.dll.a</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: .libs/pngrutil.o: in function<span> </span><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; padding: 0.2em 0.4em; margin: 0px; background-color: rgba(27, 31, 35, 0.05); border-radius: 3px">memcpy':
 /usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:202: undefined reference to<span> </span></code>__memcpy_chk'</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: .libs/pngwutil.o: in function<span> </span><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; padding: 0.2em 0.4em; margin: 0px; background-color: rgba(27, 31, 35, 0.05); border-radius: 3px">memcpy':
 /usr/x86_64-w64-mingw32/sys-root/mingw/include/string.h:202: undefined reference to<span> </span></code>__memcpy_chk'</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
collect2: error: ld returned 1 exit status<br style="box-sizing: border-box">
make[1]: *** [Makefile:869: libpng16.la] Error 1<br style="box-sizing: border-box">
make[1]: *** Waiting for unfinished jobs....<br style="box-sizing: border-box">
libtool: link: x86_64-w64-mingw32-gcc -static-libgcc -O2 -g -mms-bitfields -fexceptions -ftree-vectorize -static-libgcc -Wl,--enable-auto-image-base -Wl,--dynamicbase -Wl,--nxcompat -o .libs/png-fix-itxt.exe contrib/tools/png-fix-itxt.o -L/cygdrive/c/users/junhy/openslide2017/openslide-winbuild-20160612/64/root/lib
 -lz<br style="box-sizing: border-box">
make[1]: Leaving directory '/cygdrive/c/users/junhy/openslide2017/openslide-winbuild-20160612/64/build/libpng-1.6.22'<br style="box-sizing: border-box">
make: *** [Makefile:766: all] Error 2<br style="box-sizing: border-box">
Failed: make $parallel (line 401)</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
Also, in regards to the last line of error: Failed: make $parallel (line 401)</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
I have tried to change the number of parallels using -j 1 through 4, but it did not change the result.</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
I have also tried building with 2017 release version, 2016 version, 2015 version, but they all give me the same error.</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
In addition, I have tried to install Openslide in my windows linux subsystem (ubuntu16.04) and it worked fine.</p>
<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px !important; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 14px; background-color: rgb(255, 255, 255)">
Thank you in advance.<br style="box-sizing: border-box">
-Jun</p>
</div>
</body>
</html>