b***@artifex.com
2017-07-30 10:23:35 UTC
http://bugs.ghostscript.com/show_bug.cgi?id=698307
Bug ID: 698307
Summary: Only older version of Visual Studio don't have
stdint.h
Product: MuPDF
Version: master
Hardware: PC
OS: Windows 7
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: fitz
Assignee: mupdf-***@artifex.com
Reporter: ***@gmail.com
QA Contact: gs-***@ghostscript.com
Word Size: ---
When building the latest commit (7a0877e9a51fb425389ab2eb3a55ba4036999771)
under MinGW, if I run:
make HAVE_GLFW=no
I get:
[...]
CC build/release/source/fitz/load-jpx.o
In file included from thirdparty/openjpeg/src/lib/openjp2/openjpeg.h:119:0,
from source/fitz/load-jpx.c:454:
thirdparty/openjpeg/src/lib/openjp2/opj_stdint.h:43:27: error: conflicting
types for 'int32_t'
typedef signed __int32 int32_t;
^~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\stdint.h:9:0,
from include/mupdf/fitz/system.h:196,
from include/mupdf/fitz.h:10,
from source/fitz/load-jpx.c:1:
c:\mingw\include\stdint.h:62:15: note: previous declaration of 'int32_t'
was here
typedef int int32_t;
^~~~~~~
In file included from thirdparty/openjpeg/src/lib/openjp2/openjpeg.h:119:0,
from source/fitz/load-jpx.c:454:
thirdparty/openjpeg/src/lib/openjp2/opj_stdint.h:44:27: error: conflicting
types for 'uint32_t'
typedef unsigned __int32 uint32_t;
^~~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\stdint.h:9:0,
from include/mupdf/fitz/system.h:196,
from include/mupdf/fitz.h:10,
from source/fitz/load-jpx.c:1:
c:\mingw\include\stdint.h:63:19: note: previous declaration of 'uint32_t'
was here
typedef unsigned uint32_t;
^~~~~~~~
make: *** [build/release/source/fitz/load-jpx.o] Error 1
and the build fails.
It seems that line 449 in source/fitz/load-jpx.c assumes that all toolchains
targeting Windows lack the stdint.h include file. This is not true of the MinGW
toolchain. Also, according to https://stackoverflow.com/a/2628014/2910230, and
other places on the internet, it isn't even true of Visual Studio, starting
with VS2010.
If I replace line 449 in source/fitz/load-jpx.c:
#if !defined(_WIN32) && !defined(_WIN64)
with:
#if !defined(_MSC_VER) || _MSC_VER >= 1600
the build succeeds for me under MinGW.
I am also able to build MuPDF, with this change, in VS2013 Express, both for
the Win32 and the x64 targets.
I do not have a pre-2010 version of Visual Studio, to test how this change
would affect those build environments.
Bug ID: 698307
Summary: Only older version of Visual Studio don't have
stdint.h
Product: MuPDF
Version: master
Hardware: PC
OS: Windows 7
Status: UNCONFIRMED
Severity: normal
Priority: P4
Component: fitz
Assignee: mupdf-***@artifex.com
Reporter: ***@gmail.com
QA Contact: gs-***@ghostscript.com
Word Size: ---
When building the latest commit (7a0877e9a51fb425389ab2eb3a55ba4036999771)
under MinGW, if I run:
make HAVE_GLFW=no
I get:
[...]
CC build/release/source/fitz/load-jpx.o
In file included from thirdparty/openjpeg/src/lib/openjp2/openjpeg.h:119:0,
from source/fitz/load-jpx.c:454:
thirdparty/openjpeg/src/lib/openjp2/opj_stdint.h:43:27: error: conflicting
types for 'int32_t'
typedef signed __int32 int32_t;
^~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\stdint.h:9:0,
from include/mupdf/fitz/system.h:196,
from include/mupdf/fitz.h:10,
from source/fitz/load-jpx.c:1:
c:\mingw\include\stdint.h:62:15: note: previous declaration of 'int32_t'
was here
typedef int int32_t;
^~~~~~~
In file included from thirdparty/openjpeg/src/lib/openjp2/openjpeg.h:119:0,
from source/fitz/load-jpx.c:454:
thirdparty/openjpeg/src/lib/openjp2/opj_stdint.h:44:27: error: conflicting
types for 'uint32_t'
typedef unsigned __int32 uint32_t;
^~~~~~~~
In file included from c:\mingw\lib\gcc\mingw32\6.3.0\include\stdint.h:9:0,
from include/mupdf/fitz/system.h:196,
from include/mupdf/fitz.h:10,
from source/fitz/load-jpx.c:1:
c:\mingw\include\stdint.h:63:19: note: previous declaration of 'uint32_t'
was here
typedef unsigned uint32_t;
^~~~~~~~
make: *** [build/release/source/fitz/load-jpx.o] Error 1
and the build fails.
It seems that line 449 in source/fitz/load-jpx.c assumes that all toolchains
targeting Windows lack the stdint.h include file. This is not true of the MinGW
toolchain. Also, according to https://stackoverflow.com/a/2628014/2910230, and
other places on the internet, it isn't even true of Visual Studio, starting
with VS2010.
If I replace line 449 in source/fitz/load-jpx.c:
#if !defined(_WIN32) && !defined(_WIN64)
with:
#if !defined(_MSC_VER) || _MSC_VER >= 1600
the build succeeds for me under MinGW.
I am also able to build MuPDF, with this change, in VS2013 Express, both for
the Win32 and the x64 targets.
I do not have a pre-2010 version of Visual Studio, to test how this change
would affect those build environments.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are receiving this mail because:
You are the QA Contact for the bug.