unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later"
@ 2015-04-14 16:47 白井彰
  2015-04-15 12:25 ` Petr Hracek
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: 白井彰 @ 2015-04-14 16:47 UTC (permalink / raw)
  To: 20332; +Cc: Akira Shirai

With jpeg-6b, configure in Emacs 24.5 says "WARNING: libjpeg found,
but not version 6b or later".

The host system type is i386-pc-solaris2.10, and the C compiler is SUN C.
In config.log the cc says:
"conftest.c", line 86: invalid input token: 6b
cc: acomp failed for conftest.c

% cat -n /usr/include/jpeglib.h | sed -n 33p
    33  #define JPEG_LIB_VERSION  62    /* Version 6b */

% cat emacs-24.4.91.tar | tar xfp -
% (cd emacs-24.4.91; ./configure --with-gif=no | fgrep -i jpeg > configure_jpeg_emacs-24.4.91)

% gzcat emacs-24.5.tar.gz | tar xfp -
% (cd emacs-24.5; ./configure --with-gif=no | fgrep -i jpeg > configure_jpeg_emacs-24.5)
configure: WARNING: libjpeg found, but not version 6b or later
configure: error: The following required libraries were not found:
     libjpeg
Maybe some development libraries/packages are missing?
If you don't want to link with them give
     --with-jpeg=no
as options to configure

% (cd emacs-24.4.91; cat -n config.log | sed -n 4683,4688p)
  4683  configure:13880: checking for jpeg_destroy_compress in -ljpeg
  4684  configure:13905: cc -D_STDC_C99= -o conftest -I/usr/openwin/include -g -O -I/usr/openwin/include     -L/usr/openwin/lib conftest.c -ljpeg  -lXext -lXmu -lXt -lSM -lICE -lX11 -lpthread -lsocket -lnsl  >&5
  4685  "conftest.c", line 96: warning: statement not reached
  4686  configure:13905: $? = 0
  4687  configure:13914: result: yes
  4688  configure:13995: checking png.h usability

% (cd emacs-24.5; cat -n config.log | sed -n 4683,4691p)
  4683  configure:13882: checking for jpeg_destroy_compress in -ljpeg
  4684  configure:13907: cc -D_STDC_C99= -o conftest -I/usr/openwin/include -g -O -I/usr/openwin/include     -L/usr/openwin/lib conftest.c -ljpeg  -lXext -lXmu -lXt -lSM -lICE -lX11 -lpthread -lsocket -lnsl  >&5
  4685  "conftest.c", line 96: warning: statement not reached
  4686  configure:13907: $? = 0
  4687  configure:13916: result: yes
  4688  "conftest.c", line 86: invalid input token: 6b
  4689  cc: acomp failed for conftest.c
  4690  configure:13943: WARNING: libjpeg found, but not version 6b or later
  4691  configure:13999: checking png.h usability

% (cd emacs-24.5; ./configure --with-gif=no)
checking for xcrun... no
checking for a BSD-compatible install... /opt/sfw/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/sfw/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking for gcc... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of cc... none
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
checking for egrep... /usr/xpg4/bin/grep -E
checking for Minix Amsterdam compiler... no
checking for ar... ar
checking for ranlib... ranlib
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for cc option to accept ISO C99... -D_STDC_C99=
checking for cc -D_STDC_C99= option to accept ISO Standard C... (cached) -D_STDC_C99=
checking whether cc -D_STDC_C99= accepts -g3... no
checking whether cc -D_STDC_C99= accepts -O... yes
checking whether the compiler is clang... no
checking whether ln -s works for files in the same directory... yes
checking for install-info... :
checking for gzip... /bin/gzip
checking for makeinfo... /home/shirai/bin/makeinfo
checking for -znocombreloc... no
checking whether addresses are sanitized... no
checking for pkg-config... /bin/pkg-config
checking for machine/soundcard.h... no
checking for sys/soundcard.h... no
checking for soundcard.h... no
checking for mmsystem.h... no
checking for _oss_ioctl in -lossaudio... no
checking for alsa >= 1.0.0... no
checking for sys/systeminfo.h... yes
checking for coff.h... no
checking for pty.h... no
checking for sys/resource.h... yes
checking for sys/utsname.h... yes
checking for pwd.h... yes
checking for utmp.h... yes
checking for util.h... no
checking for sys/socket.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for pthread.h... yes
checking for malloc/malloc.h... no
checking for maillock.h... yes
checking for sys/un.h... yes
checking for dirent.h... yes
checking for execinfo.h... no
checking for stdio_ext.h... yes
checking for getopt.h... yes
checking for sys/time.h... yes
checking for wchar.h... yes
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for sys/select.h... yes
checking for sys/stat.h... (cached) yes
checking for utime.h... yes
checking if personality LINUX32 can be set... no
checking for term.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether sys_siglist is declared... no
checking whether __sys_siglist is declared... no
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for net/if.h... yes
checking for ifaddrs.h... no
checking for net/if_dl.h... yes
checking for struct ifreq.ifr_flags... yes
checking for struct ifreq.ifr_hwaddr... no
checking for struct ifreq.ifr_netmask... no
checking for struct ifreq.ifr_broadaddr... yes
checking for struct ifreq.ifr_addr... yes
checking for struct ifreq.ifr_addr.sa_len... no
checking for long file names... yes
checking for X... libraries /usr/openwin/lib, headers /usr/openwin/include
checking whether malloc is Doug Lea style... no
checking for getpagesize... yes
checking for working mmap... yes
checking for dnet_ntoa in -ldnet... no
checking for main in -lXbsd... no
checking for pthread_self in -lpthread... yes
checking for cma_open in -lpthreads... no
checking for Xkb... yes
checking for XrmSetDatabase... yes
checking for XScreenResourceString... yes
checking for XScreenNumberOfScreen... yes
checking X11 version 6... 6 or newer
checking for librsvg-2.0 >= 2.11.0... no
checking for Wand >= 6.3.5 Wand != 6.8.2... no
checking for gtk+-3.0 >= 3.0 glib-2.0 >= 2.28... no
checking for gtk+-2.0 >= 2.10 glib-2.0 >= 2.10... no
checking for dbus-1 >= 1.0... no
checking for gio-2.0 >= 2.26... no
checking for gconf-2.0 >= 2.13... no
checking for lgetfilecon in -lselinux... no
checking for gnutls >= 3.0.0... no
checking for gnutls >= 2.6.6... no
checking for gio-2.0 >= 2.24... no
checking sys/inotify.h usability... no
checking sys/inotify.h presence... no
checking for sys/inotify.h... no
checking for xaw3d... no
checking for libXaw... yes; using Lucid toolkit
checking X11 toolkit version... 6 or newer
checking for XmuConvertStandardSelection in -lXmu... yes
checking for XShapeQueryExtension in -lXext... yes
checking for fontconfig >= 2.2.0... yes CFLAGS=' ' LIBS='-lfontconfig  '
checking for xft >= 0.13.0... yes CFLAGS='-I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2  ' LIBS='-R/usr/openwin/lib -R/usr/sfw/lib -R/usr/openwin/lib:/usr/openwin/sfw/lib -L/usr/openwin/lib -L/usr/sfw/lib -L/usr/openwin/sfw/lib -lXft -lfreetype -lXrender -lfontconfig  '
checking for XRenderQueryExtension in -lXrender... no
checking X11/xpm.h usability... yes
checking X11/xpm.h presence... yes
checking for X11/xpm.h... yes
checking for XpmReadFileToPixmap in -lXpm... yes
checking for XpmReturnAllocPixels preprocessor define... yes
checking jerror.h usability... yes
checking jerror.h presence... yes
checking for jerror.h... yes
checking for jpeg_destroy_compress in -ljpeg... yes
configure: WARNING: libjpeg found, but not version 6b or later
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_get_channels in -lpng... yes
checking whether png_longjmp is declared... no
checking for library containing inflateEnd... -lz
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for TIFFGetVersion in -ltiff... yes
configure: error: The following required libraries were not found:
     libjpeg
Maybe some development libraries/packages are missing?
If you don't want to link with them give
     --with-jpeg=no
as options to configure

% which cc
/opt/SUNWspro/bin/cc
% sh

$ echo version=62 > aaa_emacs-24.4.91.c; cc -E aaa_emacs-24.4.91.c
# 1 "aaa_emacs-24.4.91.c"
version=62
#ident "acomp: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12"
$ echo $?
0

$ echo 'version 6b or later' > aaa_emacs-24.5.c; cc -E aaa_emacs-24.5.c
# 1 "aaa_emacs-24.5.c"
"aaa_emacs-24.5.c", line 1: invalid input token: 6b
version  6b or later
#ident "acomp: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12"
cc: acomp failed for aaa_emacs-24.5.c
$ echo $?
2






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later"
  2015-04-14 16:47 bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later" 白井彰
@ 2015-04-15 12:25 ` Petr Hracek
  2015-04-15 15:36   ` Glenn Morris
  2015-04-15 17:59 ` Glenn Morris
  2015-04-16  1:37 ` Paul Eggert
  2 siblings, 1 reply; 7+ messages in thread
From: Petr Hracek @ 2015-04-15 12:25 UTC (permalink / raw)
  To: 白井彰, 20332

I guess that it was already solved in bug 20124.

On 04/14/2015 06:47 PM, 白井彰 wrote:
> With jpeg-6b, configure in Emacs 24.5 says "WARNING: libjpeg found,
> but not version 6b or later".
>
> The host system type is i386-pc-solaris2.10, and the C compiler is SUN C.
> In config.log the cc says:
> "conftest.c", line 86: invalid input token: 6b
> cc: acomp failed for conftest.c
>
> % cat -n /usr/include/jpeglib.h | sed -n 33p
>      33  #define JPEG_LIB_VERSION  62    /* Version 6b */
>
> % cat emacs-24.4.91.tar | tar xfp -
> % (cd emacs-24.4.91; ./configure --with-gif=no | fgrep -i jpeg > configure_jpeg_emacs-24.4.91)
>
> % gzcat emacs-24.5.tar.gz | tar xfp -
> % (cd emacs-24.5; ./configure --with-gif=no | fgrep -i jpeg > configure_jpeg_emacs-24.5)
> configure: WARNING: libjpeg found, but not version 6b or later
> configure: error: The following required libraries were not found:
>       libjpeg
> Maybe some development libraries/packages are missing?
> If you don't want to link with them give
>       --with-jpeg=no
> as options to configure
>
> % (cd emacs-24.4.91; cat -n config.log | sed -n 4683,4688p)
>    4683  configure:13880: checking for jpeg_destroy_compress in -ljpeg
>    4684  configure:13905: cc -D_STDC_C99= -o conftest -I/usr/openwin/include -g -O -I/usr/openwin/include     -L/usr/openwin/lib conftest.c -ljpeg  -lXext -lXmu -lXt -lSM -lICE -lX11 -lpthread -lsocket -lnsl  >&5
>    4685  "conftest.c", line 96: warning: statement not reached
>    4686  configure:13905: $? = 0
>    4687  configure:13914: result: yes
>    4688  configure:13995: checking png.h usability
>
> % (cd emacs-24.5; cat -n config.log | sed -n 4683,4691p)
>    4683  configure:13882: checking for jpeg_destroy_compress in -ljpeg
>    4684  configure:13907: cc -D_STDC_C99= -o conftest -I/usr/openwin/include -g -O -I/usr/openwin/include     -L/usr/openwin/lib conftest.c -ljpeg  -lXext -lXmu -lXt -lSM -lICE -lX11 -lpthread -lsocket -lnsl  >&5
>    4685  "conftest.c", line 96: warning: statement not reached
>    4686  configure:13907: $? = 0
>    4687  configure:13916: result: yes
>    4688  "conftest.c", line 86: invalid input token: 6b
>    4689  cc: acomp failed for conftest.c
>    4690  configure:13943: WARNING: libjpeg found, but not version 6b or later
>    4691  configure:13999: checking png.h usability
>
> % (cd emacs-24.5; ./configure --with-gif=no)
> checking for xcrun... no
> checking for a BSD-compatible install... /opt/sfw/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /opt/sfw/bin/mkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether make supports nested variables... yes
> checking build system type... i386-pc-solaris2.10
> checking host system type... i386-pc-solaris2.10
> checking for gcc... no
> checking for cc... cc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... no
> checking whether cc accepts -g... yes
> checking for cc option to accept ISO C89... none needed
> checking whether cc understands -c and -o together... yes
> checking for style of include used by make... GNU
> checking dependency style of cc... none
> checking how to run the C preprocessor... cc -E
> checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
> checking for egrep... /usr/xpg4/bin/grep -E
> checking for Minix Amsterdam compiler... no
> checking for ar... ar
> checking for ranlib... ranlib
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking minix/config.h usability... no
> checking minix/config.h presence... no
> checking for minix/config.h... no
> checking whether it is safe to define __EXTENSIONS__... yes
> checking whether _XOPEN_SOURCE should be defined... no
> checking for special C compiler options needed for large files... no
> checking for _FILE_OFFSET_BITS value needed for large files... 64
> checking for cc option to accept ISO C99... -D_STDC_C99=
> checking for cc -D_STDC_C99= option to accept ISO Standard C... (cached) -D_STDC_C99=
> checking whether cc -D_STDC_C99= accepts -g3... no
> checking whether cc -D_STDC_C99= accepts -O... yes
> checking whether the compiler is clang... no
> checking whether ln -s works for files in the same directory... yes
> checking for install-info... :
> checking for gzip... /bin/gzip
> checking for makeinfo... /home/shirai/bin/makeinfo
> checking for -znocombreloc... no
> checking whether addresses are sanitized... no
> checking for pkg-config... /bin/pkg-config
> checking for machine/soundcard.h... no
> checking for sys/soundcard.h... no
> checking for soundcard.h... no
> checking for mmsystem.h... no
> checking for _oss_ioctl in -lossaudio... no
> checking for alsa >= 1.0.0... no
> checking for sys/systeminfo.h... yes
> checking for coff.h... no
> checking for pty.h... no
> checking for sys/resource.h... yes
> checking for sys/utsname.h... yes
> checking for pwd.h... yes
> checking for utmp.h... yes
> checking for util.h... no
> checking for sys/socket.h... yes
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for sys/param.h... yes
> checking for pthread.h... yes
> checking for malloc/malloc.h... no
> checking for maillock.h... yes
> checking for sys/un.h... yes
> checking for dirent.h... yes
> checking for execinfo.h... no
> checking for stdio_ext.h... yes
> checking for getopt.h... yes
> checking for sys/time.h... yes
> checking for wchar.h... yes
> checking for stdint.h... (cached) yes
> checking for inttypes.h... (cached) yes
> checking for sys/select.h... yes
> checking for sys/stat.h... (cached) yes
> checking for utime.h... yes
> checking if personality LINUX32 can be set... no
> checking for term.h... yes
> checking whether time.h and sys/time.h may both be included... yes
> checking whether sys_siglist is declared... no
> checking whether __sys_siglist is declared... no
> checking for sys/wait.h that is POSIX.1 compatible... yes
> checking for net/if.h... yes
> checking for ifaddrs.h... no
> checking for net/if_dl.h... yes
> checking for struct ifreq.ifr_flags... yes
> checking for struct ifreq.ifr_hwaddr... no
> checking for struct ifreq.ifr_netmask... no
> checking for struct ifreq.ifr_broadaddr... yes
> checking for struct ifreq.ifr_addr... yes
> checking for struct ifreq.ifr_addr.sa_len... no
> checking for long file names... yes
> checking for X... libraries /usr/openwin/lib, headers /usr/openwin/include
> checking whether malloc is Doug Lea style... no
> checking for getpagesize... yes
> checking for working mmap... yes
> checking for dnet_ntoa in -ldnet... no
> checking for main in -lXbsd... no
> checking for pthread_self in -lpthread... yes
> checking for cma_open in -lpthreads... no
> checking for Xkb... yes
> checking for XrmSetDatabase... yes
> checking for XScreenResourceString... yes
> checking for XScreenNumberOfScreen... yes
> checking X11 version 6... 6 or newer
> checking for librsvg-2.0 >= 2.11.0... no
> checking for Wand >= 6.3.5 Wand != 6.8.2... no
> checking for gtk+-3.0 >= 3.0 glib-2.0 >= 2.28... no
> checking for gtk+-2.0 >= 2.10 glib-2.0 >= 2.10... no
> checking for dbus-1 >= 1.0... no
> checking for gio-2.0 >= 2.26... no
> checking for gconf-2.0 >= 2.13... no
> checking for lgetfilecon in -lselinux... no
> checking for gnutls >= 3.0.0... no
> checking for gnutls >= 2.6.6... no
> checking for gio-2.0 >= 2.24... no
> checking sys/inotify.h usability... no
> checking sys/inotify.h presence... no
> checking for sys/inotify.h... no
> checking for xaw3d... no
> checking for libXaw... yes; using Lucid toolkit
> checking X11 toolkit version... 6 or newer
> checking for XmuConvertStandardSelection in -lXmu... yes
> checking for XShapeQueryExtension in -lXext... yes
> checking for fontconfig >= 2.2.0... yes CFLAGS=' ' LIBS='-lfontconfig  '
> checking for xft >= 0.13.0... yes CFLAGS='-I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2  ' LIBS='-R/usr/openwin/lib -R/usr/sfw/lib -R/usr/openwin/lib:/usr/openwin/sfw/lib -L/usr/openwin/lib -L/usr/sfw/lib -L/usr/openwin/sfw/lib -lXft -lfreetype -lXrender -lfontconfig  '
> checking for XRenderQueryExtension in -lXrender... no
> checking X11/xpm.h usability... yes
> checking X11/xpm.h presence... yes
> checking for X11/xpm.h... yes
> checking for XpmReadFileToPixmap in -lXpm... yes
> checking for XpmReturnAllocPixels preprocessor define... yes
> checking jerror.h usability... yes
> checking jerror.h presence... yes
> checking for jerror.h... yes
> checking for jpeg_destroy_compress in -ljpeg... yes
> configure: WARNING: libjpeg found, but not version 6b or later
> checking png.h usability... yes
> checking png.h presence... yes
> checking for png.h... yes
> checking for png_get_channels in -lpng... yes
> checking whether png_longjmp is declared... no
> checking for library containing inflateEnd... -lz
> checking tiffio.h usability... yes
> checking tiffio.h presence... yes
> checking for tiffio.h... yes
> checking for TIFFGetVersion in -ltiff... yes
> configure: error: The following required libraries were not found:
>       libjpeg
> Maybe some development libraries/packages are missing?
> If you don't want to link with them give
>       --with-jpeg=no
> as options to configure
>
> % which cc
> /opt/SUNWspro/bin/cc
> % sh
>
> $ echo version=62 > aaa_emacs-24.4.91.c; cc -E aaa_emacs-24.4.91.c
> # 1 "aaa_emacs-24.4.91.c"
> version=62
> #ident "acomp: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12"
> $ echo $?
> 0
>
> $ echo 'version 6b or later' > aaa_emacs-24.5.c; cc -E aaa_emacs-24.5.c
> # 1 "aaa_emacs-24.5.c"
> "aaa_emacs-24.5.c", line 1: invalid input token: 6b
> version  6b or later
> #ident "acomp: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12"
> cc: acomp failed for aaa_emacs-24.5.c
> $ echo $?
> 2
>
>
>
>


-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later"
  2015-04-15 12:25 ` Petr Hracek
