jacklicn / leptonica

Automatically exported from code.google.com/p/leptonica
0 stars 0 forks source link

MingW32 compilation error: conflicting types for 'l_jpegSetNoChromaSampling' #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to build on a mingw32 environment, I get this error:

jpegiostub.c:1:0: warning: -fPIC ignored for target (all code is position 
independent)
jpegiostub.c:57:9: error: conflicting types for 'l_jpegSetNoChromaSampling'
leptprotos.h:660:22: note: previous declaration of 'l_jpegSetNoChromaSampling' 
was here
make[3]: *** [jpegiostub.o] Error 1
make[3]: Leaving directory `/c/Documents and Settings/kpoman/Mis 
documentos/Downloads/leptonlib-1.65/leptonlib-1.65/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/Documents and Settings/kpoman/Mis 
documentos/Downloads/leptonlib-1.65/leptonlib-1.65/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/Documents and Settings/kpoman/Mis 
documentos/Downloads/leptonlib-1.65/leptonlib-1.65'
make: *** [all] Error 2

$ gcc -v
Using built-in specs.
COLLECT_GCC=c:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.0/configure 
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions 
--with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry 
--enable-libstdcxx-debug --enable-version-specific-r
untime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.0 (GCC)

Here is the configure output:

$ ./configure
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
./configure: line 1964: test: too many arguments
./configure: line 1967: test: too many arguments
checking for cl.exe... no
checking for g++... g++
checking for C++ compiler default output file name... a.exe
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
/bin/sh: /c/Documents: No such file or directory
configure: WARNING: `missing' script is too old or missing
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... unsupported
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... no
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 whether byte ordering is bigendian... no
checking for ranlib... ranlib
checking for deflate in -lz... yes
checking for png_read_png in -lpng... no
checking for jpeg_read_scanlines in -ljpeg... no
checking for DGifOpenFileHandle in -lgif... no
checking how to run the C++ preprocessor... g++ -E
checking for ANSI C header files... (cached) no
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... no
checking sys/ipc.h usability... no
checking sys/ipc.h presence... no
checking for sys/ipc.h... no
checking sys/shm.h usability... no
checking sys/shm.h presence... no
checking for sys/shm.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking whether #! works in shell scripts... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking for wchar_t... yes
checking for long long int... yes
checking for mbstate_t... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... no
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... no
checking for vfork... no
checking for strerror... yes
checking for vsnprintf... yes
checking for gethostname... no
checking for strchr... yes
checking for memcpy... yes
checking for acos... yes
checking for asin... yes
checking for fmemopen... no
checking for Leffler libtiff library... checking linking with -ltiff... no
configure: WARNING: TIFF support is disabled
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config_auto.h
config.status: executing depfiles commands

Configuration is done.
You can now build leptonlib by running:

% make

Original issue reported on code.google.com by kpo...@gmail.com on 25 Jul 2010 at 5:46

GoogleCodeExporter commented 9 years ago
Same issue on a i686-pc-linux-gnu system using gcc 4.4.3

Original comment by sreejith...@gmail.com on 29 Jul 2010 at 8:25

GoogleCodeExporter commented 9 years ago
Thanks for the notification.

The signature for that function, which is incorrect
in the jpegiostub.c file, will be fixed in 1.66,
due out in a week.

Until then, you can build if you have that function return void:

void l_jpegSetNoChromaSampling(l_int32 flag)
{
    L_ERROR("function not present", "l_jpegSetNoChromaSampling");
    return;
}

Original comment by dan.bloo...@gmail.com on 29 Jul 2010 at 3:55

GoogleCodeExporter commented 9 years ago
1.66 is released

Original comment by dan.bloo...@gmail.com on 11 Aug 2010 at 7:43