]> granicus.if.org Git - graphviz/commitdiff
ci/build.sh: autotools: excplicitly specify the tclsh for MinGW
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 3 Oct 2021 13:18:26 +0000 (15:18 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 7 Dec 2021 06:35:01 +0000 (07:35 +0100)
Fixes these errors when using autotools with MinGW:

C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/gdtclft.o: in function `tclGdWriteCmd':
C:\Users\magja\graphviz\tclpkg\gdtclft/gdtclft.c:560: undefined reference to `Tcl_GetOpenFile'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/gdtclft.o: in function `tclGdCreateCmd':
C:\Users\magja\graphviz\tclpkg\gdtclft/gdtclft.c:450: undefined reference to `Tcl_GetOpenFile'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/gdtclft.o: in function `Gdtclft_Init':
C:\Users\magja\graphviz\tclpkg\gdtclft/gdtclft.c:1278: undefined reference to `Tcl_InitStubs'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/gdtclft.o:gdtclft.c:(.rdata$.refptr.tclStubsPtr[.refptr.tclStubsPtr]+0x0): undefined reference to `tclStubsPtr'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../tclpkg/tclstubs/.libs/libtclstubs_C.a(tclStubLib.o): in function `tclstubs_dummy':
C:\Users\magja\graphviz\tclpkg\tclstubs/tclStubLib.c:17: undefined reference to `Tcl_InitStubs'

ci/build.sh

index b95950f24b79d7dda77ad94f75018cb81ba59a0e..b3cf1c64e70a508723042d67ac10f5a70fbffc1c 100755 (executable)
@@ -80,6 +80,10 @@ else
         tar cfz graphviz-${GV_VERSION}-${ARCH}.tar.gz --options gzip:compression-level=9 build
         mv graphviz-${GV_VERSION}-${ARCH}.tar.gz ${DIR}/
     elif [ "${OSTYPE}" = "cygwin" -o "${OSTYPE}" = "msys" ]; then
+        if [ "${OSTYPE}" = "msys" ]; then
+            # ensure that MinGW tcl shell is used in order to find tcl functions
+            CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS:-} --with-tclsh=${MSYSTEM_PREFIX}/bin/tclsh86"
+        fi
         if [ "${use_autogen:-no}" = "yes" ]; then
             ./autogen.sh
             ./configure ${CONFIGURE_OPTIONS:-} --prefix=$( pwd )/build | tee >(./ci/extract-configure-log.sh >${META_DATA_DIR}/configure.log)