@ 2015-04-15 15:36   ` Glenn Morris
  0 siblings, 0 replies; 7+ messages in thread
From: Glenn Morris @ 2015-04-15 15:36 UTC (permalink / raw)
  To: Petr Hracek; +Cc: okshirai, 20332

Petr Hracek wrote:

> I guess that it was already solved in bug 20124.

No, I guess this problem was in fact caused by the change made for 20124.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later"
  2015-04-14 16:47 bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later" 白井彰
  2015-04-15 12:25 ` Petr Hracek
@ 2015-04-15 17:59 ` Glenn Morris
  2015-04-16 16:42   ` 白井彰
  2015-04-16  1:37 ` Paul Eggert
  2 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2015-04-15 17:59 UTC (permalink / raw)
  To: okshirai; +Cc: 20332


> $ echo 'version 6b or later' > aaa_emacs-24.5.c; cc -E aaa_emacs-24.5.c
> # 1 "aaa_emacs-24.5.c"
> "aaa_emacs-24.5.c", line 1: invalid input token: 6b
> version  6b or later
> #ident "acomp: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12"
> cc: acomp failed for aaa_emacs-24.5.c
> $ echo $?
> 2

Funnily enough, our own etc/PROBLEMS file used to contain a solution for
this very issue:

    *** `configure' fails with ``"junk.c", line 660: invalid input token: 8.elc''

    The final stage of the Emacs configure process uses the C preprocessor
    to generate the Makefiles.  Errors of this form can occur if the C
    preprocessor inserts extra whitespace into its output.  The solution
    is to find the switches that stop your preprocessor from inserting extra
    whitespace, add them to CPPFLAGS, and re-run configure.  For example,
    this error can occur on Solaris 10 when using the Sun Studio compiler
    ``Sun C 5.8'' with its preprocessor CPP="/opt/SUNWspro/bin/cc -E".
    The relevant switch in this case is "-Xs" (``compile assuming
    (pre-ANSI) K & R C style code'').

