LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-24-2014, 03:08 PM   #1
jefsa
Member
 
Registered: Mar 2012
Posts: 83
Blog Entries: 1

Rep: Reputation: Disabled
Program will not run correctly using Slackware 14.1/Tcl 8.6.1


Hello All,

Our present terminals use Slackware 12.2 with Tcl 8.5.5 installed. We have a C program that runs in conjunction with it. When the associated script is executed a GUI appears that contain multiple function buttons that through the mouse can be selected to perform different functions.

We are updating some new machines with Slackware 14.1 with Tcl 8.6.1
installed and copying those working files associated with the script.

Through the help of the "Forum" I was able to get the the program to recompile where at first there were multiple errors. However, the GUI appears but function buttons do not operate. When pressed the GUI exits back to the terminal screen with an line error number.

Looked at function calls between the libraries, C and Tcl programs but nothing has lead to getting the GUI to work.

My question is, are there any differences between Slackware 12.2/Tcl 8.5.5 and Slackware 14.1/Tcl 8.6.1 that could cause this GUI not to work. I have searched for some possible answers but have found none!!

Thanks for any help!

Regards,

Jeff
 
Old 11-24-2014, 04:20 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
are you 100% sure it is TCL
and not the major changed in gcc4.8


install gcc 4.3 or 4.1

rebuild using that
and see if it works correctly
 
Old 11-24-2014, 06:32 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
Our present terminals use Slackware 12.2 with Tcl 8.5.5 installed.
.
.
We are updating some new machines with Slackware 14.1 with Tcl 8.6.1
Simple : Remove the tcl and tk packages, Slackware 14.1.
Then install the Slackware 12.2 { tcl, tk } packages, version 8.5.5 .

Probably no other application will use tcl / tk,
so the installed version is important for your app only.

-
 
Old 11-24-2014, 06:35 PM   #4
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Building Tcl 8.5.5 for Slackware 14.1 would be my recommendation. The source package and build scripts (those are the ones with the "SlackBuild" extension) for 12.2 and 14.1 are here:

http://slackware.osuosl.org/slackware-12.2/source/tcl/
http://slackware.osuosl.org/slackware-14.1/source/tcl/

Last edited by dugan; 11-24-2014 at 07:36 PM.
 
1 members found this post helpful.
Old 11-25-2014, 02:08 AM   #5
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
Quote:
Originally Posted by jefsa View Post
When pressed the GUI exits back to the terminal screen with an line error number.
you have forgotten to post the message, and possible also the line, or better the line plus a little around to have the context.


its very hard to reason about the problem without more information,
because obvisouly you have a running app where you can click buttons, so tcl/tk possible not the problem.
possible the program works and some preconditions are not fulfilled? (can not find the script I should call..)
 
Old 11-25-2014, 09:05 AM   #6
jefsa
Member
 
Registered: Mar 2012
Posts: 83

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hi JohnVV

I would like to try based on your suggestion to download gcc-4.2.4 which works with our
present Slackware 12.2 to the new machine with Slackware 14.1. I got the file downloaded
but where do I put it and and how do I use it? I would like to keep the present one that came with 14.1 which is gcc-4.8.2. but be able to select 4.2.4 for testing.

I am thinking that perhaps the compiler may not be the correct one for the older C program
we have even though with the help through the "Forum" I was able to recompile with 14.1.

Thanks for any help!

Regards,

Jeff
 
Old 11-25-2014, 09:42 AM   #7
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Are you running 32-bit or 64-bit Slackware 14.1? Slackware 12.2 was only 32 bits. Maybe install multilib and try compiling Tcl as a 32 bit executable.

If you were to use gcc-4.2.4 you would probably need multilib anyway if this is a 64-bit Slackware. To have both versions of gcc, you would probably have to unpack the package and rename the files so that there is no conflict between gcc-4.2.4 and gcc-4.8.2. Alternatively, if gcc-4.2.4 is only being used once, you could "upgradepkg gcc-4.2.4", compile the Tcl then "upgradepkg gcc-4.8.2_multilib-x86_64-1alien" again.
 
Old 11-25-2014, 10:07 AM   #8
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,863
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Sadly, I'm not a clairvoyant, so please explain exactly what did you try and exactly what error message did you get.
 
Old 11-25-2014, 10:14 AM   #9
jefsa
Member
 
Registered: Mar 2012
Posts: 83

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hi psionlO

The Slackware 14.1 is 64-bit. The script was written years ago before my time with a earlier version before 12.2. I do not have much experience so I do not understand on how to do all that has been posted. I have gcc-4.2.4 downloaded but I do not know what to do with it. Does it have to be extracted in a certain location to test? If so how is it done.

Thanks,

Regards,

Jeff
 
Old 11-25-2014, 11:30 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@jefsa :

`tcl8.5.5´ can be compiled with "the alien gcc-3.4.6 for Slackware"
http://www.slackware.com/~alien/slackbuilds/ >>
> gcc34/ > pkg64 >
. http://www.slackware.com/~alien/slac...64-2compat.tgz
. http://www.slackware.com/~alien/slac...64-2compat.tgz

* Edit line 13 in tcl.SlackBuild to : ARCH=${ARCH:-x86_64}
# export CC=gcc34 && sh tcl.SlackBuild


-

Last edited by knudfl; 11-25-2014 at 11:37 AM.
 
Old 11-25-2014, 11:51 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@jefsa :

And : Tcl source code has always been "perfect",
`8.5.5´ will also compile OK with your default gcc-4.8.2 :
# sh tcl.SlackBuild

... The package tcl-8.5.5-x86_64-1.tgz was created (again).
 
Old 11-25-2014, 12:12 PM   #12
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by jefsa View Post
I do not have much experience so I do not understand on how to do all that has been posted. I have gcc-4.2.4 downloaded but I do not know what to do with it.
Just start with multilib. Eric gives pretty straightforward instructions on how to install multilib and how to use it to create 32 bit executables.

http://www.slackware.com/~alien/multilib/
 
Old 11-25-2014, 12:19 PM   #13
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
I do not have much experience so I do not understand on how to do all that has been posted.
no worries

see knudfl's posts

now do you have Microsoft Windows Experience ?

going form slack 12 32 bit to slack 14 64 bit

is like BUILDING a visual studio 2005 project for a 32 bit install of XP
on a 64 bit win7 box with MS visual studio 2013 installed

the old .sln and .suo ( tcl.SlackBuild ) for vs 2005 will not translate over to VS 2013



the same thing is true with Linux
older ( xp / slax12) code will not work well on the NEW ( win7 / slax 14 ) os

you need to hack the build and configure files
and in some cases actually hack the program code
 
Old 11-25-2014, 12:46 PM   #14
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
I'm surprised that everyone's okay with the proposal to downgrade GCC. That sounds both excessively drastic and potentially unsafe to me.

Rebuilding TCL/TK and the C program would be both safer and more likely to work.
 
Old 11-25-2014, 02:12 PM   #15
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,863
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Actually, without knowing what the actual problem is, it is pretty hard to suggest a solution.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
want a ns2 program code in tcl MONICA Linux - Wireless Networking 1 04-23-2012 05:49 PM
not able to run tcl for mobiwan manjunath11 Linux - Newbie 6 11-05-2010 03:18 AM
[SOLVED] Wicd won't install correctly/run correctly (64-bit Slackware 13) bgraybr Slackware 3 04-01-2010 06:57 PM
amsn says tcl/tk not correctly installed? please help! phiqtion Linux - Newbie 2 05-29-2004 12:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration