[tex-live] 64 bits version of TeX Live on Windows

Angelo Graziosi angelo.graziosi at alice.it
Mon Jul 11 12:53:06 CEST 2016



Il 11/07/2016 11:17, Vincent Torri ha scritto:
> hello
>
> what is the status of the patch below ?

For completeness, I summarize the steps to build TL for Win64 using 
MSYS2 tools.

 From a MinGW64 shell (/mingw64.exe):

1. rsync -av --delete --exclude=.svn tug.org::tldevsrc/Build/source/ 
/tmp/tlsrc/

2.
     cd /tmp/tlsrc
     patch -p0 < /tmp/TL-msys2-mingw64.patch  ## [*]

3.
     cd /tmp/tlsrc/texk/dvisvgm/dvisvgm-src/src
     mv Process.h Process_tl.h

     sed -i.bkp 's/Process.h/Process_tl.h/' Process.cpp
     sed -i.bkp 's/Process.h/Process_tl.h/' MetafontWrapper.cpp
     sed -i.bkp 's/Process.h/Process_tl.h/' FileFinder.cpp

(4.
     cd /tmp
     cp -p -i xhlatex.bat tlsrc/texk/tex4htk/

as Karl wrote, we do not need step #4 anymore..)

5.
    cd /tmp/tlsrc
    CXX=g++ CC=gcc ./Build --build=x86_64-w64-mingw32


After a few hours the build stops/finishes with a lua testing failure 
and with the message that 336 executable are installed in 
bin/x86_64-w64-mingw32.

With those binaries, I tried a custom-bin installation

/e/tlrepo/install-tl -custom-bin /tmp/tlsrc/inst/bin/x86_64-w64-mingw32

but there were errors in postinstall steps and a bad exit status. So I 
didn't try to test it either..

Angelo


-----
[*] $ cat /tmp/TL-msys2-mingw64.patch
--- libs/icu/icu-src/source/tools/genren/Makefile.orig  2011-08-10 
14:03:08.000000000 +0200
+++ libs/icu/icu-src/source/tools/genren/Makefile       2016-07-08 
15:19:09.162109300 +0200
@@ -30,12 +30,12 @@
  include $(BUILDDIR)/icudefs.mk
  endif

-COM=$(ICUDIR)/lib/libicuuc.$(SO)
-I18=$(ICUDIR)/lib/libicui18n.$(SO)
-LAY=$(ICUDIR)/lib/libicule.$(SO)
-LEX=$(ICUDIR)/lib/libiculx.$(SO)
+COM=$(ICUDIR)/bin/libicuuc.$(SO)
+I18=$(ICUDIR)/bin/libicui18n.$(SO)
+LAY=$(ICUDIR)/bin/libicule.$(SO)
+LEX=$(ICUDIR)/bin/libiculx.$(SO)
  DAT=$(ICUDIR)/stubdata/libicudata.$(SO)
-UIO=$(ICUDIR)/lib/libicuio.$(SO)
+UIO=$(ICUDIR)/bin/libicuio.$(SO)

  LIBS=$(COM) $(I18) $(LAY) $(LEX) $(UIO)

--- libs/icu/icu-src/source/config/mh-mingw64.orig      2016-03-27 
19:16:39.000000000 +0200
+++ libs/icu/icu-src/source/config/mh-mingw64   2016-07-08 
16:16:05.349609300 +0200
@@ -8,10 +8,6 @@
  # This file is similar to mh-mingw
  # Any changes made here may also need to be made in mh-mingw

-# We install sbin tools into the same bin directory because
-# pkgdata needs some of the tools in sbin, and we can't always depend on
-# icu-config working on Windows.
-sbindir=$(bindir)

  ## Commands to generate dependency files
  GEN_DEPS.c=    $(CC) -E -MM $(DEFS) $(CPPFLAGS)
@@ -44,8 +40,8 @@
  LD_SOOPTIONS= -Wl,-Bsymbolic

  ## Commands to make a shared library
-SHLIB.c=       $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) 
-Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)lib$(notdir 
$(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M#
-SHLIB.cc=      $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) 
-Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)lib$(notdir 
$(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M#
+SHLIB.c=       $(CC) $(CFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) 
-Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir 
$(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M#
+SHLIB.cc=      $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(LD_SOOPTIONS) 
-Wl,--enable-auto-import -Wl,--out-implib=$(dir $@)$(notdir 
$(@:$(SO_TARGET_VERSION_MAJOR).$(SO)=))$(IMPORT_LIB_EXT)#M#

  ## Compiler switch to embed a runtime search path
  LD_RPATH=
@@ -66,27 +62,28 @@
  endif

  # Static library prefix and file extension
-LIBSICU = lib$(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
+LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
  A = a

  ## An import library is needed for z/OS and MSVC
  IMPORT_LIB_EXT = .dll.a

-LIBPREFIX=
+LIBPREFIX=lib

  # Change the stubnames so that poorly working FAT disks and 
installation programs can work.
  # This is also for backwards compatibility.
-DATA_STUBNAME = dt
-I18N_STUBNAME = in
-LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
+LIBICU = $(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)
+
+# The following is for Makefile.inc's use.
+ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)

  #SH### copied from Makefile.inc
  #SH## for icu-config to test with
 
#SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}"
 
#SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}"

-#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)"
-#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)"
+#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)"
+#SH#ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)"
  #SH#
  #SH## ICULIBS is the set of libraries your application should link
  #SH## with usually. Many applications will want to add ${ICULIBS_I18N} 
as well.
@@ -94,11 +91,11 @@

  # The #M# is used to delete lines for icu-config
  # Current full path directory.
-#CURR_FULL_DIR=$(shell pwd -W)#M# for MSYS
-CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
+CURR_FULL_DIR=$(shell $(SHELL) -c "pwd -W")#M# for MSYS
+#CURR_FULL_DIR?=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
  # Current full path directory for use in source code in a -D compiler 
option.
-#CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell pwd -W))#M# for MSYS
-CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell
+CURR_SRCCODE_FULL_DIR=$(subst /,\\\\,$(shell $(SHELL) -c "pwd -W"))#M# 
for MSYS
+#CURR_SRCCODE_FULL_DIR=$(subst \,/,$(shell cmd /c cd))#M# for Cygwin shell

  ## Compilation rules
  %.$(STATIC_O): $(srcdir)/%.c
@@ -130,7 +127,7 @@
  FINAL_SO_TARGET=$(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
  MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)

-FINAL_IMPORT_LIB = $(dir $(SO_TARGET))lib$(notdir $(basename 
$(SO_TARGET)))$(IMPORT_LIB_EXT)#M#
+FINAL_IMPORT_LIB = $(dir $(SO_TARGET))$(notdir $(basename 
$(SO_TARGET)))$(IMPORT_LIB_EXT)#M#
  IMPORT_LIB = $(FINAL_IMPORT_LIB)#M#
  MIDDLE_IMPORT_LIB = $(FINAL_IMPORT_LIB)#M#

--- libs/icu/icu-src/source/tools/pkgdata/pkgdata.cpp.orig 
2016-03-27 19:16:39.000000000 +0200
+++ libs/icu/icu-src/source/tools/pkgdata/pkgdata.cpp   2016-07-08 
16:02:40.083984300 +0200
@@ -891,20 +891,9 @@
      const char* FILE_EXTENSION_SEP = uprv_strlen(pkgDataFlags[SO_EXT]) 
== 0 ? "" : ".";
      const char* FILE_SUFFIX = pkgDataFlags[LIB_EXT_ORDER][0] == '.' ? 
"." : "";

-#if U_PLATFORM == U_PF_MINGW
-        /* MinGW does not need the library prefix when building in dll 
mode. */
-        if (IN_DLL_MODE(mode)) {
-            sprintf(libFileNames[LIB_FILE], "%s", libName);
-        } else {
-            sprintf(libFileNames[LIB_FILE], "%s%s",
-                    pkgDataFlags[LIBPREFIX],
-                    libName);
-        }
-#else
          sprintf(libFileNames[LIB_FILE], "%s%s",
                  pkgDataFlags[LIBPREFIX],
                  libName);
-#endif

          if(o->verbose) {
            fprintf(stdout, "# libFileName[LIB_FILE] = %s\n", 
libFileNames[LIB_FILE]);
--- libs/icu/icu-src/source/tools/pkgdata/pkgtypes.h.orig 
2012-03-22 10:50:28.000000000 +0100
+++ libs/icu/icu-src/source/tools/pkgdata/pkgtypes.h    2016-07-08 
16:02:40.100585900 +0200
@@ -138,10 +138,10 @@
  # ifndef UDATA_SO_SUFFIX
  #  define UDATA_SO_SUFFIX ".dll"
  # endif
-# define LIB_PREFIX ""
-# define LIB_STATIC_PREFIX ""
-# define OBJ_SUFFIX ".obj"
-# define UDATA_LIB_SUFFIX ".lib"
+# define LIB_PREFIX "lib"
+# define LIB_STATIC_PREFIX "lib"
+# define OBJ_SUFFIX ".o"
+# define UDATA_LIB_SUFFIX ".a"

  #elif U_PLATFORM == U_PF_CYGWIN
  # define LIB_PREFIX "cyg"
--- libs/icu/icu-src/source/icudefs.mk.in.orig  2016-03-27 
22:50:56.000000000 +0200
+++ libs/icu/icu-src/source/icudefs.mk.in       2016-07-08 
16:10:23.023437500 +0200
@@ -262,18 +262,18 @@
  USING_ICULEHB=no
  ICULEHB_TRUE=#
  ICULEHB_FALSE=
-ICULIBS_LE     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_LE     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUT_STUBNAME)$(ICULIBSUFFIX)
  ICULE_CFLAGS=-I$(top_srcdir)
  endif

  # Just the libs.
-ICULIBS_DT     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-ICULIBS_UC     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-ICULIBS_I18N   = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-ICULIBS_LX     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-ICULIBS_IO     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-ICULIBS_CTESTFW        = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
-ICULIBS_TOOLUTIL = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(SO_TARGET_VERSION_SUFFIX)
+ICULIBS_DT     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_UC     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_I18N   = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_LX     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_IO     = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_CTESTFW        = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_TOOLUTIL = 
-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)
  # Link commands to link to ICU libs
  LLIBDIR                = -L$(LIBDIR)
  LSTUBDIR       = -L$(top_builddir)/stubdata
--- libs/icu/icu-src/source/config/Makefile.inc.in.orig 2016-03-27 
22:50:56.000000000 +0200
+++ libs/icu/icu-src/source/config/Makefile.inc.in      2016-07-08 
16:21:19.580078100 +0200
@@ -106,15 +106,15 @@
  #    - $(ICULIBS_LAYOUT)  - ICU layout library.
  #    - $(ICULIBS_ICUIO)   - ICU stdio equivalent library

-ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
-ICULIBS_DATA   = 
-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
-ICULIBS_I18N   = 
-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
-ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
-ICULIBS_CTESTFW = 
-l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
-ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
-ICULIBS_OBSOLETE = 
-l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
-ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
-ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)
+ICULIBS_COMMON = -l$(ICUPREFIX)uc$(ICULIBSUFFIX)
+ICULIBS_DATA   = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_I18N   = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)
+ICULIBS_TOOLUTIL = -l$(ICUPREFIX)tu$(ICULIBSUFFIX)
+ICULIBS_CTESTFW = -l$(ICUPREFIX)ctestfw$(ICULIBSUFFIX)
+ICULIBS_ICUIO = -l$(ICUPREFIX)io$(ICULIBSUFFIX)
+ICULIBS_OBSOLETE = -l$(ICUPREFIX)obsolete$(ICULIBSUFFIX)
+ICULIBS_LAYOUT = -l$(ICUPREFIX)le$(ICULIBSUFFIX)
+ICULIBS_LAYOUTEX = -l$(ICUPREFIX)lx$(ICULIBSUFFIX)
  ICULIBS_BASE = -L$(libdir)

  # for icu-config to test with
--- texk/lcdf-typetools/lcdf-typetools-src/liblcdf/error.cc.orig 
2016-06-22 08:25:09.000000000 +0200
+++ texk/lcdf-typetools/lcdf-typetools-src/liblcdf/error.cc 
2016-07-09 16:48:14.693359300 +0200
@@ -681,7 +681,12 @@
             }
             void* v = va_arg(val, void*);
             s2 = numbuf + NUMBUF_SIZE;
+#ifdef __MINGW32__
+           s1 = do_number((size_t) v, (char*) s2, 16, flags);
+#else
             s1 = do_number((unsigned long) v, (char*) s2, 16, flags);
+#endif /* __MINGW32__ */
+
             s1 = do_number_flags((char*) s1, (char*) s2, 16, flags | 
cf_alternate_form, precision, field_width);
             break;
         }




More information about the tex-live mailing list