Thread: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6
Brought to you by:
mdejong
From: Garcia, M. <Mau...@Ca...> - 2011-04-22 12:11:38
|
I am currently use 8.4 TCL and need to update to 8.6, but I unable to compile. Are there any known issues with this? Momann |
From: Georgios P. <pet...@ya...> - 2011-04-22 17:05:36
|
???? 22/4/2011 14:56, ?/? Garcia, Maurice ??????: > > I am currently use 8.4 TCL and need to update to 8.6, but I unable to > compile. Are there any known issues with this? > > *Momann* > > Why are you unable to compile it? I am using it one way only (i.e. I never create Tcl interps from Java), so I created a stubs-enabled version of it, and runs no matter the Tcl version... George |
From: Garcia, M. <Mau...@Ca...> - 2011-04-22 18:32:09
|
I installed ActiveState 8.5 I set my configure to the following: ./configure --prefix=/opt/tcl_Library \ --with-tcl=/opt/tcl_Library/lib \ --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 \ --with-jdk=/opt/jdk1.6.0_14/ Here is the / opt/tcl_Library/lib content: lib |-- libtcl8.5.a |-- libtcl8.5.so |-- libtclstub8.5.a |-- libtk8.5.a |-- libtk8.5.so |-- libtkstub8.5.a |-- libttkstub.a Here is my output: [root@dama tclBlend1.4.0]# ./configure --prefix=/opt/tcl_Library --with-tcl=/opt/tcl_Library/lib --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 --with-jdk=/opt/jdk1.6.0_14/ srcdir is /home/comcast/bin/tcl-blend/tclBlend1.4.0 checking for Tcl build in /opt/tcl_Library/lib checking for Thread build in /opt/tcl_Library/lib/tcl8.5/thread2.6.7 configure: error: Tcl was configued in /opt/tcl_Library/lib, but it has not been built, please build it and run configure again. There is a totally new directory structure with 8.6. I am not sure if that is part of the problem. Any thoughts? From: Georgios Petasis [mailto:pet...@ya...] Sent: Friday, April 22, 2011 12:47 PM To: tcl...@li... Subject: Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 Στις 22/4/2011 14:56, ο/η Garcia, Maurice έγραψε: I am currently use 8.4 TCL and need to update to 8.6, but I unable to compile. Are there any known issues with this? Momann Why are you unable to compile it? I am using it one way only (i.e. I never create Tcl interps from Java), so I created a stubs-enabled version of it, and runs no matter the Tcl version... George |
From: Ross, B. <Bil...@Ca...> - 2011-04-22 19:11:12
|
Could it be looking for tclConfig.sh in /opt/tcl_Library/lib/ I think that is where it would get the info on the TCL build Find tclConfig.sh in the new build and copy it to /opt/tcl_Library/lib/ From: Garcia, Maurice [mailto:Mau...@Ca...] Sent: Friday, April 22, 2011 2:32 PM To: pet...@ya...; A list for users of tcljava Subject: Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 I installed ActiveState 8.5 I set my configure to the following: ./configure --prefix=/opt/tcl_Library \ --with-tcl=/opt/tcl_Library/lib \ --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 \ --with-jdk=/opt/jdk1.6.0_14/ Here is the / opt/tcl_Library/lib content: lib |-- libtcl8.5.a |-- libtcl8.5.so |-- libtclstub8.5.a |-- libtk8.5.a |-- libtk8.5.so |-- libtkstub8.5.a |-- libttkstub.a Here is my output: [root@dama tclBlend1.4.0]# ./configure --prefix=/opt/tcl_Library --with-tcl=/opt/tcl_Library/lib --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 --with-jdk=/opt/jdk1.6.0_14/ srcdir is /home/comcast/bin/tcl-blend/tclBlend1.4.0 checking for Tcl build in /opt/tcl_Library/lib checking for Thread build in /opt/tcl_Library/lib/tcl8.5/thread2.6.7 configure: error: Tcl was configued in /opt/tcl_Library/lib, but it has not been built, please build it and run configure again. There is a totally new directory structure with 8.6. I am not sure if that is part of the problem. Any thoughts? From: Georgios Petasis [mailto:pet...@ya...] Sent: Friday, April 22, 2011 12:47 PM To: tcl...@li... Subject: Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 Στις 22/4/2011 14:56, ο/η Garcia, Maurice έγραψε: I am currently use 8.4 TCL and need to update to 8.6, but I unable to compile. Are there any known issues with this? Momann Why are you unable to compile it? I am using it one way only (i.e. I never create Tcl interps from Java), so I created a stubs-enabled version of it, and runs no matter the Tcl version... George |
From: Garcia, M. <Mau...@Ca...> - 2011-04-22 19:18:50
|
Thought of that also... it's there [root@dama lib]# ls -l total 5796 -rwxr-xr-x 1 root root 1670808 Apr 22 09:11 libtcl8.5.a -rwxr-xr-x 1 root root 1159563 Apr 22 09:11 libtcl8.5.so -rw-rw-r-- 1 root root 3028 Feb 4 04:42 libtclstub8.5.a -rwxr-xr-x 1 root root 1758250 Apr 22 09:11 libtk8.5.a -rwxr-xr-x 1 root root 1248123 Apr 22 09:11 libtk8.5.so -rw-rw-r-- 1 root root 4190 Feb 4 04:38 libtkstub8.5.a -rwxr-xr-x 1 root root 2090 Feb 4 04:35 libttkstub.a drwxr-xr-x 3 root root 4096 Apr 22 09:11 ppm drwxr-xr-x 2 root root 4096 Apr 22 09:11 tap8.5 drwxr-xr-x 5 root root 4096 Apr 22 09:11 tcl8 drwxr-xr-x 10 root root 4096 Apr 22 09:11 tcl8.5 -rw-r--r-- 1 root root 7924 Apr 22 09:11 tclConfig.sh -rw-r--r-- 1 root root 7924 Apr 22 09:11 tclConfig-shared.sh drwxr-xr-x 3 root root 4096 Apr 22 09:11 teapot drwxr-xr-x 6 root root 4096 Apr 22 09:11 tk8.5 -rw-r--r-- 1 root root 4697 Apr 22 09:11 tkConfig.sh -rw-r--r-- 1 root root 4697 Apr 22 09:11 tkConfig-shared.sh From: Ross, Bill [mailto:Bil...@Ca...] Sent: Friday, April 22, 2011 3:11 PM To: A list for users of tcljava Subject: Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 Could it be looking for tclConfig.sh in /opt/tcl_Library/lib/ I think that is where it would get the info on the TCL build Find tclConfig.sh in the new build and copy it to /opt/tcl_Library/lib/ From: Garcia, Maurice [mailto:Mau...@Ca...] Sent: Friday, April 22, 2011 2:32 PM To: pet...@ya...; A list for users of tcljava Subject: Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 I installed ActiveState 8.5 I set my configure to the following: ./configure --prefix=/opt/tcl_Library \ --with-tcl=/opt/tcl_Library/lib \ --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 \ --with-jdk=/opt/jdk1.6.0_14/ Here is the / opt/tcl_Library/lib content: lib |-- libtcl8.5.a |-- libtcl8.5.so |-- libtclstub8.5.a |-- libtk8.5.a |-- libtk8.5.so |-- libtkstub8.5.a |-- libttkstub.a Here is my output: [root@dama tclBlend1.4.0]# ./configure --prefix=/opt/tcl_Library --with-tcl=/opt/tcl_Library/lib --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 --with-jdk=/opt/jdk1.6.0_14/ srcdir is /home/comcast/bin/tcl-blend/tclBlend1.4.0 checking for Tcl build in /opt/tcl_Library/lib checking for Thread build in /opt/tcl_Library/lib/tcl8.5/thread2.6.7 configure: error: Tcl was configued in /opt/tcl_Library/lib, but it has not been built, please build it and run configure again. There is a totally new directory structure with 8.6. I am not sure if that is part of the problem. Any thoughts? From: Georgios Petasis [mailto:pet...@ya...] Sent: Friday, April 22, 2011 12:47 PM To: tcl...@li... Subject: Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 Στις 22/4/2011 14:56, ο/η Garcia, Maurice έγραψε: I am currently use 8.4 TCL and need to update to 8.6, but I unable to compile. Are there any known issues with this? Momann Why are you unable to compile it? I am using it one way only (i.e. I never create Tcl interps from Java), so I created a stubs-enabled version of it, and runs no matter the Tcl version... George |
From: Georgios P. <pet...@ya...> - 2011-04-22 20:48:13
|
I am using cmake to build my binaries against ActiveTcl. But I am using a stubs enabled TclBlend, I don't know if it is going to work in the general case. I can send you the cmake makefile if you want, although I have never tried to build it outside my application. George Στις 22/4/2011 21:31, ο/η Garcia, Maurice έγραψε: > > I installed ActiveState 8.5 > > I set my configure to the following: > > ./configure --prefix=/opt/tcl_Library \ > > --with-tcl=/opt/tcl_Library/lib \ > > --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 \ > > --with-jdk=/opt/jdk1.6.0_14/ > > Here is the / opt/tcl_Library/lib content: > > lib > > |-- libtcl8.5.a > > |-- libtcl8.5.so > > |-- libtclstub8.5.a > > |-- libtk8.5.a > > |-- libtk8.5.so > > |-- libtkstub8.5.a > > |-- libttkstub.a > > Here is my output: > > [root@dama tclBlend1.4.0]# ./configure > --prefix=/opt/tcl_Library > --with-tcl=/opt/tcl_Library/lib > --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 > --with-jdk=/opt/jdk1.6.0_14/ > > srcdir is /home/comcast/bin/tcl-blend/tclBlend1.4.0 > > checking for Tcl build in /opt/tcl_Library/lib > > checking for Thread build in /opt/tcl_Library/lib/tcl8.5/thread2.6.7 > > configure: error: Tcl was configued in /opt/tcl_Library/lib, but it > has not been built, please build it and run configure again. > > There is a totally new directory structure with 8.6. > > I am not sure if that is part of the problem. > > Any thoughts? > > *From:*Georgios Petasis [mailto:pet...@ya...] > *Sent:* Friday, April 22, 2011 12:47 PM > *To:* tcl...@li... > *Subject:* Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 > > Στις 22/4/2011 14:56, ο/η Garcia, Maurice έγραψε: > > I am currently use 8.4 TCL and need to update to 8.6, but I unable to > compile. Are there any known issues with this? > > *Momann* > > Why are you unable to compile it? > > I am using it one way only (i.e. I never create Tcl interps from > Java), so I created a stubs-enabled version of it, and runs no matter > the Tcl version... > > George > > > ------------------------------------------------------------------------------ > Fulfilling the Lean Software Promise > Lean software platforms are now widely adopted and the benefits have been > demonstrated beyond question. Learn why your peers are replacing JEE > containers with lightweight application servers - and what you can gain > from the move. http://p.sf.net/sfu/vmware-sfemails > > > _______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Garcia, M. <Mau...@Ca...> - 2011-04-22 21:23:53
|
I'll try it..thanks!!!! From: Georgios Petasis [mailto:pet...@ya...] Sent: Friday, April 22, 2011 4:47 PM To: tcl...@li... Subject: Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 I am using cmake to build my binaries against ActiveTcl. But I am using a stubs enabled TclBlend, I don't know if it is going to work in the general case. I can send you the cmake makefile if you want, although I have never tried to build it outside my application. George Στις 22/4/2011 21:31, ο/η Garcia, Maurice έγραψε: I installed ActiveState 8.5 I set my configure to the following: ./configure --prefix=/opt/tcl_Library \ --with-tcl=/opt/tcl_Library/lib \ --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 \ --with-jdk=/opt/jdk1.6.0_14/ Here is the / opt/tcl_Library/lib content: lib |-- libtcl8.5.a |-- libtcl8.5.so |-- libtclstub8.5.a |-- libtk8.5.a |-- libtk8.5.so |-- libtkstub8.5.a |-- libttkstub.a Here is my output: [root@dama tclBlend1.4.0]# ./configure --prefix=/opt/tcl_Library --with-tcl=/opt/tcl_Library/lib --with-thread=/opt/tcl_Library/lib/tcl8.5/thread2.6.7 --with-jdk=/opt/jdk1.6.0_14/ srcdir is /home/comcast/bin/tcl-blend/tclBlend1.4.0 checking for Tcl build in /opt/tcl_Library/lib checking for Thread build in /opt/tcl_Library/lib/tcl8.5/thread2.6.7 configure: error: Tcl was configued in /opt/tcl_Library/lib, but it has not been built, please build it and run configure again. There is a totally new directory structure with 8.6. I am not sure if that is part of the problem. Any thoughts? From: Georgios Petasis [mailto:pet...@ya...] Sent: Friday, April 22, 2011 12:47 PM To: tcl...@li...<mailto:tcl...@li...> Subject: Re: [tcljava-user] Does TCl Blend compiles with ActiveState 8.6 Στις 22/4/2011 14:56, ο/η Garcia, Maurice έγραψε: I am currently use 8.4 TCL and need to update to 8.6, but I unable to compile. Are there any known issues with this? Momann Why are you unable to compile it? I am using it one way only (i.e. I never create Tcl interps from Java), so I created a stubs-enabled version of it, and runs no matter the Tcl version... George ------------------------------------------------------------------------------ Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails _______________________________________________ tcljava-user mailing list tcl...@li...<mailto:tcl...@li...> https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Dan D. <dda...@ya...> - 2011-05-26 18:08:17
|
Can anyone explain why TclBlend is not holding on to the Java object when I use uplevel in a proc? And what I can do to work around it. package require java proc execute { args } { #puts "Executing: $args" <-- COMMENTED OR NOT COMMENTED # execute the command if {[catch { set ret [uplevel #0 $args] } errmsg]} { return "ERROR:[lindex [split $errmsg "\n"] 0]" } else { puts "Executed: $args" return "SUCCESS:$ret" } } With the puts executing line commented out in works: % execute set x [java::new String] SUCCESS:java0x2 % puts $x java0x2 % java::info class $x java.lang.String % With the puts executing line enabled: % execute set x [java::new String] Executing: set x java0x4 Executed: set x java0x4 SUCCESS:java0x4 % puts $x java0x4 % java::info class $x unknown java object "java0x4" % Is this because the [java::new String] actually executes before entering the execute function and if it is not immediately set to a variable in the next command, it will be released? My real script does something a little more complicated, reading the command(s) to be executed via a socket. This was the simplest example that demonstrates the problem. |
From: Mo D. <mo...@mo...> - 2011-05-26 18:22:17
|
The most likely cause of the problem is that you are expecting "x" to get set at the global scope, but by the time the set command is executed at the global scope, the internal rep is losing the Java representation. The most simple way to work around this would be to set a specific variable to the Java object, and then in the uplevel you reference that variable instead of passing the value to uplevel. Something like this: set ::GObj [java::new String] execute {set x $GObj} Mo On May 26, 2011, at 11:08 AM, Dan Diolosa wrote: > Can anyone explain why TclBlend is not holding on to the Java object when I use uplevel in a proc? And what I can do to work around it. > > package require java > > proc execute { args } { > > #puts "Executing: $args" <-- COMMENTED OR NOT COMMENTED > > # execute the command > if {[catch { set ret [uplevel #0 $args] } errmsg]} { > return "ERROR:[lindex [split $errmsg "\n"] 0]" > } else { > puts "Executed: $args" > return "SUCCESS:$ret" > } > } > > With the puts executing line commented out in works: > > % execute set x [java::new String] > SUCCESS:java0x2 > % puts $x > java0x2 > % java::info class $x > java.lang.String > % > > With the puts executing line enabled: > % execute set x [java::new String] > Executing: set x java0x4 > Executed: set x java0x4 > SUCCESS:java0x4 > % puts $x > java0x4 > % java::info class $x > unknown java object "java0x4" > % > > Is this because the [java::new String] actually executes before entering the execute function and if it is not immediately set to a variable in the next command, it will be released? > > My real script does something a little more complicated, reading the command(s) to be executed via a socket. This was the simplest example that demonstrates the problem. > > > ------------------------------------------------------------------------------ > vRanger cuts backup time in half-while increasing security. > With the market-leading solution for virtual backup and recovery, > you get blazing-fast, flexible, and affordable data protection. > Download your free trial now. > http://p.sf.net/sfu/quest-d2dcopy1_______________________________________________ > tcljava-user mailing list > tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcljava-user |
From: Dan D. <dda...@ya...> - 2011-05-26 19:58:42
|
Ahh, thanks for the quick reply. Unfortunately that wouldn't work for what I am really trying to do. I have a proc with a while loop reading a socket, to read in tcl commands. I'd prefer to have those commands executed at the global/top level, but I have found that I have the issue even just using eval. Here's the new condensed look at it. proc reading { sock } while { 1 } { if {[gets $sock buff] == -1} { puts "Client connection has been broken. Exiting." exit } # execute the command if {[catch { set ret [uplevel #0 $buff] } errmsg]} { puts $sock "ERROR:[lindex [split $errmsg "\n"] 0]" } else { puts "Executed: $buff" set retr [regsub -all "\n" $ret " "] puts $sock "SUCCESS:$retr" } } } Maybe I have a slightly different problem than my original email. If I send "set x [java::new String]" over the socket, unlike my previous example the [java::new String] isn't executed until I am entering the uplevel command, so it should be quickly set to the global x variable. But, if I send "set x [java::new String];set bogus 0", the x does hold a valid Java object reference. As long as the java operation isn't the last command to execute, it seems to work ok. The issue seems to be that the InternalRep isn't accepting the x variable inside the uplevel command as valid, unless another command is also executed in the uplevel. By adding "set bogus 0", it forces the uplevel to actually return $bogus instead of the $x. I wonder if this is a factor. If I just add ";set bogus 0" to all the received commands, things actually work, but I am returning 0 back on all successful executions, instead of the actual value I may be interested in. if {[catch { set ret [uplevel #0 "$buff;set bogus 0"] } errmsg]} { BTW, this happens the same even if I just use "eval" instead of "uplevel". Dan ________________________________ From: Mo DeJong <mo...@mo...> To: Dan Diolosa <dda...@ya...>; A list for users of tcljava <tcl...@li...> Sent: Thursday, May 26, 2011 2:21 PM Subject: Re: [tcljava-user] TclBlend issue with uplevel in proc The most likely cause of the problem is that you are expecting "x" to get set at the global scope, but by the time the set command is executed at the global scope, the internal rep is losing the Java representation. The most simple way to work around this would be to set a specific variable to the Java object, and then in the uplevel you reference that variable instead of passing the value to uplevel. Something like this: set ::GObj [java::new String] execute {set x $GObj} Mo On May 26, 2011, at 11:08 AM, Dan Diolosa wrote: Can anyone explain why TclBlend is not holding on to the Java object when I use uplevel in a proc? And what I can do to work around it. > >package require java > >proc execute { args } { > > #puts "Executing: $args" <-- COMMENTED OR NOT COMMENTED > > # execute the command > if {[catch { set ret [uplevel #0 $args] } errmsg]} { > return "ERROR:[lindex [split $errmsg "\n"] 0]" > } else { > puts "Executed: $args" > return "SUCCESS:$ret" > } >} > >With the puts executing line commented out in works: > >% execute set x [java::new String] >SUCCESS:java0x2 >% puts $x >java0x2 >% java::info class $x >java.lang.String >% > >With the puts executing line enabled: >% execute set x [java::new String] >Executing: set x java0x4 >Executed: set x java0x4 >SUCCESS:java0x4 >% puts $x >java0x4 >% java::info class $x >unknown java object "java0x4" >% > >Is this because the [java::new String] actually executes before entering the execute function and if it is not immediately set to a variable in the next command, it will be released? > >My real script does something a little more complicated, reading the command(s) to be executed via a socket. This was the simplest example that demonstrates the problem. > > >------------------------------------------------------------------------------ >vRanger cuts backup time in half-while increasing security. >With the market-leading solution for virtual backup and recovery, >you get blazing-fast, flexible, and affordable data protection. >Download your free trial now. >http://p.sf.net/sfu/quest-d2dcopy1_______________________________________________ >tcljava-user mailing list >tcl...@li... >https://lists.sourceforge.net/lists/listinfo/tcljava-user > |