Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 232538

Summary: dev-php5/php-gtk-2.0.0: provides libtool version errors while trying to compile
Product: Gentoo Linux Reporter: Kfir Ozer <kfirufk>
Component: New packagesAssignee: PHP Bugs <php-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 220519    
Attachments: build.log

Description Kfir Ozer 2008-07-21 06:58:31 UTC
when i try to compile php-gtk, i get the following libtool related messages:
/var/tmp/portage/dev-php5/php-gtk-2.0.0/work/php-gtk-2.0.0/libtool: line 460: CDPATH: command not found
/var/tmp/portage/dev-php5/php-gtk-2.0.0/work/php-gtk-2.0.0/libtool: line 1152: func_opt_split: command not found
libtool: Version mismatch error.  This is libtool 2.2.4, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.4
libtool: and run autoconf again.
make: *** [ext/gtk+/php_gtk+.lo] Error 63
make: *** Waiting for unfinished jobs....


Reproducible: Always

Steps to Reproduce:
1. emerge php-gtk
Actual Results:  
/var/tmp/portage/dev-php5/php-gtk-2.0.0/work/php-gtk-2.0.0/libtool: line 460: CDPATH: command not found
/var/tmp/portage/dev-php5/php-gtk-2.0.0/work/php-gtk-2.0.0/libtool: line 1152: func_opt_split: command not found
libtool: Version mismatch error.  This is libtool 2.2.4, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.4
libtool: and run autoconf again.
make: *** [ext/gtk+/php_gtk+.lo] Error 63
make: *** Waiting for unfinished jobs....


Expected Results:  
to compile properly

