David Sveningsson
2010-07-02 16:08:34 UTC
Hi, I'm sorry if I'm not reporting this issue at the proper place, but I
wasn't able to find any where else.
When trying to build PythonMagick-0.9.1 it failed due to a number of issues.
using:
ImageMagick-6.6.2.5
gcc-4.4.4
glibc-2.11.2
boost-1.42.0
libtool: compile: x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.
- -I../config -I/usr/include/python2.6 -I/usr/include
- -I/usr/include/ImageMagick -march=native -Os -pipe -msse3 -g -ggdb
- -DBOOST_PYTHON_DYNAMIC_LIB -MT libpymagick_la-_DrawableText.lo -MD -MP
- -MF .deps/libpymagick_la-_DrawableText.Tpo -c _DrawableText.cpp -fPIC
- -DPIC -o .libs/libpymagick_la-_DrawableText.o
In file included from /usr/include/ImageMagick/Magick++.h:11,
from _PathMovetoAbs.cpp:14:
/usr/include/ImageMagick/Magick++/Image.h:122: error: reference to
'ssize_t' is ambiguous
/usr/include/sys/types.h:110: error: candidates are: typedef __ssize_t
ssize_t
/usr/include/boost/python/ssize_t.hpp:15: error: typedef
Py_ssize_t boost::python::ssize_t
/usr/include/ImageMagick/Magick++/Image.h:122: error: ISO C++ forbids
declaration of 'ssize_t' with no type
/usr/include/ImageMagick/Magick++/Image.h:122: error: expected ',' or
'...' before 'offset'
[snip]
The problem seems to be the usage of "using namespace boost::python;"
before including Magick++.h. If I swap the order of those that error
goes away but I get another error instead:
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
- -I../config -I/usr/include/python2.6 -I/usr/include
- -I/usr/include/ImageMagick -g -O2 -DBOOST_PYTHON_DYNAMIC_LIB -MT
libpymagick_la-_Image.lo -MD -MP -MF .deps/libpymagick_la-_Image.Tpo -c
- -o libpymagick_la-_Image.lo `test -f '_Image.cpp' || echo './'`_Image.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../config
- -I/usr/include/python2.6 -I/usr/include -I/usr/include/ImageMagick -g
- -O2 -DBOOST_PYTHON_DYNAMIC_LIB -MT libpymagick_la-_Image.lo -MD -MP -MF
.deps/libpymagick_la-_Image.Tpo -c _Image.cpp -fPIC -DPIC -o
.libs/libpymagick_la-_Image.o
_Image.cpp: In function ?void Export_pyste_src_Image()?:
_Image.cpp:89: error: address of overloaded function with no contextual
type information
_Image.cpp:90: error: address of overloaded function with no contextual
type information
_Image.cpp:97: error: address of overloaded function with no contextual
type information
_Image.cpp:114: error: address of overloaded function with no contextual
type information
[snip]
This seems to be caused by a API change from {un,}signed int's to
{,s}size_t, so updating these fixes the problem.
So here are two patches fixing the build problems and now it seems to work.
wasn't able to find any where else.
When trying to build PythonMagick-0.9.1 it failed due to a number of issues.
using:
ImageMagick-6.6.2.5
gcc-4.4.4
glibc-2.11.2
boost-1.42.0
libtool: compile: x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.
- -I../config -I/usr/include/python2.6 -I/usr/include
- -I/usr/include/ImageMagick -march=native -Os -pipe -msse3 -g -ggdb
- -DBOOST_PYTHON_DYNAMIC_LIB -MT libpymagick_la-_DrawableText.lo -MD -MP
- -MF .deps/libpymagick_la-_DrawableText.Tpo -c _DrawableText.cpp -fPIC
- -DPIC -o .libs/libpymagick_la-_DrawableText.o
In file included from /usr/include/ImageMagick/Magick++.h:11,
from _PathMovetoAbs.cpp:14:
/usr/include/ImageMagick/Magick++/Image.h:122: error: reference to
'ssize_t' is ambiguous
/usr/include/sys/types.h:110: error: candidates are: typedef __ssize_t
ssize_t
/usr/include/boost/python/ssize_t.hpp:15: error: typedef
Py_ssize_t boost::python::ssize_t
/usr/include/ImageMagick/Magick++/Image.h:122: error: ISO C++ forbids
declaration of 'ssize_t' with no type
/usr/include/ImageMagick/Magick++/Image.h:122: error: expected ',' or
'...' before 'offset'
[snip]
The problem seems to be the usage of "using namespace boost::python;"
before including Magick++.h. If I swap the order of those that error
goes away but I get another error instead:
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.
- -I../config -I/usr/include/python2.6 -I/usr/include
- -I/usr/include/ImageMagick -g -O2 -DBOOST_PYTHON_DYNAMIC_LIB -MT
libpymagick_la-_Image.lo -MD -MP -MF .deps/libpymagick_la-_Image.Tpo -c
- -o libpymagick_la-_Image.lo `test -f '_Image.cpp' || echo './'`_Image.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../config
- -I/usr/include/python2.6 -I/usr/include -I/usr/include/ImageMagick -g
- -O2 -DBOOST_PYTHON_DYNAMIC_LIB -MT libpymagick_la-_Image.lo -MD -MP -MF
.deps/libpymagick_la-_Image.Tpo -c _Image.cpp -fPIC -DPIC -o
.libs/libpymagick_la-_Image.o
_Image.cpp: In function ?void Export_pyste_src_Image()?:
_Image.cpp:89: error: address of overloaded function with no contextual
type information
_Image.cpp:90: error: address of overloaded function with no contextual
type information
_Image.cpp:97: error: address of overloaded function with no contextual
type information
_Image.cpp:114: error: address of overloaded function with no contextual
type information
[snip]
This seems to be caused by a API change from {un,}signed int's to
{,s}size_t, so updating these fixes the problem.
So here are two patches fixing the build problems and now it seems to work.