Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 280766 - sys-apps/pkgcore installs Tk incorrectly (dev-tcltk/tix-8.4.* fails to install (root cause: bad tkConfig.sh))
Summary: sys-apps/pkgcore installs Tk incorrectly (dev-tcltk/tix-8.4.* fails to instal...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Brian Harring (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-08 15:09 UTC by BlGene
Modified: 2009-10-06 19:39 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Autoconf log file (config.log,40.27 KB, text/plain)
2009-08-08 15:14 UTC, BlGene
Details
tix-8.4.3 config.log file (tix-8.4.3_config.log,29.82 KB, text/plain)
2009-08-21 20:13 UTC, BlGene
Details
tix-8.4.3 config.log file using tcl/tk 8.5 (tix-8.4.3_config.log,30.06 KB, text/plain)
2009-08-28 23:08 UTC, BlGene
Details
tclConfig.sh (tclConfig.sh,7.69 KB, text/plain)
2009-09-01 14:38 UTC, BlGene
Details
tkConfig.sh (tkConfig.sh,4.27 KB, text/plain)
2009-09-01 14:39 UTC, BlGene
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BlGene 2009-08-08 15:09:12 UTC
I tried to install tix-8.4.2-r1 but the installation failed,

Reproducible: Always

Steps to Reproduce:
1. pmerge tix
Actual Results:  
./generic/tixInputO.c:17:19: error: tkInt.h: No such file or directory
./generic/tixInputO.c: In function 'Tix_MakeInputOnlyWindowExist':
./generic/tixInputO.c:123: error: 'TkWindow' undeclared (first use in this function)
./generic/tixInputO.c:123: error: (Each undeclared identifier is reported only once
./generic/tixInputO.c:123: error: for each function it appears in.)
./generic/tixInputO.c:123: error: 'winPtr' undeclared (first use in this function)
./generic/tixInputO.c:128: error: expected expression before ')' token
make: *** [tixInputO.o] Error 1
make: *** Waiting for unfinished jobs....
!!! ERROR: dev-tcltk/tix-8.4.2-r1 failed.
!!! Call stack:
!!!              ebuild-daemon.sh, line  201:  Called execute_phases 'compile'
!!!                     ebuild.sh, line  627:  Called dyn_compile
!!!   ebuild-default-functions.sh, line  266:  Called src_compile
!!!                     ebuild.sh, line 3017:  Called pkgcore_common_src_compile
!!!                     ebuild.sh, line 2839:  Called die
!!! The die message:
!!!  emake failed
!!!
!!! If you need support, post the topmost build error, and the call stack if relevant.

Expected Results:  
Successful install
Comment 1 BlGene 2009-08-08 15:14:24 UTC
Created attachment 200588 [details]
Autoconf log file
Comment 2 James Earl Spahlinger 2009-08-09 21:51:30 UTC
Please paste the output of 'emerge --info' into a bugzilla comment to assist the maintainers in resolving this issue

Comment 3 BlGene 2009-08-10 13:28:51 UTC
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.2.0, glibc-2.8_p20080602-r1, 2.6.28-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r5-x86_64-AMD_Athlon-tm-_64_Processor_3400+-with-gentoo-1.12.11.1
Timestamp of tree: Thu, 06 Aug 2009 18:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.2-r8, 2.6.2-r1
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache collision-protect confcache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/portage/local/layman/sunrise /usr/portage/local/layman/science /usr/local/portage /usr/local/initng-portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 apm bash-completion berkdb bzip2 cli cracklib crypt cups dbus debug doc dri examples fbcon fortran gd gdbm ggi gpm gstreamer hal hdf5 iconv imlib ipv6 isdnlog jpeg jpeg2k lash lcms libsaplerate lua mbox mmx mpi mudflap multilib ncurses nls nptl nptlonly opengl openmp pam pcre pdf perl png pppd python qt4 readline reflection sci-visualization/paraview sdl session spell spl sse sse2 ssl svg sysfs tcpd threads tiff truetype unicode xattr xcb xft xinerama xorg zlib" ALSA_CARDS="via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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" ELIBC="glibc" INITNG_PLUGINS=" also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands  envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile  logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher  stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="keyboard mouse magellan" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="radeon vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 4 BlGene 2009-08-18 22:10:47 UTC
please comment or assign to tcl-tk group. ( I don't think I can do that myself)
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2009-08-19 07:55:02 UTC
Which Tcl and Tk versions do you have installed?  And does -r2 work?
Comment 6 BlGene 2009-08-21 20:12:54 UTC
I get the same error when trying to install tix-8.4.2-r2. The tcl version is 8.4.18 and the tk version is 8.4.18-r1. tix-8.4.3 does not install with the following error message.

checking for Tcl private include files... Using srcdir found in tclConfig.sh: /usr/lib64/tcl8.4/include
checking for Tk private include files... configure: error: Cannot find private header tkInt.h in /var/tmp/portage/dev-lang/tk-8.4.18-r1/work/tk8.4.18

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/dev-tcltk/tix-8.4.3/work/Tix8.4.3/config.log
!!! ERROR: dev-tcltk/tix-8.4.3 failed.
!!! Call stack:
!!!              ebuild-daemon.sh, line  201:  Called execute_phases 'configure'
!!!                     ebuild.sh, line  627:  Called dyn_configure
!!!   ebuild-default-functions.sh, line  281:  Called src_configure
!!!                     ebuild.sh, line 3091:  Called pkgcore_eapi2_src_configure
!!!                     ebuild.sh, line 2926:  Called econf
!!!                     ebuild.sh, line 1261:  Called die
!!! The die message:
!!!  econf failed
!!!
!!! If you need support, post the topmost build error, and the call stack if relevant.


Comment 7 BlGene 2009-08-21 20:13:39 UTC
Created attachment 201895 [details]
tix-8.4.3 config.log file
Comment 8 Federico Ferri (RETIRED) gentoo-dev 2009-08-25 00:37:10 UTC
tix 8.4.3 works fine with tcl/tk 8.5 (pending stabilization)
Comment 9 Christian Faulhammer (RETIRED) gentoo-dev 2009-08-25 09:43:49 UTC
(In reply to comment #8)
> tix 8.4.3 works fine with tcl/tk 8.5 (pending stabilization)

 8.4.2-r2 is being stabilised in bug 281409.  Update that bug?
Comment 10 BlGene 2009-08-25 13:40:37 UTC
> tix 8.4.3 works fine with tcl/tk 8.5 (pending stabilization)

It didn't work for me ...

checking for Tcl private include files... Using srcdir found in tclConfig.sh: /usr/lib64/tcl8.5/include
checking for Tk private include files... configure: error: Cannot find private header tkInt.h in /var/tmp/portage/dev-lang/tk-8.5.7/work/tk8.5.7

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/dev-tcltk/tix-8.4.3/work/Tix8.4.3/config.log
!!! ERROR: dev-tcltk/tix-8.4.3 failed.
!!! Call stack:
!!!              ebuild-daemon.sh, line  201:  Called execute_phases 'configure'
!!!                     ebuild.sh, line  627:  Called dyn_configure
!!!   ebuild-default-functions.sh, line  281:  Called src_configure
!!!                     ebuild.sh, line 3091:  Called pkgcore_eapi2_src_configure
!!!                     ebuild.sh, line 2926:  Called econf
!!!                     ebuild.sh, line 1261:  Called die
!!! The die message:
!!!  econf failed
!!!
!!! If you need support, post the topmost build error, and the call stack if relevant.

phases failed
 * Resolving...
Processing 1 of 1: dev-tcltk/tix-8.4.3
!!! Failed to build config wrapped(use): ebuild src: dev-tcltk/tix-8.4.3: Failed build operation: configure: Failed building (False/0 return from handler)
Comment 11 Bert Karwatzki 2009-08-28 09:08:51 UTC
Can you append the complete build.log? The errors in the config.log occur even if the installation works.
Comment 12 BlGene 2009-08-28 23:08:00 UTC
Created attachment 202566 [details]
tix-8.4.3 config.log file using tcl/tk 8.5
Comment 13 Federico Ferri (RETIRED) gentoo-dev 2009-08-31 18:07:53 UTC
so, you don't have /usr/lib64/tk8.5/include/generic/tkInt.h?
your environment is terribly broken, then.

try re-emerging tcl/tk, just in case you got something not up-to-date.

I asked amd64 testers which cannot reproduce this
Comment 14 matt 2009-08-31 19:40:12 UTC
i tried several combinations of tcl, tk, tix and can not reproduce this error.

dev-lang/tcl-8.4.18, dev-lang/tk-8.4.18-r1, dev-tcltk/tix-8.4.3 build ok.

dev-lang/tcl-8.5.7, dev-lang/tk-8.5.7, dev-tcltk/tix-8.4.3 build ok.

dev-lang/tcl-8.5.7, dev-lang/tk-8.5.7, dev-tcltk/tix-8.4.2-r2 build ok.

dev-lang/tcl-8.4.18, dev-lang/tk-8.4.18-r1, dev-tcltk/tix-8.4.2-r1 build ok.

reply to comment #6 and comment #10:  why would tix be looking in /var/tmp/portage/dev-lang/tk-8.4.18-r1/work/tk8.4.18 ?
Comment 15 BlGene 2009-09-01 12:06:52 UTC
I do have the /usr/lib64/tk8.5/include/generic/tkInt.h file, however autoconf seems to be looking for the file in the /var/tmp/portage/dev-lang/tk-8.5.7/work/tk8.5.7 directory. I tried creating the /var/tmp/portage/dev-lang/tk-8.5.7/work/tk8.5.7 directory an placing the tkInt.h file inside it but that did not seem to work either. 

I tried installing tix-8.4.2-r2 again which does get past the configure stage. Here I get the following error:

x86_64-pc-linux-gnu-gcc -pipe -DPACKAGE_NAME=\"Tix\" -DPACKAGE_TARNAME=\"tix\" -DPACKAGE_VERSION=\"8.4.2\" -DPACKAGE_STRING=\"Tix\ 8.4.2\" -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_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1   -I. -I"./generic" -I. -I"./unix" -I"/usr/lib64/tcl8.5/include/generic" -I"/usr/lib64/tcl8.5/include/unix" -I"/var/tmp/portage/dev-lang/tk-8.5.7/work/tk8.5.7/generic" -I"/var/tmp/portage/dev-lang/tk-8.5.7/work/tk8.5.7/unix"     -march=k8 -O2 -O2 -fomit-frame-pointer -Wall -Wno-implicit-int -fPIC -c `echo ./generic/tixInputO.c`
./generic/tixInputO.c:17:19: error: tkInt.h: No such file or directory

Since tkInt.h is in the /usr/lib64/tk8.5/include/generic/ directory, I think the compile command needs to include not only -I"/usr/lib64/tcl8.5/include/generic", but also -I"/usr/lib64/tk8.5/include/generic"
Comment 16 Federico Ferri (RETIRED) gentoo-dev 2009-09-01 12:50:07 UTC
please attach your /usr/lib/tclConfig.sh and /usr/lib/tkConfig.sh files
Comment 17 Federico Ferri (RETIRED) gentoo-dev 2009-09-01 12:55:27 UTC
please attach your /usr/lib64/tclConfig.sh and /usr/lib64/tkConfig.sh files
Comment 18 BlGene 2009-09-01 14:38:56 UTC
Created attachment 202872 [details]
tclConfig.sh
Comment 19 BlGene 2009-09-01 14:39:19 UTC
Created attachment 202873 [details]
tkConfig.sh
Comment 20 Federico Ferri (RETIRED) gentoo-dev 2009-09-01 15:18:05 UTC
your tkConfig.sh is definitely wrong

you have:

TK_BUILD_STUB_LIB_SPEC='-L/var/tmp/portage/dev-lang/tk-8.5.7/work/tk8.5.7/unix -ltkstub8.5'
TK_BUILD_STUB_LIB_PATH='/var/tmp/portage/dev-lang/tk-8.5.7/work/tk8.5.7/unix/libtkstub8.5.a'

whereas a sane tkConfig.sh has:

TK_BUILD_STUB_LIB_SPEC='-L/usr/lib64 -ltkstub8.5'
TK_BUILD_STUB_LIB_PATH='/usr/lib64/libtkstub8.5.a'

have you tried doing an  emerge --sync and re-emerging tk?
Comment 21 BlGene 2009-09-04 13:32:00 UTC
This appears to have been caused by pkgcore creating a different tkConfig.sh file. After re-installing tk with portage tix installed fine.
Comment 22 Federico Ferri (RETIRED) gentoo-dev 2009-09-04 19:11:35 UTC
cheers!
Comment 23 Christian Faulhammer (RETIRED) gentoo-dev 2009-09-07 10:18:02 UTC
Reopen for proper assignee
Comment 24 Brian Harring (RETIRED) gentoo-dev 2009-10-06 04:38:17 UTC
Fun bug.  The ebuild is sensitive to a slight difference in S between the managers.

For pkgcore, S=/var/tmp/portage/dev-lang/work//tk8.5.7/unix
For portage, S=/var/tmp/portage/dev-lang/work/tk8.5.7/unix

That slash makes all the difference and is due to a protective measure I tacked in way back for WORKDIR- trailing slash to protect against an ebuild dev making an easy mistake.

CC'ing pms-bugs on this; the wording for WORKDIR and '/' likely needs to be tightened up (specifically no trailing slash going by this case).  I do recall seeing other ebuilds in the past that would've been affected in a similar way.
Comment 25 Federico Ferri (RETIRED) gentoo-dev 2009-10-06 05:00:34 UTC
(In reply to comment #24)

> For pkgcore, S=/var/tmp/portage/dev-lang/work//tk8.5.7/unix
> For portage, S=/var/tmp/portage/dev-lang/work/tk8.5.7/unix
> 
> That slash makes all the difference

are you sure?
how does it make a difference?
does not (and must not) make a difference for bash (unless the double slash is at start of path), nor in tclsh:

$ tclsh
% file split /usr/local//bin
/ usr local bin
% ^D

if tkConfig.sh is sensitive to a double slash in the paths, you should be able to reproduce the issue by simply replace / with // in the middle of some path.

I'll have some time to work on reproducing it tomorrow, or in the WE.
Comment 26 Brian Harring (RETIRED) gentoo-dev 2009-10-06 05:22:14 UTC
(In reply to comment #25)
> (In reply to comment #24)
> 
> > For pkgcore, S=/var/tmp/portage/dev-lang/work//tk8.5.7/unix
> > For portage, S=/var/tmp/portage/dev-lang/work/tk8.5.7/unix
> > 
> > That slash makes all the difference
> 
> are you sure?
> how does it make a difference?
> does not (and must not) make a difference for bash (unless the double slash is
> at start of path), nor in tclsh:

I'm guessing I'm the only person who thought to look at the ebuild :)

It matters because the ebuild tries to sed WORKDIR out of tkConfig.sh as part of it's install process.  Pkgcore's WORKDIR differs slightly (still a valid path however) but enough to throw off the sed matching, resulting in build paths not being removed from tkConfig.sh

As for reproducing it, it's easy.  If you use portage, locally tweak the S="${WORKDIR}/${PF}" into S="${WORKDIR}//${PF}" .  That should trigger it.
Comment 27 Brian Harring (RETIRED) gentoo-dev 2009-10-06 05:24:33 UTC
Addendum... the next pkgcore release I put out will match portage path normalization for it's vars to avoid this class of issue in the future (the protection I added is useful, but it introduces a very subtle potential for bugs like this).

It'll be a bit for the release to land however; a quick duct tape in tk would be appreciated.  If not, no worries, I understand.
Comment 28 Ciaran McCreesh 2009-10-06 13:52:42 UTC
PMS is deliberately lax regarding slashes on directories. There was talk of getting it fixed up in a future EAPI to require a trailing slash for all directory vars (at the time Portage was inconsistent on this, don't know if it still is). Until then, it's up to ebuilds to ensure that they accept both formats.
Comment 29 Federico Ferri (RETIRED) gentoo-dev 2009-10-06 19:28:13 UTC
(In reply to comment #26)

> > are you sure?

> I'm guessing I'm the only person who thought to look at the ebuild :)

ah! you are damn right!!
I realized that after re-reading the ebuild a couple of times (I already found it "as is"... perhaps with the tcltk 8.6 release I'll take the chance to clean it up)

fixxed in tk-8.5.7-r1
Comment 30 Federico Ferri (RETIRED) gentoo-dev 2009-10-06 19:30:51 UTC
could checking for $WORKDIR in text files (*.c *.cc *.h *.sh *.tcl *.py etc...) be a useful QA check?
would you like to propose it on -dev? (I'm busy with life and school right now)
Comment 31 Brian Harring (RETIRED) gentoo-dev 2009-10-06 19:39:55 UTC
I think I'd rather just implement it then propose it on dev ;)