Bug 148728 - >=media-libs/lcms-1.15 doesn't compile with python 2.5
Bug#: 148728 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: printing@gentoo.org Reported By: chutzpah@gentoo.org
Component: Applications
URL: 
Summary: >=media-libs/lcms-1.15 doesn't compile with python 2.5
Keywords:  
Status Whiteboard: 
Opened: 2006-09-22 19:48 0000
Description:   Opened: 2006-09-22 19:48 0000
Dies with this error:

 i686-pc-linux-gnu-g++ -DPACKAGE_NAME=\"lcms\" -DPACKAGE_TARNAME=\"lcms\"
-DPACKAGE_VERSION=\"1.15\" "-DPACKAGE_STRING=\"lcms 1.15\""
-DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -DSIZEOF_INT=4 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_LONG=4
-DSIZEOF_UNSIGNED_LONG=4 -DSIZEOF_LONG_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8
-DHasJPEG=1 -DHasZLIB=1 -DHasTIFF=1 -DHAVE_TIFFCONF_H=1 -I. -I.
-I/usr/include/python2.5 -I/usr/include/python2.5
-I/usr/local/include/python2.5 -I../include -I../include -march=pentium2 -O2
-fomit-frame-pointer -pipe -c lcms_wrap.cxx  -fPIC -DPIC -o
.libs/_lcms_la-lcms_wrap.o
lcms_wrap.cxx: In function 'int SWIG_Python_ConvertFunctionPtr(PyObject*,
void**, swig_type_info*)':
lcms_wrap.cxx:2051: error: invalid conversion from 'const char*' to 'char*'
lcms_wrap.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
lcms_wrap.cxx:33665: error: invalid conversion from 'const char*' to 'char*'
make[2]: *** [_lcms_la-lcms_wrap.lo] Error 1
make[2]: Leaving directory
`/tmp/portage/portage/lcms-1.15/work/lcms-1.15/python'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/tmp/portage/portage/lcms-1.15/work/lcms-1.15/python'
make: *** [all-recursive] Error 1


Portage 2.1.2_pre1 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r3,
2.6.18-gentoo i686)
=================================================================
System uname: 2.6.18-gentoo i686 Intel(R) Pentium(R) 4 CPU 3.40GHz
Gentoo Base System version 1.12.5
Last Sync: Sat, 23 Sep 2006 02:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.4 [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.29
dev-lang/python:     2.4.3-r3, 2.5-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium2 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /lib/rcscripts/addons /usr/kde/3.5/env
/usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb
/usr/share/config /usr/share/gnome /usr/share/hwdata"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler
/etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/sound /etc/terminfo
/etc/texmf/web2c /etc/udev /usr/kde /usr/share/gnome/apps
/usr/share/gnome/bonobo /usr/share/gnome/capplets /usr/share/gnome/cursor-fonts
/usr/share/gnome/fonts /usr/share/gnome/help /usr/share/gnome/html
/usr/share/gnome/panel /usr/share/gnome/ui /usr/share/gnome/vfolders
/usr/share/gnome/vino /usr/share/gnome/wm-properties /var/local"
CXXFLAGS="-march=pentium2 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect distlocks metadata-transfer sandbox
sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="en_CA en_GB en_US en fr zh_CN zh_TW"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/tmp/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/diskless /usr/local/chutzpah"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d a52 aac accessibility acpi ada alsa amr aoss arts asf
audiofile bash-completion berkdb bitmap-fonts bmpx bonobo boost branding bzip2
cairo caps cdparanoia cdr cli client-only colordiff cpudetection crypt css
ctype cups curl custom-cflags dbus divx djvu dlloader doc dri dts dv dvd dvdr
dvdread dvi eds effects elibc_glibc emacs emboss emf encode esd evo evolution
examples exif expat fam fat ffmpeg fftw firefox flac foomaticdb fortran ftp gb
gcc-libffi gcj gd gdbm gif gimp gimpprint glibc-omitfp glitz glut gmail gmedia
gmp gnome gnomedb gnuplot gnustep gnutls gpgme gphoto2 gpm grammar gstreamer
gtk gtkhtml guile gzip hal haskell hfs i8x0 icq icu idea idn ieee1394 ifp image
imagemagick imap imlib imlib2 inkjar input_devices_evdev input_devices_joystick
input_devices_keyboard input_devices_mouse input_devices_synaptics
input_devices_vmmouse input_devices_void input_devices_wacom ipod ipv6 jabber
java jfs jpeg jpeg2k junit kde kernel_linux largeterminal latex lcms ldap
libg++ libgda libnotify libwww linguas_en linguas_en_CA linguas_en_GB
linguas_en_US linguas_fr linguas_zh_CN linguas_zh_TW live lzo mad math matroska
mikmod mjpeg mmap mmx mng mono motif mozdevelop mozilla mozsvg mp3 mp4 mpeg
mule musepack mysql nautilus ncurses netboot network nfs nis nls no-old-linux
no_wxgtk1 nonfsv4 nptl nptlonly objc odbc ogg openal opengl pam pam_console
pascal patented pcre pda pdf perl php plugin png posix postgres povray ppds
pppd print python qt3 qt4 quicktime quotas radeon rdesktop readline real
realmedia reflection rtc ruby samba scanner sdk sdl session shorten silverxp
sndfile sox speex spell spl sql sqlite ssl stream subversion svg tcltk tcpd
tetex tga theora tiff totem transcode truetype truetype-fonts type1-fonts udev
unicode usb userland_GNU userlocales vcd video_cards_apm video_cards_ark
video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix
video_cards_dummy video_cards_epson video_cards_fglrx video_cards_glint
video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt
video_cards_mach64 video_cards_mga video_cards_neomagic video_cards_nsc
video_cards_nv video_cards_nvidia video_cards_r128 video_cards_radeon
video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage
video_cards_siliconmotion video_cards_sis video_cards_tdfx video_cards_tga
video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa
video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo vidix
vim-with-x vorbis win32codecs wmf wxwindows x264 xanim xemacs xine xml xml2
xorg xpm xprint xscreensaver xv xvid xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Marien Zwart (RETIRED) 2006-09-25 07:43:12 0000 -------
Applying
http://sourceforge.net/tracker/index.php?func=detail&aid=1552530&group_id=1645&atid=101645
to swig fixes this. ChrisWhite: could that be applied to swig-1.3.29 please?

------- Comment #2 From Marien Zwart (RETIRED) 2006-09-26 10:08:17 0000 -------
swig-1.3.29-r1 fixes this. Printing herd: can you please add
>=dev-lang/swig-1.3.29-r1 to DEPEND if python is in USE? Without swig the
bindings  are not built, and without at least that version of swig the build
fails on python 2.5.

------- Comment #3 From Chris Smith 2006-10-09 11:26:49 0000 -------
I get this on x86-64:
=========================================================
make  all-am
make[2]: Entering directory `/var/tmp/portage/lcms-1.15/work/lcms-1.15/python'
/bin/sh ../libtool --tag=CXX --mode=compile x86_64-pc-linux-gnu-g++
-DPACKAGE_NAME=\"lcms\" -DPACKAGE_TARNAME=\"lcms\" -DPACKAGE_VERSION=\"1.15\"
-DPACKAGE_STRING=\"lcms\ 1.15\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSIZEOF_INT=4 -DSIZEOF_UNSIGNED_INT=4
-DSIZEOF_LONG=8 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_LONG_LONG=8
-DSIZEOF_UNSIGNED_LONG_LONG=8 -DHasJPEG=1 -DHasZLIB=1 -DHasTIFF=1
-DHAVE_TIFFCONF_H=1  -I. -I.  -I/usr/include/python2.5 -I/usr/include/python2.5
-I/usr/local/include/python2.5 -I../include -I../include   -march=nocona -O2
-fomit-frame-pointer -pipe -c -o _lcms_la-lcms_wrap.lo `test -f 'lcms_wrap.cxx'
|| echo './'`lcms_wrap.cxx
mkdir .libs
 x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"lcms\" -DPACKAGE_TARNAME=\"lcms\"
