From: "Lin Sun" <Lin.Sun@mediatek.com>
To: 19050@debbugs.gnu.org
Subject: bug#19050: Fail compile emacs with jpeg library on MinGW32
Date: Fri, 14 Nov 2014 00:58:49 +0000 [thread overview]
Message-ID: <BFD593E723C28F4686C2E8BB3A5F4DA06BDDECB1@MTKMBS33N1.mediatek.inc> (raw)
[-- Attachment #1: Type: text/plain, Size: 6433 bytes --]
Hi Pals:
Fail when compile emacs with jpeg library on MinGW32, then change the
code to follow clip will compile successful,
@@ -6189,7 +6189,7 @@ jpeg_image_p (Lisp_Object object)
different name. This name, jpeg_boolean, remains in effect through
the rest of image.c.
*/
-#if defined CYGWIN && defined HAVE_NTGUI
+#if defined HAVE_NTGUI
#define boolean jpeg_boolean
#endif
#include <jpeglib.h>
and the configure command is:
../emacs-24.4.src/configure --with-w32
PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/d/MinGW/lib/pkgconfig:/d/MinGW/mingw32/lib/pkgconfig:/d/MinGW/sys-root/lib/pkgconfig
CFLAGS="-I/d/MinGW/sys-root/include -I/mingw/include
-I/mingw/mingw32/include" LDFLAGS="-L/d/MinGW/sys-root/lib -L/mingw/lib
-L/mingw/mingw32/lib"
The error message without modification as follow:
gcc -std=gnu99 -c -mtune=pentium4 -DUSE_CRT_DLL=1 -I /d/mydata/home/user123/work-dev/emacs-24.4.mingw/../emacs-24.4.src/nt/inc -Demacs -I. -I../../emacs-24.4.src/src -I../lib -I../../emacs-24.4.src/src/../lib -mtune=pentium4 -Id:/MinGW/sys-root/include/libxml2 -MMD -MF deps/image.d -MP -I/d/MinGW/sys-root/include -I/mingw/include -I/mingw/mingw32/include ../../emacs-24.4.src/src/image.c
../../emacs-24.4.src/src/image.c:1843:68: error: expected declaration specifiers or '...' before '*' token
#define DEF_IMGLIB_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args
^
../../emacs-24.4.src/src/image.c:6203:1: note: in expansion of macro 'DEF_IMGLIB_FN'
DEF_IMGLIB_FN (boolean, jpeg_start_decompress, (j_decompress_ptr));
^
../../emacs-24.4.src/src/image.c:1843:68: error: expected declaration specifiers or '...' before '*' token
#define DEF_IMGLIB_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args
^
../../emacs-24.4.src/src/image.c:6204:1: note: in expansion of macro 'DEF_IMGLIB_FN'
DEF_IMGLIB_FN (boolean, jpeg_finish_decompress, (j_decompress_ptr));
^
../../emacs-24.4.src/src/image.c:6206:58: error: unknown type name 'boolean'
DEF_IMGLIB_FN (int, jpeg_read_header, (j_decompress_ptr, boolean));
^
../../emacs-24.4.src/src/image.c:1843:79: note: in definition of macro 'DEF_IMGLIB_FN'
#define DEF_IMGLIB_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args
^
../../emacs-24.4.src/src/image.c:1843:68: error: expected declaration specifiers or '...' before '*' token
#define DEF_IMGLIB_FN(rettype,func,args) static rettype (FAR CDECL *fn_##func)args
^
../../emacs-24.4.src/src/image.c:6209:1: note: in expansion of macro 'DEF_IMGLIB_FN'
DEF_IMGLIB_FN (boolean, jpeg_resync_to_restart, (j_decompress_ptr, int));
^
../../emacs-24.4.src/src/image.c: In function 'init_jpeg_functions':
../../emacs-24.4.src/src/image.c:1847:5: error: 'fn_jpeg_finish_decompress' undeclared (first use in this function)
fn_##func = (void *) GetProcAddress (lib, #func); \
^
../../emacs-24.4.src/src/image.c:6219:3: note: in expansion of macro 'LOAD_IMGLIB_FN'
LOAD_IMGLIB_FN (library, jpeg_finish_decompress);
^
../../emacs-24.4.src/src/image.c:1847:5: note: each undeclared identifier is reported only once for each function it appears in
fn_##func = (void *) GetProcAddress (lib, #func); \
^
../../emacs-24.4.src/src/image.c:6219:3: note: in expansion of macro 'LOAD_IMGLIB_FN'
LOAD_IMGLIB_FN (library, jpeg_finish_decompress);
^
../../emacs-24.4.src/src/image.c:1847:5: error: 'fn_jpeg_start_decompress' undeclared (first use in this function)
fn_##func = (void *) GetProcAddress (lib, #func); \
^
../../emacs-24.4.src/src/image.c:6221:3: note: in expansion of macro 'LOAD_IMGLIB_FN'
LOAD_IMGLIB_FN (library, jpeg_start_decompress);
^
../../emacs-24.4.src/src/image.c:1847:5: error: 'fn_jpeg_read_header' undeclared (first use in this function)
fn_##func = (void *) GetProcAddress (lib, #func); \
^
../../emacs-24.4.src/src/image.c:6222:3: note: in expansion of macro 'LOAD_IMGLIB_FN'
LOAD_IMGLIB_FN (library, jpeg_read_header);
^
../../emacs-24.4.src/src/image.c:1847:5: error: 'fn_jpeg_resync_to_restart' undeclared (first use in this function)
fn_##func = (void *) GetProcAddress (lib, #func); \
^
../../emacs-24.4.src/src/image.c:6226:3: note: in expansion of macro 'LOAD_IMGLIB_FN'
LOAD_IMGLIB_FN (library, jpeg_resync_to_restart);
^
../../emacs-24.4.src/src/image.c: At top level:
../../emacs-24.4.src/src/image.c:6233:1: error: unknown type name 'boolean'
jpeg_resync_to_restart_wrapper (j_decompress_ptr cinfo, int desired)
^
../../emacs-24.4.src/src/image.c: In function 'jpeg_resync_to_restart_wrapper':
../../emacs-24.4.src/src/image.c:6235:3: warning: implicit declaration of function 'fn_jpeg_resync_to_restart' [-Wimplicit-function-declaration]
return fn_jpeg_resync_to_restart (cinfo, desired);
^
../../emacs-24.4.src/src/image.c: At top level:
../../emacs-24.4.src/src/image.c:6303:1: error: unknown type name 'boolean'
our_memory_fill_input_buffer (j_decompress_ptr cinfo)
^
../../emacs-24.4.src/src/image.c:6367:3: error: unknown type name 'boolean'
boolean finished;
^
../../emacs-24.4.src/src/image.c:6382:1: error: unknown type name 'boolean'
our_stdio_fill_input_buffer (j_decompress_ptr cinfo)
^
../../emacs-24.4.src/src/image.c: In function 'jpeg_load_body':
../../emacs-24.4.src/src/image.c:6561:3: warning: implicit declaration of function 'fn_jpeg_read_header' [-Wimplicit-function-declaration]
fn_jpeg_read_header (&mgr->cinfo, 1);
^
../../emacs-24.4.src/src/image.c:6566:3: warning: implicit declaration of function 'fn_jpeg_start_decompress' [-Wimplicit-function-declaration]
fn_jpeg_start_decompress (&mgr->cinfo);
^
../../emacs-24.4.src/src/image.c:6634:3: warning: implicit declaration of function 'fn_jpeg_finish_decompress' [-Wimplicit-function-declaration]
fn_jpeg_finish_decompress (&mgr->cinfo);
^
make[1]: *** [image.o] Error 1
make[1]: Leaving directory `/d/mydata/home/user123/work-dev/emacs-24.4.mingw/src'
make: *** [src] Error 2
Best Regards
Sunline
[-- Attachment #2: Type: text/html, Size: 18868 bytes --]
next reply other threads:[~2014-11-14 0:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 0:58 Lin Sun [this message]
2014-11-14 6:02 ` bug#19050: Fail compile emacs with jpeg library on MinGW32 Eli Zaretskii
2014-11-17 1:15 ` Lin Sun
2014-11-17 3:48 ` Eli Zaretskii
2014-11-18 0:30 ` Lin Sun
2014-11-18 3:39 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BFD593E723C28F4686C2E8BB3A5F4DA06BDDECB1@MTKMBS33N1.mediatek.inc \
--to=lin.sun@mediatek.com \
--cc=19050@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).