mansoor-ahmed / openjpeg

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

v1.4 - error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function) #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/openjpeg/1.4' 
-DCMAKE_BUILD_TYPE=None -Wno-dev

% /usr/bin/gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/src/configure 
--disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++ 
--program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ 
--with-slibdir=/usr/lib --build=i686-apple-darwin11 
--enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2335.15~25/dst-llvmCore/Devel
oper/usr/local --program-prefix=i686-apple-darwin11- 
--host=x86_64-apple-darwin11 --target=i686-apple-darwin11 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)

% cmake --version
cmake version 2.8.5

% cmake . -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/openjpeg/1.4' 
-DCMAKE_BUILD_TYPE=None -Wno-dev
-- The C compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of void*
-- Check size of void* - done
-- Check size of char
-- Check size of char - done
-- Check size of short
-- Check size of short - done
-- Check size of float
-- Check size of float - done
-- Check size of double
-- Check size of double - done
-- Looking for limits.h
-- Looking for limits.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for include files CMAKE_HAVE_SYS_PRCTL_H
-- Looking for include files CMAKE_HAVE_SYS_PRCTL_H - not found.
-- Check if the system is big endian
-- Searching 16 bit integer
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for XOpenDisplay in 
/usr/X11R6/lib/libX11.dylib;/usr/X11R6/lib/libXext.dylib
-- Looking for XOpenDisplay in 
/usr/X11R6/lib/libX11.dylib;/usr/X11R6/lib/libXext.dylib - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/X11R6/lib/libX11.dylib
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Looking for getopt.h
-- Looking for getopt.h - found
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
-- Found PNG: /usr/X11R6/lib/libpng.dylib 
-- Found TIFF: /usr/local/lib/libtiff.dylib 
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/openjpeg_v1_4_sources_r697
➜  openjpeg_v1_4_sources_r697  make
Scanning dependencies of target openjpeg
[  3%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/bio.c.o
[  6%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/cio.c.o
[ 10%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/dwt.c.o
/tmp/openjpeg_v1_4_sources_r697/libopenjpeg/dwt.c: In function 
‘v4dwt_interleave_h’:
/tmp/openjpeg_v1_4_sources_r697/libopenjpeg/dwt.c:573: warning: cast from 
pointer to integer of different size
/tmp/openjpeg_v1_4_sources_r697/libopenjpeg/dwt.c:573: warning: cast from 
pointer to integer of different size
[ 13%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/event.c.o
[ 16%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/image.c.o
[ 20%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/j2k.c.o
[ 23%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/j2k_lib.c.o
[ 26%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/jp2.c.o
[ 30%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/jpt.c.o
[ 33%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/mct.c.o
[ 36%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/mqc.c.o
[ 40%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/openjpeg.c.o
[ 43%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/pi.c.o
[ 46%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/raw.c.o
[ 50%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/t1.c.o
[ 53%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/t2.c.o
[ 56%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/tcd.c.o
[ 60%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/tgt.c.o
Linking C shared library ../bin/libopenjpeg.dylib
[ 60%] Built target openjpeg
Scanning dependencies of target image_to_j2k
[ 63%] Building C object codec/CMakeFiles/image_to_j2k.dir/image_to_j2k.c.o
[ 66%] Building C object codec/CMakeFiles/image_to_j2k.dir/convert.c.o
/tmp/openjpeg_v1_4_sources_r697/codec/convert.c: In function ‘pngtoimage’:
/tmp/openjpeg_v1_4_sources_r697/codec/convert.c:2236: warning: passing argument 
2 of ‘png_set_longjmp_fn’ makes qualified function pointer from unqualified
/tmp/openjpeg_v1_4_sources_r697/codec/convert.c: In function ‘imagetopng’:
/tmp/openjpeg_v1_4_sources_r697/codec/convert.c:2420: warning: passing argument 
2 of ‘png_set_longjmp_fn’ makes qualified function pointer from unqualified
/tmp/openjpeg_v1_4_sources_r697/codec/convert.c:2435: error: 
‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
/tmp/openjpeg_v1_4_sources_r697/codec/convert.c:2435: error: (Each undeclared 
identifier is reported only once
/tmp/openjpeg_v1_4_sources_r697/codec/convert.c:2435: error: for each function 
it appears in.)
make[2]: *** [codec/CMakeFiles/image_to_j2k.dir/convert.c.o] Error 1
make[1]: *** [codec/CMakeFiles/image_to_j2k.dir/all] Error 2
make: *** [all] Error 2

Original issue reported on code.google.com by vrak...@gmail.com on 30 Aug 2011 at 9:07

GoogleCodeExporter commented 9 years ago
You use 'openjpeg_v1_4_sources_r697'. And you are supposed to use libpng-1.5.x.
'libpng15/png.h' no longer includes 'zlib.h'. You must do it yourself.

In 'convert.c':

#include <png.h>
#include <zlib.h>

If you have SVN installed, you should use a current revision: it reflects
this change.

winfried  

Original comment by szukw...@arcor.de on 30 Aug 2011 at 11:31

GoogleCodeExporter commented 9 years ago
Seems to be fixed in 1.5 and trunk. Closing

Original comment by mathieu.malaterre on 11 Jan 2012 at 9:28