-DPACKAGE_VERSION=\"1.15\" "-DPACKAGE_STRING=\"lcms 1.15\""
-DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -DSIZEOF_INT=4 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_LONG=8
-DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_LONG_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8
-DHasJPEG=1 -DHasZLIB=1 -DHasTIFF=1 -DHAVE_TIFFCONF_H=1 -I. -I.
-I/usr/include/python2.5 -I/usr/include/python2.5
-I/usr/local/include/python2.5 -I../include -I../include -march=nocona -O2
-fomit-frame-pointer -pipe -c lcms_wrap.cxx  -fPIC -DPIC -o
.libs/_lcms_la-lcms_wrap.o
lcms_wrap.cxx: In function 'int SWIG_AsCharPtrAndSize(PyObject*, char**,
size_t*, int*)':
lcms_wrap.cxx:2919: error: cannot convert 'int*' to 'Py_ssize_t*' for argument
'3' to 'int PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)'
make[2]: *** [_lcms_la-lcms_wrap.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/lcms-1.15/work/lcms-1.15/python'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/lcms-1.15/work/lcms-1.15/python'
make: *** [all-recursive] Error 1
=========================================================

And I have dev-lang/swig-1.3.29-r1 installed (and remerged it with python 2.5).

------- Comment #4 From Alex 2006-10-10 08:47:45 0000 -------
Same error as chris smith.

------- Comment #5 From Mike Arthur 2006-10-14 01:18:24 0000 -------
Also getting same error as Chris Smith.
~amd64 also.

------- Comment #6 From Mike Arthur 2006-11-01 15:40:34 0000 -------
any news/ideas/confirmations?

------- Comment #7 From Chris Smith 2006-11-17 09:45:25 0000 -------
swig-1.3.30 is out and I created an ebuild for it to test lcms and the problem
still remains:
 x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"lcms\" -DPACKAGE_TARNAME=\"lcms\"
-DPACKAGE_VERSION=\"1.16\" "-DPACKAGE_STRING=\"lcms 1.16\""
-DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -DSIZEOF_INT=4 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_LONG=8
-DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_LONG_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8
-DHasJPEG=1 -DHasZLIB=1 -DHasTIFF=1 -DHAVE_TIFFCONF_H=1 -I.
-I/usr/include/python2.5 -I/usr/include/python2.5 -I../include -I../include
-march=nocona -O2 -fomit-frame-pointer -pipe -c lcms_wrap.cxx  -fPIC -DPIC -o
.libs/_lcms_la-lcms_wrap.o
lcms_wrap.cxx: In function 'int SWIG_Python_ConvertFunctionPtr(PyObject*,
void**, swig_type_info*)':
lcms_wrap.cxx:2051: error: invalid conversion from 'const char*' to 'char*'
lcms_wrap.cxx: In function 'int SWIG_AsCharPtrAndSize(PyObject*, char**,
size_t*, int*)':
lcms_wrap.cxx:2920: error: cannot convert 'int*' to 'Py_ssize_t*' for argument
'3' to 'int PyString_AsStringAndSize(PyObject*, char**, Py_ssize_t*)'
lcms_wrap.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
lcms_wrap.cxx:33907: error: invalid conversion from 'const char*' to 'char*'
make[1]: *** [_lcms_la-lcms_wrap.lo] Error 1
make[1]: Leaving directory
`/var/tmp/portage/media-libs/lcms-1.16/work/lcms-1.16/python'
make: *** [all-recursive] Error 1

------- Comment #8 From Stefan Schweizer 2006-11-18 01:47:35 0000 -------
sorry, must have missed this. thanks, FIXED now

------- Comment #9 From Mike Arthur 2006-11-19 06:18:00 0000 -------
This isn't fixed. It still fails on ~amd64, with reemerged swig.

------- Comment #10 From Stefan Schweizer 2006-11-19 09:20:08 0000 -------
python herd: please advice

------- Comment #11 From Szabolcs Berecz 2007-01-04 10:16:46 0000 -------
swig-1.3.31 fixes the problem

------- Comment #12 From Bryan Østergaard (RETIRED) 2007-01-07 03:53:39 0000 -------
Bumped swig to 1.3.31 and tested that it fixes the amd64 issue.

------- Comment #13 From Stefan Schweizer 2007-01-07 09:47:53 0000 -------
thanks, I bumped the dep in lcms. It would be cool if you could have a look at
bug 138647 for python too :)

------- Comment #14 From Jakub Moc (RETIRED) 2007-03-16 09:59:46 0000 -------
*** Bug 171126 has been marked as a duplicate of this bug. ***

------- Comment #15 From Jakub Moc (RETIRED) 2007-03-16 10:00:57 0000 -------
People complain that it still doesn't work w/ 1.16 and swig-1.3.31; reopen.

------- Comment #16 From David Watzke 2007-03-17 13:19:44 0000 -------
Created an attachment (id=113564) [details]
Fix for invalid conversion.

Works for me on ~amd64.

------- Comment #17 From Jan Jitse Venselaar 2007-03-19 21:33:38 0000 -------
I can confirm that the patch from #16 works for me on ~amd64.

------- Comment #18 From ruckc 2007-03-21 09:08:47 0000 -------
i just resynced, and i came across this exact problem.  x86 side of things
though swig-1.3.31, python-2.5-r1, trying to install lcms-1.16

------- Comment #19 From Neil Bothwick 2007-03-22 00:08:49 0000 -------
The patch works with both ~amd64 and ~ppc here.

------- Comment #20 From teidakankan@gmail.com 2007-03-22 01:47:07 0000 -------
The patch works here on ~x86.

------- Comment #21 From ruckc 2007-03-22 02:59:17 0000 -------
so can we get this put into the ebuild/portage system so us little people can
use it?

------- Comment #22 From Stefan Schweizer 2007-03-22 07:17:00 0000 -------
I get a compile error here with this patch:

lcms_wrap.cxx: In function 'int SWIG_AsCharPtrAndSize(PyObject*, char**,
size_t*, int*)':
lcms_wrap.cxx:2919: error: 'Py_ssize_t' was not declared in this scope
lcms_wrap.cxx:2919: error: expected `;' before 'len'
lcms_wrap.cxx:2920: error: 'len' was not declared in this scope

------- Comment #23 From Lukasz Strzygowski (RETIRED) 2007-03-22 09:06:02 0000 -------
In 1.16, instead of patching lcms_wrap.cxx, put in src_unpack:
cd python && ./swig_lcms

------- Comment #24 From DocReedSolomon 2007-03-26 20:09:09 0000 -------
jesus fscking christ!
could someone finally fix this?
i am tired of this:
emerge --remue --skipfirst
just infact of lcms

------- Comment #25 From Xake 2007-03-26 21:39:21 0000 -------
..or you could 'echo =media-libs/lcms-1.16 -python >>
/etc/portage/packages.use' (if you do not need the python-bindings) or try one
of the fixes in a overlay until this bug is fixed or just stop spamming the
bugreport.

------- Comment #26 From Lukasz Strzygowski (RETIRED) 2007-03-27 09:35:06 0000 -------
Now it should be fixed. Sorry for the delay.