Portage 2.2_rc1 (default/linux/x86/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo i686)
=================================================================
System uname: Linux-2.6.26-gentoo-i686-Intel-R-_Pentium-R-_D_CPU_3.20GHz-with-glibc2.0
Timestamp of tree: Sun, 20 Jul 2008 01:45:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r6, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.hamakor.org.il/pub/mirrors/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/desktop-effects /usr/local/portage/layman/kvm /usr/local/portage"
SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage"
USE="3ds 7zip X a52 aac aalib acl acpi aio alsa amarok ao apache2 avahi bash-completion beagle bidi bluetooth bzip2 cairo cal3d cdda cddb cdio cdparanoia cdr cegui cg cli cracklib crypt cups curl cvs cxx dbus devhelp devil directfb divx dri dssi dv dvb dvd dvdr dvdread eds enca encode evo exif expat fam fame fasttrack fax fbcon ffmpeg firefox flac fltk fluidsynth fortran fping ftp fuse fusion galago gconf gcrypt gd gdbm geoip gif gimp glade glitz glut gmedia gnome gnomecanvas gnutella gnutls gpgme gphoto2 gpm graphviz gsf gstreamer gtk gtkhtml guile hal hdri iconv icu id3tag idn ifp imagemagick imap imlib inotify ipv6 isdnlog jabber jack java javascript jbig joystick jpeg kerberos keyring kqemu krb4 ladspa latex ldap libcaca libedit libgda libnotify libsamplerate libsexy libvisual libwww log4j logrotate lua lzo mad mailwrapper matroska mbox mbrola md5sum midi mikmod mjpeg mmap mng mono motif mp2 mp3 mp4 mpeg mplayer msn mudflap musepack musicbrainz mysql mythtv nautilus ncurses networkmanager nls nntp nptl nptlonly nsplugin nvtv ode offensive ogg openal openexr opengl openmp pam pccts pcre pdf perl php pidgin png pop portaudio ppds pppd prelude procmail pth pulseaudio python qdbm qt3 qt4 quicktime radius rar readline real realmedia reflection samba sasl scanner scintilla sdl sdl-image session slang smime smp smtp sndfile snmp sourceview speex spell spl sql sqlite ssl subversion svg svga swig syslog taglib tcl tcpd theora threads tiff timidity tk tracker truetype twolame unicode upnp usb v4l v4l2 vala valgrind vcd vdr verse vim-syntax vorbis wavpack wmf wmp wxwindows x264 x86 xaim xanim xcb xft xine xinerama xml xorg xosd xpm xscreensaver xulrunner xv xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon ati fglrx vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Rafał Mużyło 2008-07-21 10:47:04 UTC
This is not-quite duplicate of bug 220519 (it was expected that this may eventually surface).
Comment 2 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-21 13:04:09 UTC
Anant, can you please take a look? I've been trying to fix this for some hours now and decided to give up. Apparently they are emulating autotools behaviour partly in their own build scripts (at least aclocal)...
Comment 3 Rafał Mużyło 2008-07-21 14:57:54 UTC
Just curious, what was already tried.
My first guess would be to use php-ext-source-r1_phpize instead
of buildconf and to move it to src_unpack (as QAs advise).
Comment 4 Rafał Mużyło 2008-07-21 15:03:50 UTC
I'm looking at the online cvs tree, not on the tarball,
so I may be wrong, but buildconf creates aclocal.m4 by
cat acinclude.m4 ./build/libtool.m4 php_gtk.m4.
Somehow I don't think build/libtool.m4 gets updated, so this may be the origin 
of the bug.
Comment 5 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-21 15:06:47 UTC
(In reply to comment #3)
> Just curious, what was already tried.
> My first guess would be to use php-ext-source-r1_phpize instead
> of buildconf and to move it to src_unpack (as QAs advise).
Yeah, that was indeed the first thing I tried, and eautoreconf failed with undefined references to certain M4 macros, namely GLIB_* and autoconf-related (why would those not be available!?).

(In reply to comment #4)
> I'm looking at the online cvs tree, not on the tarball,
> so I may be wrong, but buildconf creates aclocal.m4 by
> cat acinclude.m4 ./build/libtool.m4 php_gtk.m4.
> Somehow I don't think build/libtool.m4 gets updated, so this may be the origin 
> of the bug.
Yes, it's the same in the released version and this file (which is "generated" by phpize) is indeed not touched by elibtoolize/eautoreconf.
Manually copying might work, but I doubt that this would be the correct solution...
Comment 6 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-21 15:10:08 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > Just curious, what was already tried.
> > My first guess would be to use php-ext-source-r1_phpize instead
> > of buildconf and to move it to src_unpack (as QAs advise).
> Yeah, that was indeed the first thing I tried, and eautoreconf failed with
> undefined references to certain M4 macros, namely GLIB_* and autoconf-related
> (why would those not be available!?).
To be exact, I saw these messages: http://bugs.php.net/bug.php?id=27630
The "fix" in CVS is this cat hack, so... still no idea how to fix this in the autotools-style (and I won't dare asking upstream as they simply want you to use only certain versions of autotools/libtool etc.).
Comment 7 Rafał Mużyło 2008-07-21 15:29:43 UTC
Frankly, phpize is sort of broken anyway wrt. libtool 2,
as it cats only libtool.m4 (meaning it missed those other macros,
that are now in separate files).
What scares me most is the fact that they're thinking about replacing
autotools with cmake.
But, unless I'm missing something, those macros, you mentioned are in
php_gtk.m4.
Would you mind posting build.log of that failed attempt and the exact error messages from autotools ?
Maybe simply setting AT_M4DIR to a correct value will be enough.
Comment 8 Kfir Ozer 2008-07-21 23:45:14 UTC
Created attachment 161059 [details]
build.log
Comment 9 Rafał Mużyło 2008-07-22 12:53:38 UTC
Looks like I need to be a bit more specific:
I think following should work:
don't run buildconf, run php-ext-source-r1_phpize instead,
but set AT_M4DIR=${S} (I'm just not sure, if this can be simply set
or will php-ext-source-r1_phpize have to be inserted verbatim, with
AT_M4DIR set in the eautoreconf line.

As far as I can tell, buildconf does only:
1. phpize (which is more or less correct, at least it would be,
if not for PHP_AUTOCONF=\"touch configure\" PHP_AUTOHEADER=\"touch config.h.in\"
part that may affect eautoreconf)
2. runs make on build2/build.mk, which tries to regenerate configure in a way,
that incompatible with eautoreconf, cause it cats build2/libtool.m4, which 
AFAICT doesn't get updated to libtool 2
so ltmain.sh gets updated, but the macro is still old, and we get this bug.
Comment 10 Kfir Ozer 2008-07-22 13:18:43 UTC
I did exactly as you said and php-gtk compiled properly!
I replaced buildconf with php-ext-source-r1_phpize and i add AT_M4DIR=${S} at the beginning of the ebuild.

thanks!
do you need me to provide any other information ?
Comment 11 Christian Hoffmann (RETIRED) gentoo-dev 2008-07-22 14:38:01 UTC
(In reply to comment #9)
> Looks like I need to be a bit more specific:
> I think following should work:
> don't run buildconf, run php-ext-source-r1_phpize instead,
> but set AT_M4DIR=${S} (I'm just not sure, if this can be simply set
> or will php-ext-source-r1_phpize have to be inserted verbatim, with
> AT_M4DIR set in the eautoreconf line.
Indeed, this works. Thank you very much! =)
(Just committed php-gtk-2.0.1 with the fix)

I additionally overrode PHP_AUTO{CONF,HEADER} with "true" to silence the errors. The call to autoconf/autoheader by phpize is unncessary anyway, as we run eautoreconf later. No idea if this is generally true and we could optimize out that part in the eclass already. But as I don't plan on breaking anything again.... ;)