Hello,
How would you fix such an error: Tk object version 804.028503 does not match $Tk::XS_VERSION 804.029 at /usr/lib/perl5/DynaLoader.pm line 223
(fedora 14)
On Wed, Mar 07, 2012 at 03:20:20PM +0000, Patrick Dupre wrote:
Hello,
How would you fix such an error: Tk object version 804.028503 does not match $Tk::XS_VERSION 804.029 at /usr/lib/perl5/DynaLoader.pm line 223
This means that the version number in the perl file Tk.pm doesn't match the version number in the compiled binary Tk.so. Why they differ is probably down to how Tk was installed or upgraded; or its possible that an environment variable (e.g. LD_LIBRARY_PATH or PERL5LIB) is set, causing perl to pick up the two files from two different installations.
perl -V will show you what paths perl is picking up.
On Thu, 8 Mar 2012, Dave Mitchell wrote:
On Wed, Mar 07, 2012 at 03:20:20PM +0000, Patrick Dupre wrote: Hello,
How would you fix such an error: Tk object version 804.028503 does not match $Tk::XS_VERSION 804.029 at /usr/lib/perl5/DynaLoader.pm line 223
This means that the version number in the perl file Tk.pm doesn't match the version number in the compiled binary Tk.so. Why they differ is probably down to how Tk was installed or upgraded; or its possible that an environment variable (e.g. LD_LIBRARY_PATH or PERL5LIB) is set, causing perl to pick up the two files from two different installations.
perl -V will show you what paths perl is picking up.
Thank for the help,
Here is my perl -V
Summary of my perl5 (revision 5 version 12 subversion 4) configuration:
Platform: osname=linux, osvers=2.6.32-131.2.1.el6.x86_64, archname=i386-linux-thread-multi uname='linux x86-02.phx2.fedoraproject.org 2.6.32-131.2.1.el6.x86_64 #1 smp wed may 18 07:07:37 edt 2011 i686 i686 i386 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -Dccdlflags=-Wl,--enable-new-dtags -DDEBUGGING=-g -Dversion=5.12.4 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib/perl5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share/perl5 -Darchlib=/usr/lib/perl5 -Dvendorarch=/usr/lib/perl5 -Darchname=i386-linux-thread-multi -Duseshrplib -Dusethreads -Duseithreads -Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dotherlibdirs=/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi:/usr/local/lib/perl5/site_perl/5.10.0:/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi:/usr/lib/perl5/vendor_perl:/usr/lib/perl5/site_perl' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.5.1 20100924 (Red Hat 4.5.1-4)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.13.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.13' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,--enable-new-dtags -Wl,-rpath,/usr/lib/perl5/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -L/usr/local/lib'
Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Nov 4 2011 16:23:30 %ENV:
PERL5LIB=":/home/pdupre/perl_lib/i386-linux-thread-multi:/home/pdupre/perl_lib/i386-linux-thread-multi" PERL_LIB="/home/pdupre/perl_lib/i386-linux-thread-multi" @INC: /home/pdupre/perl_lib/i386-linux-thread-multi /home/pdupre/perl_lib/i386-linux-thread-multi /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl5 /usr/share/perl5 /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl
But I do not see anything about Tk!
The problem appear after an upgrade from fedora 13 to 14.
On Thu, Mar 08, 2012 at 12:13:30PM +0000, Patrick Dupre wrote:
On Thu, 8 Mar 2012, Dave Mitchell wrote:
This means that the version number in the perl file Tk.pm doesn't match the version number in the compiled binary Tk.so. Why they differ is probably down to how Tk was installed or upgraded; or its possible that an environment variable (e.g. LD_LIBRARY_PATH or PERL5LIB) is set, causing perl to pick up the two files from two different installations.
perl -V will show you what paths perl is picking up.
Here is my perl -V
[snip]
PERL5LIB=":/home/pdupre/perl_lib/i386-linux-thread-multi:/home/pdupre/perl_lib/i386-linux-thread-multi" PERL_LIB="/home/pdupre/perl_lib/i386-linux-thread-multi"
But I do not see anything about Tk!
The problem appear after an upgrade from fedora 13 to 14.
Your PERL5LIB and PERL_LIB environment variables are pointing to an area which might be a separate perl installation, or may contain Tk files that were built under an older perl, hence the mixing of versions.
As a test, try unsetting those two variables and see if you can load Tk:
$ bash # start a subshell $ unset PERL5LIB PERL_LIB $ perl -MTk -e 1 $ exit
if that runs without errors, then that will confirm the location of the problem. After that, you'll need to decide why those variables were set, and whether you need to do something similar for your new environment.
On Thu, 8 Mar 2012, Dave Mitchell wrote:
On Thu, Mar 08, 2012 at 12:13:30PM +0000, Patrick Dupre wrote: On Thu, 8 Mar 2012, Dave Mitchell wrote:
This means that the version number in the perl file Tk.pm doesn't match the version number in the compiled binary Tk.so. Why they differ is probably down to how Tk was installed or upgraded; or its possible that an environment variable (e.g. LD_LIBRARY_PATH or PERL5LIB) is set, causing perl to pick up the two files from two different installations.
perl -V will show you what paths perl is picking up.
Here is my perl -V
[snip]
PERL5LIB=":/home/pdupre/perl_lib/i386-linux-thread-multi:/home/pdupre/perl_lib/i386-linux-thread-multi" PERL_LIB="/home/pdupre/perl_lib/i386-linux-thread-multi"
But I do not see anything about Tk!
The problem appear after an upgrade from fedora 13 to 14.
Your PERL5LIB and PERL_LIB environment variables are pointing to an area which might be a separate perl installation, or may contain Tk files that were built under an older perl, hence the mixing of versions.
As a test, try unsetting those two variables and see if you can load Tk:
$ bash # start a subshell $ unset PERL5LIB PERL_LIB $ perl -MTk -e 1 $ exit
No, it does help. This 2 variables are just set to be able to call my own perl libraries I have the same issue without setting them.
if that runs without errors, then that will confirm the location of the problem. After that, you'll need to decide why those variables were set, and whether you need to do something similar for your new environment.
On Thu, Mar 08, 2012 at 01:58:46PM +0000, Patrick Dupre wrote:
No, it does help. This 2 variables are just set to be able to call my own perl libraries I have the same issue without setting them.
Ok, in that case, could you run the following script, using the perl you're having trouble with:
for (@INC) { next unless -d; print "$_\n"; system("find $_ -name 'Tk.*' -ls"); }
Also, when replying to this email, could you use the standard quoting convention ('> ') when including text from the person you;re replying to; otherwise it makes it extremely difficult to see who wrote what, thanks.
On Thu, Mar 08, 2012 at 01:58:46PM +0000, Patrick Dupre wrote:
No, it does help. This 2 variables are just set to be able to call my own perl libraries I have the same issue without setting them.
Ok, in that case, could you run the following script, using the perl you're having trouble with:
for (@INC) { next unless -d; print "$_\n"; system("find $_ -name 'Tk.*' -ls"); }
Also, when replying to this email, could you use the standard quoting convention ('> ') when including text from the person you;re replying to; otherwise it makes it extremely difficult to see who wrote what, thanks.
/usr/local/lib/perl5 525139 20 -r--r--r-- 1 root root 18483 May 27 2010 /usr/local/lib/perl5/Tk.pm 525182 4 -r--r--r-- 1 root root 3140 Feb 10 2007 /usr/local/lib/perl5/Tk/Tk.xbm 525334 4 -r--r--r-- 1 root root 1326 Feb 10 2007 /usr/local/lib/perl5/Tk/Tk.xpm 525091 0 -r--r--r-- 1 root root 0 Nov 10 2010 /usr/local/lib/perl5/auto/Tk/Tk.bs 525138 8 -r--r--r-- 1 root root 6388 Feb 10 2007 /usr/local/lib/perl5/Tk.pod /usr/local/share/perl5 /usr/lib/perl5 7394 8 -rw-r--r-- 1 root root 6431 Oct 24 2009 /usr/lib/perl5/PDL/Graphics/TriD/Tk.pm 7857 4 -rw-r--r-- 1 root root 1326 May 13 2010 /usr/lib/perl5/Tk/Tk.xpm 7856 4 -rw-r--r-- 1 root root 3140 May 13 2010 /usr/lib/perl5/Tk/Tk.xbm 8191 908 -rwxr-xr-x 1 root root 929268 May 13 2010 /usr/lib/perl5/auto/Tk/Tk.so 139128 20 -rw-r--r-- 1 root root 18487 May 13 2010 /usr/lib/perl5/Tk.pm 141720 8 -rw-r--r-- 1 root root 6388 May 13 2010 /usr/lib/perl5/Tk.pod /usr/share/perl5 /usr/lib/perl5 7394 8 -rw-r--r-- 1 root root 6431 Oct 24 2009 /usr/lib/perl5/PDL/Graphics/TriD/Tk.pm 7857 4 -rw-r--r-- 1 root root 1326 May 13 2010 /usr/lib/perl5/Tk/Tk.xpm 7856 4 -rw-r--r-- 1 root root 3140 May 13 2010 /usr/lib/perl5/Tk/Tk.xbm 8191 908 -rwxr-xr-x 1 root root 929268 May 13 2010 /usr/lib/perl5/auto/Tk/Tk.so 139128 20 -rw-r--r-- 1 root root 18487 May 13 2010 /usr/lib/perl5/Tk.pm 141720 8 -rw-r--r-- 1 root root 6388 May 13 2010 /usr/lib/perl5/Tk.pod /usr/share/perl5 /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl
My understanding is that there is 2 Tk installed: perl-Tk-804.028-12.fc14.i686 in /usr/lib/perl5 and one in /usr/local/lib/perl5 which probably due to cpan Tk-804.029-pvHDks Some perl packages are not available from fedora and I had to use cpan. It looks like that a second Tk had then be installed. cpan does not allow to uninstall the packages, thus I probably need to do it manually, or is it better to uninstall the rpm package?
Thank for your help.
On Thu, Mar 08, 2012 at 03:07:55PM +0000, Patrick Dupre wrote:
My understanding is that there is 2 Tk installed: perl-Tk-804.028-12.fc14.i686 in /usr/lib/perl5 and one in /usr/local/lib/perl5 which probably due to cpan Tk-804.029-pvHDks Some perl packages are not available from fedora and I had to use cpan. It looks like that a second Tk had then be installed. cpan does not allow to uninstall the packages, thus I probably need to do it manually, or is it better to uninstall the rpm package?
Well, the installation under /usr/local seems to be older, and seems to be broken (it's missing Tk.so), so I'd stick with the rpm version. Just manually delete the various Tk* files from under /usr/local, as listed earlier.