And indeed adding -Xs seems to avoid the issue.

I don't think this is a real solution to this case,
just a historical curiosity. :)





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later"
  2015-04-14 16:47 bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later" 白井彰
  2015-04-15 12:25 ` Petr Hracek
  2015-04-15 17:59 ` Glenn Morris
@ 2015-04-16  1:37 ` Paul Eggert
  2015-04-16 16:40   ` 白井彰
  2 siblings, 1 reply; 7+ messages in thread
From: Paul Eggert @ 2015-04-16  1:37 UTC (permalink / raw)
  To: 白井彰; +Cc: 20332-done

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

Thanks for the bug report.  This area of 'configure.ac' has been a source of 
trouble recently.  I rewrote it, installed the attached patch into the master 
branch, and am marking the bug as done.

[-- Attachment #2: 0001-Port-jpeg-configuration-to-Solaris-10-with-Sun-C.patch --]
[-- Type: text/x-patch, Size: 3533 bytes --]

From fdf532b9c915ad9ba72155646d29d0f530fd72ec Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 15 Apr 2015 18:30:01 -0700
Subject: [PATCH] Port jpeg configuration to Solaris 10 with Sun C

* configure.ac: Check for jpeglib 6b by trying to link it, instead
of relying on cpp magic that has problems in practice.  Check for
both jpeglib.h and jerror.h features.  Remove special case for
mingw32, which should no longer be needed (and if it were needed,
should now be addressable by hotwiring emacs_cv_jpeglib).
Fixes: bug#20332
---
 configure.ac | 76 +++++++++++++++++++++++++++---------------------------------
 1 file changed, 34 insertions(+), 42 deletions(-)

diff --git a/configure.ac b/configure.ac
index 858cf78..c35e962 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3189,48 +3189,40 @@ AC_SUBST(LIBXPM)
 ### mingw32 doesn't use -ljpeg, since it loads the library dynamically.
 HAVE_JPEG=no
 LIBJPEG=
-if test "${opsys}" = "mingw32"; then
-  if test "${with_jpeg}" != "no"; then
-    dnl Checking for jpeglib.h can lose because of a redefinition of
-    dnl HAVE_STDLIB_H.
-    AC_CHECK_HEADER(jerror.h, HAVE_JPEG=yes, HAVE_JPEG=no)
-  fi
-  AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
-  if test "${HAVE_JPEG}" = "yes"; then
-    AC_DEFINE(HAVE_JPEG)
-    AC_EGREP_CPP([version 6b or later],
-	[#include <jpeglib.h>
-	 #if JPEG_LIB_VERSION >= 62
-	 version 6b or later
-	 #endif
-	],
-        [AC_DEFINE(HAVE_JPEG)],
-        [AC_MSG_WARN([libjpeg found, but not version 6b or later])
-        HAVE_JPEG=no])
-  fi
-elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then
-  if test "${with_jpeg}" != "no"; then
-    dnl Checking for jpeglib.h can lose because of a redefinition of
-    dnl  HAVE_STDLIB_H.
-    AC_CHECK_HEADER(jerror.h,
-      [AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)])
-  fi
-
-  AH_TEMPLATE(HAVE_JPEG, [Define to 1 if you have the jpeg library (-ljpeg).])dnl
-  if test "${HAVE_JPEG}" = "yes"; then
-    AC_DEFINE(HAVE_JPEG)
-    AC_EGREP_CPP([version 6b or later],
-	[#include <jpeglib.h>
-	 #if JPEG_LIB_VERSION >= 62
-	 version 6b or later
-	 #endif
-	],
-	[AC_DEFINE(HAVE_JPEG)],
-	[AC_MSG_WARN([libjpeg found, but not version 6b or later])
-	HAVE_JPEG=no])
-  fi
-  if test "${HAVE_JPEG}" = "yes"; then
-    LIBJPEG=-ljpeg
+if test "${with_jpeg}" != "no"; then
+  AC_CACHE_CHECK([for jpeglib 6b or later],
+    [emacs_cv_jpeglib],
+    [OLD_LIBS=$LIBS
+     for emacs_cv_jpeglib in yes -ljpeg no; do
+       case $emacs_cv_jpeglib in
+	 yes) ;;
+         no) break;;
+	 *) LIBS="$LIBS $emacs_cv_jpeglib";;
+       esac
+       AC_LINK_IFELSE(
+	 [AC_LANG_PROGRAM(
+	    [[#undef HAVE_STDLIB_H /* Avoid config.h/jpeglib.h collision.  */
+	      #include <stdio.h> /* jpeglib.h needs FILE and size_t.  */
+	      #include <jpeglib.h>
+	      #include <jerror.h>
+	      char verify[JPEG_LIB_VERSION < 62 ? -1 : 1];
+	      struct jpeg_decompress_struct cinfo;
+	    ]],
+	    [[
+	      jpeg_create_decompress (&cinfo);
+	      WARNMS (&cinfo, JWRN_JPEG_EOF);
+	      jpeg_destroy_decompress (&cinfo);
+	    ]])],
+	 [emacs_link_ok=yes],
+	 [emacs_link_ok=no])
+       LIBS=$OLD_LIBS
+       test $emacs_link_ok = yes && break
+     done])
+  if test "$emacs_cv_jpeglib" != no; then
+    HAVE_JPEG=yes
+    AC_DEFINE([HAVE_JPEG], 1,
+      [Define to 1 if you have the jpeg library (typically -ljpeg).])
+    test "$emacs_cv_jpeglib" != yes && LIBJPEG=$emacs_cv_jpeglib
   fi
 fi
 AC_SUBST(LIBJPEG)
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later"
  2015-04-16  1:37 ` Paul Eggert
@ 2015-04-16 16:40   ` 白井彰
  0 siblings, 0 replies; 7+ messages in thread
