FF fails to build with system libjpeg-turbo 1.3.90, missing a JPP macro declaration: gcc -o iccjpeg.o -c -I../../dist/system_wrappers -include /builddir/build/BUILD/firefox-33.0/mozilla-release/config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -DNO_NSPR_10_SUPPORT -I/builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders -I. -I/builddir/build/BUILD/firefox-33.0/mozilla-release/image/src -I../../dist/include -I/usr/include/nspr4 -I/usr/include/nss3 -I/builddir/build/BUILD/firefox-33.0/mozilla-release/objdir/dist/include -I/usr/include/pixman-1 -fPIC -include ../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/iccjpeg.o.pp -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -Wcast-align -O2 -g -pipe -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wformat-security -Wformat -Werror=format-security -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pthread -pipe -DNDEBUG -DTRIMMED -g -Os -freorder-blocks -fomit-frame-pointer /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.c nsBMPDecoder.o In file included from /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.c:24:0: /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.h:42:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'JPP' extern void setup_read_icc_profile JPP((j_decompress_ptr cinfo)); ^ /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.h:61:33: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'JPP' extern boolean read_icc_profile JPP((j_decompress_ptr cinfo, ^ /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.c: In function 'read_icc_profile': /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.c:170:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token JOCTET FAR *src_ptr; ^ /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.c:170:19: error: 'src_ptr' undeclared (first use in this function) JOCTET FAR *src_ptr; ^ /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.c:170:19: note: each undeclared identifier is reported only once for each function it appears in /builddir/build/BUILD/firefox-33.0/mozilla-release/image/decoders/iccjpeg.c:171:7: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] JOCTET *dst_ptr; ^
The macros were removed because modern compilers do not need them. The macros were included originally in libjpeg because some very old compilers did not support prototype parameters. Those non-ANSI compilers are no longer supported by us, and I'm pretty sure that the packages that are failing to build no longer support non-ANSI compilers either (if they ever did.) The packages in question most likely used the JPP() and JMETHOD() macros just because they were trying to follow the format of the libjpeg header files. There is no way I could have known that 3rd party packages would be using those macros. Such a practice was never necessary, nor do I personally think it was very good form on the part of the 3rd party packages. If those packages actually did need to support ancient non-ANSI compilers, then they should have taken steps to ensure their own local support for those compilers instead of using libjpeg's macros. That being said, I do accept the argument that, since those macros were in the exposed header files, they could be considered part of the API. Ugh. That's what I get for trying to do the right thing. I've checked in a patch to libjpeg-turbo SVN trunk and branches/1.4.x that should resolve this. And really with the use of the FAR macro?! Does Firefox really support MS-DOS?
Firefox is using libjpeg-turbo 1.4 per bug #1061240
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
3 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.