It seems something has changed in the MingW pthread implementation that
triggers the compilation error. These days we compile the windows version with
msvc because the resulting code is faster. Anyway, I have commited a fix.
Please try the "master" branch of the git repository. Regards.
- L.
On Sunday, February 03, 2013 09:05:53 PM Klo wrote:
I read readme file, explaining that building on MinGW is as simple as
"./configure; make", but on "make" step, I get error:
~~~~~~
$ make
for d in libdjvu tools desktopfiles ; \
do ( cd $d && make all ) || exit ; done
make[1]: Entering directory /c/src/djvulibre-3.5.25/libdjvu'
make[1]: Circular Makefile.dep <- Makefile.dep dependency dropped.
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG
-Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread
-DTHREADMODEL=POSIXTHREADS -c DjVuGlobal.cpp libtool: compile: g++
-DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c DjVuGlobal.cpp
-DDLL_EXPORT -DPIC -o .libs/DjVuGlobal.o /bin/sh ../libtool --mode=compile
g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c
DjVuGlobalMemory.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I.. -I.
-DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread
-DTHREADMODEL=POSIXTHREADS -c DjVuGlobalMemory.cpp -DDLL_EXPORT -DPIC -o
.libs/DjVuGlobalMemory.o /bin/sh ../libtool --mode=compile g++
-DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c GOS.cpp libtool:
compile: g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3
-Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c
GOS.cpp -DDLL_EXPORT -DPIC -o .libs/GOS.o /bin/sh ../libtool
--mode=compile g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3
-Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS
-c GException.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG
-Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread
-DTHREADMODEL=POSIXTHREADS -c GException.cpp -DDLL_EXPORT -DPIC -o
.libs/GException.o GException.cpp:266:13: warning: 'void
DJVU::throw_memory_error()' defined but not used [-Wunused-function]
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG
-Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread
-DTHREADMODEL=POSIXTHREADS -c GContainer.cpp libtool: compile: g++
-DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c GContainer.cpp
-DDLL_EXPORT -DPIC -o .libs/GContainer.o /bin/sh ../libtool --mode=compile
g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c GString.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3
-Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c
GString.cpp -DDLL_EXPORT -DPIC -o .libs/GString.o /bin/sh ../libtool
--mode=compile g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3
-Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS
-c GThreads.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG
-Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread
-DTHREADMODEL=POSIXTHREADS -c GThreads.cpp -DDLL_EXPORT -DPIC -o
.libs/GThreads.o GThreads.cpp: In constructor
'DJVU::GThread::GThread(int)':
GThreads.cpp:443:29: error: no matching function for call to
'ptw32_handle_t::ptw32_handle_t(int)' GThreads.cpp:443:29: note: candidates
are:
In file included from GThreads.h:149:0,
from GThreads.cpp:71:
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: ptw32_handle_t::ptw32_handle_t()
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: candidate expects 0 arguments, 1 provided
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: ptw32_handle_t::ptw32_handle_t(const ptw32_handle_t&)
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: no known conversion for argument 1 from 'int' to 'const
ptw32_handle_t&' GThreads.cpp: In destructor 'DJVU::GThread::~GThread()':
GThreads.cpp:449:10: error: no match for 'operator=' in
'((DJVU::GThread*)this)->DJVU::GThread::hthr = 0' GThreads.cpp:449:10:
note: candidate is:
In file included from GThreads.h:149:0,
from GThreads.cpp:71:
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: ptw32_handle_t& ptw32_handle_t::operator=(const ptw32_handle_t&)
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: no known conversion for argument 1 from 'int' to 'const
ptw32_handle_t&' GThreads.cpp: In static member function 'static void*
DJVU::GThread::current()': GThreads.cpp:502:18: error: invalid cast from
type 'pthread_t {aka ptw32_handle_t}' to type 'void*' GThreads.cpp: In
constructor 'DJVU::GMonitor::GMonitor()':
GThreads.cpp:509:30: error: no matching function for call to
'ptw32_handle_t::ptw32_handle_t(int)' GThreads.cpp:509:30: note: candidates
are:
In file included from GThreads.h:149:0,
from GThreads.cpp:71:
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: ptw32_handle_t::ptw32_handle_t()
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: candidate expects 0 arguments, 1 provided
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: ptw32_handle_t::ptw32_handle_t(const ptw32_handle_t&)
c:\mingw\bin\../lib/gcc/mingw32/4.7.2/../../../../include/pthread.h:583:3:
note: no known conversion for argument 1 from 'int' to 'const
ptw32_handle_t&' GThreads.cpp: In static member function 'static void*
DJVU::GThread::current()': GThreads.cpp:504:1: warning: control reaches end
of non-void function [-Wreturn-type] make[1]: *** [GThreads.lo] Error 1
make[1]: Leaving directory/c/src/djvulibre-3.5.25/libdjvu'
make: *** [all] Error 2
~~~~~~
What could be the problem here?
Should I use some switch in "./configure" step?
On Wednesday, February 06, 2013 09:48:48 AM Klo wrote:
DjVuGlobal.h:72:18: fatal error: new.h: No such file or directory
This error comes because HAVE_STDINCLUDES was not detected
properly at configuration time. This is very strange since
modern c++ compiler should pass this test.
Anyway, I have changed the code to assume a
standard compiler by default.
Let me know.
- L.
I don't think that there s anything wrong with my MinGW install, as this is not the first time I use it. I don't have any problems building packages that are supposed to build under MinGW.
1) the log says:
checking whether the compiler comes with standard includes... yes
this means that the macro HAVE_STDINCLUDES should be defined in config.h.
can you check this?
2) the file DjVuGlobal.h should contain the following lines:
if defined(HAVE_STDINCLUDES)
include <new>
elif defined(HAVE_NEW_H)
include <new.h>
else
include <new> // try standard c++ anyway!
endif
If you do not have these lines, you do not have the
latest version from git. But if you have them, it should
not try to include <new.h>.
3) Incidently the log does not contain a check for new.h
Since I have added it at the same time, this suggests you
do not have the latest version.
L.
On Sunday, February 10, 2013 08:52:59 PM you wrote:
I don't think that there s anything wrong with my MinGW install, as this is
not the first time I use it. I don't have any problems building packages
that are supposed to build under MinGW.
Please try again.
It seems sf has changed the official location of their git repositories.
The tricky thing is that the old ones still work (and I was still using the
old one.) I tried to migrate but met a couple weird bugs.
If this does not work, try the old git repo (like everyone else it seems)
I get same result with either of your suggested repos:
$ make
for d in libdjvu tools desktopfiles ;\do(cd$d&& make all )||exit;done
make[1]: Entering directory `/c/src/djvulibre-git/libdjvu'make[1]: Circular Makefile.dep <- Makefile.dep dependency dropped./bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c DjVuGlobal.cpplibtool: compile: g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c DjVuGlobal.cpp -DDLL_EXPORT -DPIC -o .libs/DjVuGlobal.o/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c DjVuGlobalMemory.cpplibtool: compile: g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c DjVuGlobalMemory.cpp -DDLL_EXPORT -DPIC -o .libs/DjVuGlobalMemory.o/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c GOS.cpplibtool: compile: g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c GOS.cpp -DDLL_EXPORT -DPIC -o .libs/GOS.oIn file included from GOS.h:85:0, from GOS.cpp:65:GString.h:116:0: warning: "HAS_WCHAR" redefined [enabled by default]In file included from GOS.cpp:57:0:../config.h:298:0: note: this is the location of the previous definitionIn file included from GOS.h:85:0, from GOS.cpp:65:GString.h:117:0: warning: "HAS_WCTYPE" redefined [enabled by default]In file included from GOS.cpp:57:0:../config.h:299:0: note: this is the location of the previous definitionIn file included from GOS.h:85:0, from GOS.cpp:65:GString.h:118:0: warning: "HAS_MBSTATE" redefined [enabled by default]In file included from GOS.cpp:57:0:../config.h:300:0: note: this is the location of the previous definitionIn file included from GString.h:109:0, from GOS.h:85, from GOS.cpp:65:GContainer.h: In member function 'TYPE& GListTemplate<TYPE, TI>::operator[](GPosition)':GContainer.h:907:56: error: expected primary-expression before ')' tokenGContainer.h:907:57: error: expected ')' before 'pos'GContainer.h:907:86: error: expected ')' before ';' tokenGContainer.h: In member function 'const TYPE& GListTemplate<TYPE, TI>::operator[](GPosition) const':GContainer.h:915:46: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]GContainer.h:915:46: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]GContainer.h:915:31: error: expected primary-expression before 'const'GContainer.h:915:31: error: expected ')' before 'const'GContainer.h:915:98: error: expected ')' before ';' tokenGContainer.h:915:98: error: expected ')' before ';' tokenGContainer.h: In member function 'const KTYPE& GMapTemplate<KTYPE, VTYPE, TI>::key(const GPosition&) const':GContainer.h:1252:66: error: expected primary-expression before ')' tokenGContainer.h: In member function 'VTYPE& GMapTemplate<KTYPE, VTYPE, TI>::operator[](const GPosition&)':GContainer.h:1258:60: error: expected primary-expression before ')' tokenGContainer.h: In member function 'const VTYPE& GMapTemplate<KTYPE, VTYPE, TI>::operator[](const GPosition&) const':GContainer.h:1264:66: error: expected primary-expression before ')' tokenGContainer.h: In member function 'const VTYPE& GMapTemplate<KTYPE, VTYPE, TI>::operator[](const KTYPE&) const':GContainer.h:1271:46: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]GContainer.h:1271:46: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]GContainer.h:1271:31: error: expected primary-expression before 'const'GContainer.h:1271:31: error: expected ')' before 'const'GContainer.h:1271:105: error: expected ')' before ';' tokenGContainer.h:1271:105: error: expected ')' before ';' tokenGContainer.h: In member function 'VTYPE& GMapTemplate<KTYPE, VTYPE, TI>::operator[](const KTYPE&)':GContainer.h:1277:60: error: expected primary-expression before ')' tokenIn file included from GOS.h:85:0, from GOS.cpp:65:GString.h: At global scope:GString.h:309:43: error: 'mbstate_t' has not been declaredGString.h:315:42: error: 'mbstate_t' has not been declaredGString.h:440:42: error: 'mbstate_t' has not been declaredGOS.cpp: In function 'char* strerror(int* (*)())':GOS.cpp:151:10: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]make[1]: *** [GOS.lo] Error 1make[1]: Leaving directory `/c/src/djvulibre-git/libdjvu'
make: *** [all] Error 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you try the attached patch?
This is also in the git.code.sf.net repository.
- L.
On Monday, February 11, 2013 10:49:13 PM Klo wrote:
I get same result with either of your suggested repos:
~~~~~~
$ make
for d in libdjvu tools desktopfiles ; \
do ( cd $d && make all ) || exit ; done
make[1]: Entering directory /c/src/djvulibre-git/libdjvu'
make[1]: Circular Makefile.dep <- Makefile.dep dependency dropped.
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG
-Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread
-DTHREADMODEL=POSIXTHREADS -c DjVuGlobal.cpp libtool: compile: g++
-DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c DjVuGlobal.cpp
-DDLL_EXPORT -DPIC -o .libs/DjVuGlobal.o /bin/sh ../libtool --mode=compile
g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c
DjVuGlobalMemory.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I.. -I.
-DNDEBUG -Wall -O3 -Wno-non-virtual-dtor -mtune=i686 -pthread
-DTHREADMODEL=POSIXTHREADS -c DjVuGlobalMemory.cpp -DDLL_EXPORT -DPIC -o
.libs/DjVuGlobalMemory.o /bin/sh ../libtool --mode=compile g++
-DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3 -Wno-non-virtual-dtor
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c GOS.cpp libtool:
compile: g++ -DHAVE_CONFIG_H -I.. -I. -DNDEBUG -Wall -O3
-Wno-non-virtual-dtor -mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c
GOS.cpp -DDLL_EXPORT -DPIC -o .libs/GOS.o In file included from
GOS.h:85:0,
from GOS.cpp:65:
GString.h:116:0: warning: "HAS_WCHAR" redefined [enabled by default]
In file included from GOS.cpp:57:0:
../config.h:298:0: note: this is the location of the previous definition
In file included from GOS.h:85:0,
from GOS.cpp:65:
GString.h:117:0: warning: "HAS_WCTYPE" redefined [enabled by default]
In file included from GOS.cpp:57:0:
../config.h:299:0: note: this is the location of the previous definition
In file included from GOS.h:85:0,
from GOS.cpp:65:
GString.h:118:0: warning: "HAS_MBSTATE" redefined [enabled by default]
In file included from GOS.cpp:57:0:
../config.h:300:0: note: this is the location of the previous definition
In file included from GString.h:109:0,
from GOS.h:85,
from GOS.cpp:65:
GContainer.h: In member function 'TYPE& GListTemplate<TYPE,
TI>::operator[](GPosition)': GContainer.h:907:56: error: expected
primary-expression before ')' token GContainer.h:907:57: error: expected
')' before 'pos'
GContainer.h:907:86: error: expected ')' before ';' token
GContainer.h: In member function 'const TYPE& GListTemplate<TYPE,
TI>::operator[](GPosition) const': GContainer.h:915:46: error: ISO C++
forbids declaration of 'type name' with no type [-fpermissive]
GContainer.h:915:46: error: ISO C++ forbids declaration of 'type name' with
no type [-fpermissive] GContainer.h:915:31: error: expected
primary-expression before 'const' GContainer.h:915:31: error: expected ')'
before 'const'
GContainer.h:915:98: error: expected ')' before ';' token
GContainer.h:915:98: error: expected ')' before ';' token
GContainer.h: In member function 'const KTYPE& GMapTemplate<KTYPE, VTYPE,
TI>::key(const GPosition&) const': GContainer.h:1252:66: error: expected
primary-expression before ')' token GContainer.h: In member function
'VTYPE& GMapTemplate<KTYPE, VTYPE, TI>::operator[](const GPosition&)':
GContainer.h:1258:60: error: expected primary-expression before ')' token
GContainer.h: In member function 'const VTYPE& GMapTemplate<KTYPE, VTYPE,
TI>::operator[](const GPosition&) const': GContainer.h:1264:66: error:
expected primary-expression before ')' token GContainer.h: In member
function 'const VTYPE& GMapTemplate<KTYPE, VTYPE, TI>::operator[](const
KTYPE&) const': GContainer.h:1271:46: error: ISO C++ forbids declaration of
'type name' with no type [-fpermissive] GContainer.h:1271:46: error: ISO
C++ forbids declaration of 'type name' with no type [-fpermissive]
GContainer.h:1271:31: error: expected primary-expression before 'const'
GContainer.h:1271:31: error: expected ')' before 'const'
GContainer.h:1271:105: error: expected ')' before ';' token
GContainer.h:1271:105: error: expected ')' before ';' token
GContainer.h: In member function 'VTYPE& GMapTemplate<KTYPE, VTYPE,
TI>::operator[](const KTYPE&)': GContainer.h:1277:60: error: expected
primary-expression before ')' token In file included from GOS.h:85:0,
from GOS.cpp:65:
GString.h: At global scope:
GString.h:309:43: error: 'mbstate_t' has not been declared
GString.h:315:42: error: 'mbstate_t' has not been declared
GString.h:440:42: error: 'mbstate_t' has not been declared
GOS.cpp: In function 'char* strerror(int* (*)())':
GOS.cpp:151:10: warning: deprecated conversion from string constant to
'char*' [-Wwrite-strings] make[1]: *** [GOS.lo] Error 1
make[1]: Leaving directory/c/src/djvulibre-git/libdjvu'
make: *** [all] Error 2
~~~~~~
GString.h:116:0: warning: "HAS_WCHAR" redefined [enabled by default]
In file included from GOS.cpp:57:0:
../config.h:298:0: note: this is the location of the previous definition
In file included from GOS.h:85:0,
from GOS.cpp:65:
GString.h:117:0: warning: "HAS_WCTYPE" redefined [enabled by default]
In file included from GOS.cpp:57:0:
../config.h:299:0: note: this is the location of the previous definition
In file included from GOS.h:85:0,
from GOS.cpp:65:
GString.h:118:0: warning: "HAS_MBSTATE" redefined [enabled by default]
In file included from GOS.cpp:57:0:
../config.h:300:0: note: this is the location of the previous definition
In file included from GString.h:109:0,
from GOS.h:85,
from GOS.cpp:65:
GContainer.h: In member function 'TYPE& GListTemplate<TYPE, TI="">::operator': GContainer.h:907:56: error: expected
primary-expression before ')' token GContainer.h:907:57: error: expected
')' before 'pos'
GContainer.h:907:86: error: expected ')' before ';' token
GContainer.h: In member function 'const TYPE& GListTemplate<TYPE, TI="">::operator const': GContainer.h:915:46: error: ISO C++
forbids declaration of 'type name' with no type [-fpermissive]
GContainer.h:915:46: error: ISO C++ forbids declaration of 'type name'
with
no type [-fpermissive] GContainer.h:915:31: error: expected
primary-expression before 'const' GContainer.h:915:31: error: expected ')'
before 'const'
GContainer.h:915:98: error: expected ')' before ';' token
GContainer.h:915:98: error: expected ')' before ';' token
GContainer.h: In member function 'const KTYPE& GMapTemplate<KTYPE, VTYPE,="" TI="">::key(const GPosition&) const': GContainer.h:1252:66: error: expected
primary-expression before ')' token GContainer.h: In member function
'VTYPE& GMapTemplate<KTYPE, VTYPE,="" TI="">::operator':
GContainer.h:1258:60: error: expected primary-expression before ')' token
GContainer.h: In member function 'const VTYPE& GMapTemplate<KTYPE, VTYPE,="" TI="">::operator const': GContainer.h:1264:66: error:
expected primary-expression before ')' token GContainer.h: In member
function 'const VTYPE& GMapTemplate<KTYPE, VTYPE,="" TI="">::operator const': GContainer.h:1271:46: error: ISO C++ forbids declaration
of
'type name' with no type [-fpermissive] GContainer.h:1271:46: error: ISO
C++ forbids declaration of 'type name' with no type [-fpermissive]
GContainer.h:1271:31: error: expected primary-expression before 'const'
GContainer.h:1271:31: error: expected ')' before 'const'
GContainer.h:1271:105: error: expected ')' before ';' token
GContainer.h:1271:105: error: expected ')' before ';' token
GContainer.h: In member function 'VTYPE& GMapTemplate<KTYPE, VTYPE,="" TI="">::operator': GContainer.h:1277:60: error: expected
primary-expression before ')' token In file included from GOS.h:85:0,
from GOS.cpp:65:
GString.h: At global scope:
GString.h:309:43: error: 'mbstate_t' has not been declared
GString.h:315:42: error: 'mbstate_t' has not been declared
GString.h:440:42: error: 'mbstate_t' has not been declared
GOS.cpp: In function 'char strerror(int ()())':
GOS.cpp:151:10: warning: deprecated conversion from string constant to
'char' [-Wwrite-strings] make[1]: [GOS.lo] Error 1
make[1]: Leaving directory `/c/src/djvulibre-git/libdjvu'
make: [all] Error 2
~~~~~~
On Thursday, February 14, 2013 05:50:38 AM Klo wrote:
OK, more to go:
-mtune=i686 -pthread -DTHREADMODEL=POSIXTHREADS -c GString.cpp
-DDLL_EXPORT -DPIC -o .libs/GString.o GString.cpp:1798:65: error: no 'int
GStringRep::UTF8::ncopy(wchar_t, int) const' member function declared in
class 'GStringRep::UTF8' GString.cpp: In function 'const char
setlocale_win32()':
GString.cpp:2151:47: error: 'setlocale' was not declared in this scope
make[1]: [GString.lo] Error 1
make[1]: Leaving directory `/c/src/djvulibre-git/libdjvu'
make: [all] Error 2
~~~~~~
On Friday, February 15, 2013 07:12:24 AM you wrote:
GStringRep::UTF8::ncopy(wchar_t*, int) const' member function declared in
class 'GStringRep::UTF8' make[1]: [GString.lo] Error 1
make[1]: Leaving directory `/c/src/djvulibre-git/libdjvu'
make: [all] Error 2
This suggests that HAS_WCHAR is set to zero.
This is weird because you configure log says that type wchar_t has been found.
There is something wrong here.
Can you check the status of macros HAVE_WCHAR_T and HAVE_WCHAR_H in the file
config.h generated by configure?
L.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I read readme file, explaining that building on MinGW is as simple as "./configure; make", but on "make" step, I get error:
What could be the problem here?
Should I use some switch in "./configure" step?
TIA
It seems something has changed in the MingW pthread implementation that
triggers the compilation error. These days we compile the windows version with
msvc because the resulting code is faster. Anyway, I have commited a fix.
Please try the "master" branch of the git repository. Regards.
- L.
On Sunday, February 03, 2013 09:05:53 PM Klo wrote:
Hi,
thanks for your reply. I cloned master branch, but:
On Wednesday, February 06, 2013 09:48:48 AM Klo wrote:
This error comes because HAVE_STDINCLUDES was not detected
properly at configuration time. This is very strange since
modern c++ compiler should pass this test.
Anyway, I have changed the code to assume a
standard compiler by default.
Let me know.
- L.
I cloned master branch, but I get exact same error.
Cannot be the same message since we no longer include <new.h>.
Instead we include <new>.
Not that standard compliant c++ compilers
should all accept the following program.
include <new>
struct T { int a; };
int main() { void addr = 0; T t = new (addr) T; return 0; }
If this does not compile, there is a problem with your mingw install.
On Wednesday, February 06, 2013 10:26:50 PM Klo wrote:
I don't think that there s anything wrong with my MinGW install, as this is not the first time I use it. I don't have any problems building packages that are supposed to build under MinGW.
Here is link to whole log for introspection: http://pastebin.com/raw.php?i=be5E5az3
Same attached.
I suspect you do not have the latest git version.
1) the log says:
checking whether the compiler comes with standard includes... yes
this means that the macro HAVE_STDINCLUDES should be defined in config.h.
can you check this?
2) the file DjVuGlobal.h should contain the following lines:
if defined(HAVE_STDINCLUDES)
include <new>
elif defined(HAVE_NEW_H)
include <new.h>
else
include <new> // try standard c++ anyway!
endif
If you do not have these lines, you do not have the
latest version from git. But if you have them, it should
not try to include <new.h>.
3) Incidently the log does not contain a check for new.h
Since I have added it at the same time, this suggests you
do not have the latest version.
On Sunday, February 10, 2013 08:52:59 PM you wrote:
DjVuGlobal.h does not contain those lines
How to get latest version?
Previously you suggested I use master branch, which I did this way (included in previous log file I attached):
git clone git://git.code.sf.net/p/djvu/djvulibre-git -b master djvu-djvulibre-git
Please try again.
It seems sf has changed the official location of their git repositories.
The tricky thing is that the old ones still work (and I was still using the
old one.) I tried to migrate but met a couple weird bugs.
If this does not work, try the old git repo (like everyone else it seems)
$ git clone git://djvu.git.sourceforge.net/gitroot/djvu/djvulibre.git
I still have to get these git mixups right.
I get same result with either of your suggested repos:
Can you try the attached patch?
This is also in the git.code.sf.net repository.
- L.
On Monday, February 11, 2013 10:49:13 PM Klo wrote:
And the attached version of GContainer.h is an attempt
to solve the other problem.
- L.
On Tuesday, February 12, 2013 02:45:19 AM Leon Bottou wrote:
Sorry, can you please CC me, as I'm not subscribed, but messaging through SF forum and can see the attachments?
Thanks
OK, I see that patches are probably applied to current git repo, and here is yet another error log:
I pushed another change for this.
Sorry for the remote debugging. We haven't compiled with MingW for a long time
because MingW or CygWin used to produce much slower code than MSVC.
On Wednesday, February 13, 2013 12:17:15 PM Klo wrote:
OK, more to go:
I have removed all this cruft.
- L.
On Thursday, February 14, 2013 05:50:38 AM Klo wrote:
On Friday, February 15, 2013 07:12:24 AM you wrote:
This suggests that HAS_WCHAR is set to zero.
This is weird because you configure log says that type wchar_t has been found.
There is something wrong here.
Can you check the status of macros HAVE_WCHAR_T and HAVE_WCHAR_H in the file
config.h generated by configure?
How can I check the status?
In my MinGW include folder, wchar.h header file is present.
On Saturday, February 16, 2013 04:01:42 PM Klo wrote:
Check the file "config.h" which is generated by the script "configure".
The #defines of interest are HAVE_WCHAR_T and HAVE_WCHAR_H
I attached the file.
Here is http link to it: http://pastebin.com/raw.php?i=2aHFnnKb
On Sunday, February 17, 2013 07:57:58 AM Klo wrote:
This seems to be the file "config/config.h.in" and not the file "config.h".
At least some of these macros should be defined.