From: 白井彰 @ 2015-04-16 16:40 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Akira Shirai, 20332-done

The attached patch works.  Thanks.

% gzcat emacs-24.5.tar.gz | tar xfp -
% (cd emacs-24.5; mv configure configure.orig)
% (cd emacs-24.5; patch < ../0001-Port-jpeg-configuration-to-Solaris-10-with-Sun-C.patch)
patching file `configure.ac'
Hunk #1 succeeded at 3066 (offset -123 lines).
% (cd emacs-24.5; autoconf)
% (cd emacs-24.5; ./configure --with-gif=no | fgrep -i jpeg > configure_jpeg_emacs-24.5_20332)
% (cd emacs-24.5; cat -n config.log | sed -n '4673,4683p;4762,4785p')
  4673  configure:13845: checking for jpeglib 6b or later
  4674  configure:13878: cc -D_STDC_C99= -o conftest -I/usr/openwin/include -g -O -I/usr/openwin/include     -L/usr/openwin/lib conftest.c -lXext -lXmu -lXt -lSM -lICE -lX11 -lpthread -lsocket -lnsl  >&5
  4675  Undefined                       first referenced
  4676   symbol                             in file
  4677  jpeg_destroy_decompress             conftest.o
  4678  jpeg_CreateDecompress               conftest.o
  4679  ld: fatal: Symbol referencing errors. No output written to conftest
  4680  configure:13878: $? = 1
  4681  configure: failed program was:
  4682  | /* confdefs.h */
  4683  | #define PACKAGE_NAME "emacs"
  4762  | #define HAVE_XPM 1
  4763  | /* end confdefs.h.  */
  4764  | #undef HAVE_STDLIB_H /* Avoid config.h/jpeglib.h collision.  */
  4765  |             #include <stdio.h> /* jpeglib.h needs FILE and size_t.  */
  4766  |             #include <jpeglib.h>
  4767  |             #include <jerror.h>
  4768  |             char verify[JPEG_LIB_VERSION < 62 ? -1 : 1];
  4769  |             struct jpeg_decompress_struct cinfo;
  4770  |
  4771  | int
  4772  | main ()
  4773  | {
  4774  |
  4775  |             jpeg_create_decompress (&cinfo);
  4776  |             WARNMS (&cinfo, JWRN_JPEG_EOF);
  4777  |             jpeg_destroy_decompress (&cinfo);
  4778  |
  4779  |   ;
  4780  |   return 0;
  4781  | }
  4782  configure:13878: cc -D_STDC_C99= -o conftest -I/usr/openwin/include -g -O -I/usr/openwin/include     -L/usr/openwin/lib conftest.c -lXext -lXmu -lXt -lSM -lICE -lX11 -lpthread -lsocket -lnsl  -ljpeg >&5
  4783  configure:13878: $? = 0
  4784  configure:13889: result: -ljpeg
  4785  configure:13944: checking png.h usability

> 2015/04/16 10:37、Paul Eggert <eggert@cs.ucla.edu> のメール:
> 
> Thanks for the bug report.  This area of 'configure.ac' has been a source of trouble recently.  I rewrote it, installed the attached patch into the master branch, and am marking the bug as done.
> <0001-Port-jpeg-configuration-to-Solaris-10-with-Sun-C.patch>






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later"
  2015-04-15 17:59 ` Glenn Morris
