[tex-live] [issue + suggested fix] Building dvisvgm on Windows --- MinGW64/MSYS64 (via TeX Live)

Graham Douglas graham.douglas at readytext.co.uk
Tue Dec 15 15:13:53 CET 2015


Hello Martin

Firstly, thank you for writing dvisvgm --- and the latest update
(dvisvgm-1.13) to include XeTeX XDV format 6 DVI

I have experienced a problem building dvisvgm-1.13 from the latest TeX
Live sources (error dump below)
-- using MinGW64/MSYS64 on Windows 7

The problem seems to be caused by the file Process.h included with
dvisvgm: it clashes with a similarly named file
process.h (lower case p) that is included with the MinGW64 distribution.

However, the fix (hack) I used is simple: I just renamed your Process.h
to Process2.h and dvisvgm-1.13 built fine.
(of course there may be better solutions but this worked for me)

I grepped for Process.h and replaced it with Process2.h in the following
dvisvgm files:

TOTAL:    4 matches in 4 files  (215 other files without matches are not
listed)

1 match in ..\texk\dvisvgm-src\src\FileFinder.cpp
      line 45  #include "Process2.h"
1 match in ..\texk\dvisvgm\dvisvgm-src\src\Makefile.am
     line 142      Process2.h \
1 match in ..\texk\dvisvgm\dvisvgm-src\src\MetafontWrapper.cpp
      line 30  #include "Process2.h"
1 match in ..\texk\dvisvgm\dvisvgm-src\src\Process.cpp
      34  #include "Process2.h"

As noted, after renaming Process.h dvisvgm 1.13 compiled perfectly under
TeX Live.

Warm wishes
Graham

========================
Initial compile failure
========================
make[3]: Entering directory `/e/texlive2016/work/texk/dvisvgm'
depbase=`echo dvisvgm-src/src/BasicDVIReader.o | sed
's|[^/]*$|.deps/&|;s|\.o$||
'`;\
        g++ -DHAVE_CONFIG_H -I. -I../../../texk/dvisvgm 
-I../../../texk/dvisvgm
/dvisvgm-src/clipper -I../../../texk/dvisvgm/dvisvgm-src/src
-I../../../texk/dvi
svgm/dvisvgm-src/xxHash -I/e/texlive2016/Work/texk -I/e/texlive2016/texk
-DNO_DE
BUG -I/e/texlive2016/Work/libs/potrace/include
-I/e/texlive2016/Work/libs/freety
pe2/freetype2 -I/e/texlive2016/Work/libs/zlib/include  -DTEXLIVEWIN32 
-Wreturn-
type -Wno-unknown-pragmas -Wno-write-strings -g -O2 -MT
dvisvgm-src/src/BasicDVI
Reader.o -MD -MP -MF $depbase.Tpo -c -o dvisvgm-src/src/BasicDVIReader.o
../../.
./texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp &&\
        mv -f $depbase.Tpo $depbase.Po
In file included from e:\mingw64\include\c++\4.8.3\string:52:0,
                 from ../../../texk/dvisvgm/dvisvgm-src/src/process.h:24,
                 from e:\mingw64\i686-w64-mingw32\include\pthread.h:66,
                 from
e:\mingw64\include\c++\4.8.3\i686-w64-mingw32\bits\gthr-de
fault.h:35,
                 from
e:\mingw64\include\c++\4.8.3\i686-w64-mingw32\bits\gthr.h:
148,
                 from e:\mingw64\include\c++\4.8.3\ext\atomicity.h:35,
                 from e:\mingw64\include\c++\4.8.3\bits\ios_base.h:39,
                 from e:\mingw64\include\c++\4.8.3\ios:42,
                 from e:\mingw64\include\c++\4.8.3\istream:38,
                 from e:\mingw64\include\c++\4.8.3\sstream:38,
                 from
../../../texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp:2
3:
e:\mingw64\include\c++\4.8.3\bits\basic_string.h:152:2: error:
'_Atomic_word' do
es not name a type
  _Atomic_word  _M_refcount;
  ^
