Fwd: Problem with bzip2
"Vasileios Anagnostopoulos" <[email protected]> Thu, 8 May 2008 13:18:50 +0300
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I have been able to compile (and use) the wonderful library version 1.2
under mingw-4.2.1/msys-1.0.11.
However some components fail.
One of my problems is bzip2. I have compiled a static libbz2.a from 1.0.5
version under mingw but GraphicsMagick fails to detect it.
More specifically it generates a conftest.c that reads
/* confdefs.h. */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define HasWINGDI32 1
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define LT_OBJDIR ".libs/"
#define LT_MODULE_EXT ".dll"
#define LT_MODULE_PATH_VAR "PATH"
#define LT_DLSEARCH_PATH "/lib:/usr/lib"
#define HAVE_LIBDLLOADER 1
#define LTDL_DLOPEN_DEPLIBS 1
#define error_t int
#define __error_t_defined 1
#define HAVE_PRELOADED_SYMBOLS 1
#define HAVE_UNISTD_H 1
#define HAVE_DIRENT_H 1
#define HAVE_CLOSEDIR 1
#define HAVE_OPENDIR 1
#define HAVE_READDIR 1
#define UseInstalledMagick 1
#define QuantumDepth 8
#define STDC_HEADERS 1
#define HAVE_DIRENT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_LONG_DOUBLE_WIDER 1
#define HAVE_LONG_DOUBLE 1
#define SIZEOF_SIGNED_SHORT 2
#define SIZEOF_UNSIGNED_SHORT 2
#define SIZEOF_SIGNED_INT 4
#define SIZEOF_UNSIGNED_INT 4
#define SIZEOF_SIGNED_LONG 4
#define SIZEOF_UNSIGNED_LONG 4
#define SIZEOF_SIGNED_LONG_LONG 8
#define SIZEOF_UNSIGNED_LONG_LONG 8
#define SIZEOF_OFF_T 4
#define SIZEOF_SIZE_T 4
#define SIZEOF_UNSIGNED_INTP 4
#define RETSIGTYPE void
#define HAS_C__func__ 1
#define HAVE_STDLIB_H 1
#define HAVE_UNISTD_H 1
#define HAVE_GETPAGESIZE 1
#define HAVE_ATOLL 1
#define HAVE__EXIT 1
#define HAVE_FTIME 1
#define HAVE_GETPAGESIZE 1
#define HAVE_GETPID 1
#define HAVE__PCLOSE 1
#define HAVE_PCLOSE 1
#define HAVE__POPEN 1
#define HAVE_POPEN 1
#define HAVE_RAISE 1
#define HAVE_SEEKDIR 1
#define HAVE_STRERROR 1
#define HAVE_STRTOLL 1
#define HAVE_TEMPNAM 1
#define HAVE_TELLDIR 1
#define HAVE_VSPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_DECL_PREAD 0
#define HAVE_DECL_PWRITE 0
#define HAVE_DECL_STRLCPY 0
#define HAVE_DECL_VSNPRINTF 1
#define HAVE_BOOL /**/
#define HAVE_CONST_CAST /**/
#define HAVE_DEFAULT_TEMPLATE_PARAMETERS /**/
#define HAVE_EXCEPTIONS /**/
#define HAVE_NAMESPACES /**/
#define HAVE_EXPLICIT /**/
#define HAVE_STD /**/
#define HAVE_STL /**/
#define HAVE_MUTABLE /**/
#define HAVE_NEW_FOR_SCOPING /**/
#define HAVE_STATIC_CAST /**/
#define HAVE_TEMPLATES /**/
#define HAS_CPP__func__ 1
#define X11ConfigurePath "X11ConfigurePath"
#define HasZLIB 1
#define WIN32 1
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char BZ2_bzCompress ();
int
main ()
{
return BZ2_bzCompress ();
;
return 0;
}
which does not compile.
I changed this conftest.c to (in short appended bzlib.h and changed the
arguments)
/* confdefs.h. */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define HasWINGDI32 1
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define LT_OBJDIR ".libs/"
#define LT_MODULE_EXT ".dll"
#define LT_MODULE_PATH_VAR "PATH"
#define LT_DLSEARCH_PATH "/lib:/usr/lib"
#define HAVE_LIBDLLOADER 1
#define LTDL_DLOPEN_DEPLIBS 1
#define error_t int
#define __error_t_defined 1
#define HAVE_PRELOADED_SYMBOLS 1
#define HAVE_UNISTD_H 1
#define HAVE_DIRENT_H 1
#define HAVE_CLOSEDIR 1
#define HAVE_OPENDIR 1
#define HAVE_READDIR 1
#define UseInstalledMagick 1
#define QuantumDepth 8
#define STDC_HEADERS 1
#define HAVE_DIRENT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_LONG_DOUBLE_WIDER 1
#define HAVE_LONG_DOUBLE 1
#define SIZEOF_SIGNED_SHORT 2
#define SIZEOF_UNSIGNED_SHORT 2
#define SIZEOF_SIGNED_INT 4
#define SIZEOF_UNSIGNED_INT 4
#define SIZEOF_SIGNED_LONG 4
#define SIZEOF_UNSIGNED_LONG 4
#define SIZEOF_SIGNED_LONG_LONG 8
#define SIZEOF_UNSIGNED_LONG_LONG 8
#define SIZEOF_OFF_T 4
#define SIZEOF_SIZE_T 4
#define SIZEOF_UNSIGNED_INTP 4
#define RETSIGTYPE void
#define HAS_C__func__ 1
#define HAVE_STDLIB_H 1
#define HAVE_UNISTD_H 1
#define HAVE_GETPAGESIZE 1
#define HAVE_ATOLL 1
#define HAVE__EXIT 1
#define HAVE_FTIME 1
#define HAVE_GETPAGESIZE 1
#define HAVE_GETPID 1
#define HAVE__PCLOSE 1
#define HAVE_PCLOSE 1
#define HAVE__POPEN 1
#define HAVE_POPEN 1
#define HAVE_RAISE 1
#define HAVE_SEEKDIR 1
#define HAVE_STRERROR 1
#define HAVE_STRTOLL 1
#define HAVE_TEMPNAM 1
#define HAVE_TELLDIR 1
#define HAVE_VSPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_DECL_PREAD 0
#define HAVE_DECL_PWRITE 0
#define HAVE_DECL_STRLCPY 0
#define HAVE_DECL_VSNPRINTF 1
#define HAVE_BOOL /**/
#define HAVE_CONST_CAST /**/
#define HAVE_DEFAULT_TEMPLATE_PARAMETERS /**/
#define HAVE_EXCEPTIONS /**/
#define HAVE_NAMESPACES /**/
#define HAVE_EXPLICIT /**/
#define HAVE_STD /**/
#define HAVE_STL /**/
#define HAVE_MUTABLE /**/
#define HAVE_NEW_FOR_SCOPING /**/
#define HAVE_STATIC_CAST /**/
#define HAVE_TEMPLATES /**/
#define HAS_CPP__func__ 1
#define X11ConfigurePath "X11ConfigurePath"
#define HasZLIB 1
#define WIN32 1
/* end confdefs.h. */
#include<bzlib.h>
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
/*
#ifdef __cplusplus
extern "C"
#endif
char BZ2_bzCompress ()
*/
int
main ()
{
return BZ2_bzCompress (NULL,0);
;
return 0;
}
which compiles and links without a problem.
An interface change?
I also have a problem with libxml2 which I compiled from source as a static
library so I have to put
FITHIS@FITHISUX ~/GraphicsMagick-1.2
$ echo $LDFLAGS
-L/usr/local/lib -L/usr/lib
FITHIS@FITHISUX ~/GraphicsMagick-1.2
$ echo $CFLAGS
-DLIBXML_STATIC
FITHIS@FITHISUX ~/GraphicsMagick-1.2
$ echo $CPPFLAGS
-I/usr/local/include -I/usr/include
FITHIS@FITHISUX ~/GraphicsMagick-1.2
$ echo $LIBS
-lws2_32
FITHIS@FITHISUX ~/GraphicsMagick-1.2
$
The configuration phase goes without a problem but the compilation ends with
make all-am
make[1]: Entering directory `/home/FITHIS/GraphicsMagick-1.2'
/bin/sh ./libtool --silent --tag=CC --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I./magick -I./ltdl -I./ltdl
-I/usr/local/include/freetype2 -I/usr/local/include -I/usr/include -D_LIB
-D_MT -I/usr/local/include/libxml2 -DLIBXML_STATIC -Wall -MT
coders/magick_libGraphicsMagick_la-msl.lo -MD -MP -MF
coders/.deps/magick_libGraphicsMagick_la-msl.Tpo -c -o
coders/magick_libGraphicsMagick_la-msl.lo `test -f 'coders/msl.c' || echo
'./'`coders/msl.c
coders/msl.c:63:27: error: win32config.h: No such file or directory
make[1]: *** [coders/magick_libGraphicsMagick_la-msl.lo] Error 1
make[1]: Leaving directory `/home/FITHIS/GraphicsMagick-1.2'
make: *** [all] Error 2
Any ideas?
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Graphicsmagick-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-bugs