@ 2015-04-16 16:42   ` 白井彰
  0 siblings, 0 replies; 7+ messages in thread
From: 白井彰 @ 2015-04-16 16:42 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Akira Shirai, 20332

Adding -Xs works.  Thanks.

$ cc -V
cc: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12
usage: cc [ options] files.  Use 'cc -flags' for details
$ cc -flags | egrep '^-E|^-Xs'
-E              Compile source through preprocessor only, output to stdout
-Xs             Compile assuming (pre-ANSI) K & R C style code

$ echo 'version 6b or later' > aaa_emacs-24.5.c; cc -E -Xs aaa_emacs-24.5.c
# 1 "aaa_emacs-24.5.c"
version 6b or later
$ echo $?
0

> 2015/04/16 2:59、Glenn Morris <rgm@gnu.org> のメール:
> 
> 
>> $ echo 'version 6b or later' > aaa_emacs-24.5.c; cc -E aaa_emacs-24.5.c
>> # 1 "aaa_emacs-24.5.c"
>> "aaa_emacs-24.5.c", line 1: invalid input token: 6b
>> version  6b or later
>> #ident "acomp: Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12"
>> cc: acomp failed for aaa_emacs-24.5.c
>> $ echo $?
>> 2
> 
> Funnily enough, our own etc/PROBLEMS file used to contain a solution for
> this very issue:
> 
>    *** `configure' fails with ``"junk.c", line 660: invalid input token: 8.elc''
> 
>    The final stage of the Emacs configure process uses the C preprocessor
>    to generate the Makefiles.  Errors of this form can occur if the C
>    preprocessor inserts extra whitespace into its output.  The solution
>    is to find the switches that stop your preprocessor from inserting extra
>    whitespace, add them to CPPFLAGS, and re-run configure.  For example,
>    this error can occur on Solaris 10 when using the Sun Studio compiler
>    ``Sun C 5.8'' with its preprocessor CPP="/opt/SUNWspro/bin/cc -E".
>    The relevant switch in this case is "-Xs" (``compile assuming
>    (pre-ANSI) K & R C style code'').
> 
> And indeed adding -Xs seems to avoid the issue.
> 
> I don't think this is a real solution to this case,
> just a historical curiosity. :)






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-16 16:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-14 16:47 bug#20332: 24.5; With jpeg-6b configure says "WARNING: libjpeg found, but not version 6b or later" 白井彰
2015-04-15 12:25 ` Petr Hracek
2015-04-15 15:36   ` Glenn Morris
2015-04-15 17:59 ` Glenn Morris
2015-04-16 16:42   ` 白井彰
2015-04-16  1:37 ` Paul Eggert
2015-04-16 16:40   ` 白井彰

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).