e:\mingw64\include\c++\4.8.3\bits\basic_string.h: In member function
'void std::
basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_dispose(const _Alloc&)':
e:\mingw64\include\c++\4.8.3\bits\basic_string.h:245:12: error:
'__exchange_and_
add_dispatch' is not a member of '__gnu_cxx'
        if (__gnu_cxx::__exchange_and_add_dispatch(&this->_M_refcount,
            ^
e:\mingw64\include\c++\4.8.3\bits\basic_string.h: In member function
'_CharT* st
d::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_refcopy()':
e:\mingw64\include\c++\4.8.3\bits\basic_string.h:263:13: error:
'__atomic_add_di
spatch' is not a member of '__gnu_cxx'
             __gnu_cxx::__atomic_add_dispatch(&this->_M_refcount, 1);
             ^
e:\mingw64\include\c++\4.8.3\bits\basic_string.h: In instantiation of
'void std:
:basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with
_CharT = c
har; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]':
e:\mingw64\include\c++\4.8.3\bits\basic_string.h:213:8:   required from
'void st
d::basic_string<_CharT, _Traits,
_Alloc>::_Rep::_M_set_length_and_sharable(std::
basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char;
_Traits =
 std::char_traits<char>; _Alloc = std::allocator<char>;
std::basic_string<_CharT
, _Traits, _Alloc>::size_type = unsigned int]'
e:\mingw64\include\c++\4.8.3\bits\basic_string.tcc:146:2:   required
from 'stati
c _CharT* std::basic_string<_CharT, _Traits,
_Alloc>::_S_construct(_InIterator,
_InIterator, const _Alloc&, std::forward_iterator_tag) [with
_FwdIterator = char
*; _CharT = char; _Traits = std::char_traits<char>; _Alloc =
std::allocator<char
>]'
e:\mingw64\include\c++\4.8.3\bits\basic_string.h:1725:56:   required
from 'stati
c _CharT* std::basic_string<_CharT, _Traits,
_Alloc>::_S_construct_aux(_InIterat
or, _InIterator, const _Alloc&, std::__false_type) [with _InIterator =
char*; _C
harT = char; _Traits = std::char_traits<char>; _Alloc =
std::allocator<char>]'
e:\mingw64\include\c++\4.8.3\bits\basic_string.h:1746:58:   required
from 'stati
c _CharT* std::basic_string<_CharT, _Traits,
_Alloc>::_S_construct(_InIterator,
_InIterator, const _Alloc&) [with _InIterator = char*; _CharT = char;
_Traits =
std::char_traits<char>; _Alloc = std::allocator<char>]'
e:\mingw64\include\c++\4.8.3\bits\basic_string.tcc:229:49:   required
from 'std:
:basic_string<_CharT, _Traits, _Alloc>::basic_string(_InputIterator,
_InputItera
tor, const _Alloc&) [with _InputIterator = char*; _CharT = char; _Traits
= std::
char_traits<char>; _Alloc = std::allocator<char>]'
e:\mingw64\include\c++\4.8.3\sstream:133:14:   required from
'std::basic_stringb
uf<_CharT, _Traits, _Alloc>::__string_type std::basic_stringbuf<_CharT,
_Traits,
 _Alloc>::str() const [with _CharT = char; _Traits =
std::char_traits<char>; _Al
loc = std::allocator<char>; std::basic_stringbuf<_CharT, _Traits,
_Alloc>::__str
ing_type = std::basic_string<char>]'
e:\mingw64\include\c++\4.8.3\sstream:472:33:   required from
'std::basic_ostring
stream<_CharT, _Traits, _Alloc>::__string_type
std::basic_ostringstream<_CharT,
_Traits, _Alloc>::str() const [with _CharT = char; _Traits =
std::char_traits<ch
ar>; _Alloc = std::allocator<char>; std::basic_ostringstream<_CharT,
_Traits, _A
lloc>::__string_type = std::basic_string<char>]'
../../../texk/dvisvgm/dvisvgm-src/src/BasicDVIReader.cpp:116:30:  
required from
 here
e:\mingw64\include\c++\4.8.3\bits\basic_string.h:204:29: error: 'struct
std::bas
ic_string<char>::_Rep' has no member named '_M_refcount'
         { this->_M_refcount = 0; }
                             ^
make[3]: *** [dvisvgm-src/src/BasicDVIReader.o] Error 1
make[3]: Leaving directory `/e/texlive2016/work/texk/dvisvgm'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/e/texlive2016/work/texk/dvisvgm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/e/texlive2016/work/texk'
make: *** [all-recursive] Error 1


More information about the tex-live mailing list