TPTP and Ubuntu

Feb 7th, 2008

Installing TPTP under Eclipse isn’t as straightforward as other Eclipse plugins. Installing the plugin itself is easy, it can be done using Eclipse Update manager. But the getting the Agent Controller to work needs some tweaking.

The first part is really well documented under TPTP installation guide in http://www.eclipse.org/tptp/home/downloads/installguide/InstallGuide44.htm so I won’t cover that. Also most of the Agent Controllers installation instructions are covered in http://www.eclipse.org/tptp/home/downloads/installguide/agentcontroller_44/linux/getting_started.html. Unfortunately under Ubuntu you need a bit more than what those guides cover so I reuse some parts from there to maintain the readability.

Main part in installing the Agent Controller is easy, get the appropriate runtime package from http://www.eclipse.org/tptp/home/downloads/?ver=4.4.0#rac. Unpack it to your preferred location, considering that you will start running it from there.

First stumbling block is libstdc++-libc6.2-2.so.3 . There is no package called compat-libstdc++ in Ubuntu, instead you have to

sudo apt-get install libstdc++2.10-glibc2.2

Next step would be setting up the Agent Controller itself. The original guide says it all:

  1. Ensure that the files in the <install-dir>/bin and <install-dir>/lib directory are executable.
  2. Run SetConfig.sh script from a command shell in the <install-dir>/bin directory to generate the configuration file for the Agent Controller. The script requires that a Java Virtual Machine (JVM) be present in the PATH environment variable. Follow the prompts and enter the required parameters as appropriate. The configuration file <install-dir>/config/serviceconfig.xml will be generated based on your inputs.

If you want all users to have access to Agent Controller then you need to set following variables in bash.bashrc in /etc or if you are satisfied with that only your user can run Agent Controller then in ~/.bashrc

export TPTP_AC_HOME=/opt/agntctrl.linux_ia32-TPTP-4.4.0/
export JAVA_PROFILER_HOME=${TPTP_AC_HOME}/plugins/org.eclipse.tptp.javaprofiler
export LD_LIBRARY_PATH=${JAVA_PROFILER_HOME}:${TPTP_AC_HOME}/lib
PATH=”${PATH}”:${TPTP_AC_HOME}/bin
export TEMP=/tmp

For some reason I had to explicitly export TEMP as it wasn’t in environment variables. Of course you need TPTP_AC_HOME to point in the right direction.

And all thats left is re-login so your new environment variables would take effect.

To start profiling in eclipse you first have to start the Agent Controller by running ACStart.sh and if you are a heavy profiler then it might be a good idea to have it start automatically when ever the computer starts, but for others remembering to start it manually is all you need.

Tags: ,
  1. Andrew Overholt
    Feb 7th, 2008 at 22:16
    Reply | Quote | #1

    Wow, what a horrible installation experience. Wouldn’t it be easier if it was just `apt-get install eclipse-tptp`? :) We’d love help in the linux-distros project to make distro packaging of things easier. linux-distros-dev@eclipse.org

  2. imeikas
    Feb 7th, 2008 at 22:33
    Reply | Quote | #2

    Installing eclipse through apt-get would be really lovely :)

  3. Ahti Kitsik
    Feb 7th, 2008 at 22:39
    Reply | Quote | #3

    Woudln’t “apt-get install eclipse-tptp” automatically require you to have eclipse itself from the repository as well? or I can configure my hand-picked/custom/latest eclipse IDE to use the apt-get version of tptp…?

  4. Andrew Overholt
    Feb 7th, 2008 at 22:46
    Reply | Quote | #4

    In theory you’d be able to use the package with your upstream download, but you’re confusing what a developer wants with what a user wants. As an Eclipse developer you want to hack on the latest and having multiple copies and versions. And that’s fine.

    This is the same as with any part of a Linux distro. If I’m working on a particular part, I have multiple copies and versions and such *of that component* but I don’t care about other components. I work on Eclipse so I use upstream downloads or my own builds. But I don’t know nor care about GTK – I just get that from my distro (Fedora, in my case).

    As Eclipse *users*, people want to be able to just install it and use it.

  5. Ahti Kitsik
    Feb 7th, 2008 at 23:09
    Reply | Quote | #5

    Yep, correct :)

  6. Alfredo
    Feb 7th, 2008 at 23:55
    Reply | Quote | #6

    I’ve been working under Ubuntu for a while. Some months ago I tried this “horrible installation experience”, setting variables, looking for libraries, etc. etc. When I tried to profile a GMF application, it took me 5 minutes to see the splashscreen. Sometimes profiled applications shutdown automatically. Switch to windows in the same computer, tptp ran without problems. I ended up using JProfiler with Ubuntu. I am not sure if my tptp installation was correct. Maybe I missed something. But I am start to think that tptp doesn’t work very well under ubuntu. What do you think? Do you recommend TPTP for hard profilers working under Ubuntu?

  7. imeikas
    Feb 8th, 2008 at 10:41
    Reply | Quote | #7

    As I’m not a hard profiler myself, I can’t make that recommendation. Until now I used NetBeans for profiling (I had no time to figure out why TPTP didn’t work). Now I had a little time available and got it running, and thought that if I had trouble finding help, maybe I could help others. As they say, if one has a question, ten need the answer.

  8. Sc
    Feb 8th, 2008 at 18:18
    Reply | Quote | #8

    Same experience, ubuntu too… yesterday
    Lot of time to get it running (I spent time following the 4.1 doc at first, don’t know how I get there.. grr !), can’t understand why they choose to have a recording server between the agent and the client, and so poor eventually so poor performance it is unusable :-/
    Downloaded JProfiler, 5 minutes install, intuitive interface, very fast.
    It hurts to say, tptp is nowhere at least under ubuntu.

    Sc

  9. Matthew Payne
    Mar 4th, 2008 at 06:24
    Reply | Quote | #9

    Does this work for 64bit Ubuntu. I download agntctrl.linux_em64t-TPTP-4.1.0.zip but the files are all different inside

  10. Ivar Meikas
    Mar 4th, 2008 at 09:00

    I haven’t used 64bit Linux myself, so unfortunately I don’t know about that.

  11. flo
    Mar 9th, 2008 at 11:20

    Doing exactly as you say, I’m am getting this:

    flo@flo-acer-kub:/opt/agntctrl.linux_ia32-TPTP-4.4.1/bin$ ./ACStart.sh
    Starting Agent Controller.
    [: 46: ==: unexpected operator
    ACServer started successfully.
    # An unexpected error has been detected by HotSpot Virtual Machine:
    #
    # SIGSEGV (0xb) at pc=0xb7b6ed20, pid=6049, tid=2802924432
    #
    # Java VM: Java HotSpot(TM) Server VM (1.5.0_13-b05 mixed mode)
    # Problematic frame:
    # C [libtransportSupport.so.4+0x2d20] getTheSocket+0×10
    #
    # An error report file with more information is saved as hs_err_pid6049.log
    #
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    #
    flo@flo-acer-kub:/opt/agntctrl.linux_ia32-TPTP-4.4.1/bin$ ./SampleClient
    ERROR: Unable to connect to the Agent Controller running on localhost at port number 10006
    Press any key to exit…

    Setup:
    i386, ubuntu 7.04, java-1.5.0-java, TPTP 4.4

    Any Ideas?

  12. laurentZ
    Apr 10th, 2008 at 10:33

    Flo,

    The ACStart.sh shell error () is due to ubuntu using dash instead of bash:
    http://en.wikipedia.org/wiki/Debian_Almquist_shell
    The JVM crash is another issue but I have no idea about this part.

  13. Charlie
    May 15th, 2008 at 14:16

    I had similar problems with Heron and a 32bit install on EMT64 hardware. I tried about seventeen things to get it to work – the all in one download (at least that fixes the executables), the update site, manual install – different errors everywhere.

    I had to set executable, set TEMP, edit the ACStart script to remove the == operator, get the libs noted above, start eclipse with -debug and -consolelog, watch serviclelog.xml, clear IPC registers with ipcrm, and more, in my various attempts.

    I posted on the tptp list about the all in one failing (at least that should work?) – http://www.eclipse.org/newsportal/article.php?id=6214&group=eclipse.tptp#6214.

    I would “just use JProfiler” as others here suggest, but thats a $500USD “just use.”

  14. Rick Beton
    Jun 9th, 2008 at 11:29

    For the DASH/CSH problem:
    Starting Agent Controller.
    [: 46: ==: unexpected operator
    ACServer started successfully.

    simply change the == to =.

    Rick

  15. John Fitzpatrick
    Jun 23rd, 2008 at 23:25

    I spent hours (over a day now) trying to get TPTP to work under ubuntu. No luck. After trying many different things I am now giving up.

    Main problems:

    - initially I couldn’t get the SampleClient to run. Copying all of the required shared object libraries to /lib resolved that but not before I had to start the TimeCollector manually (no matter what I could not get it to start when it was supposed to)

    - despite setting the JAVA_PROFILER_HOME environment variable, I keep getting messages in the log file telling me that the environment variable isn’t set

    - just getting to the point mentioned above took hours…I am giving up and will probably look at using JProfiler

    If you use Ubuntu I don’t recommend even trying to use TPTP because you will spend hours just trying to get it setup, and that is even if you do get it setup.

  16. paul
    Sep 5th, 2008 at 16:59

    I almost gave up using TPTP, but your comments made it possible for me
    to get TPTP running with the INTEGRATED agent controller (IAC) trough
    the eclipse update manager. (my system: Ubuntu Hardy, Eclipse Ganymede, TPTP 4.5)

    0) Install TPTP 4.5 plugins for eclipse through Help->Software Updates->Available
    Software->Ganymede->Testing And Performance (I for some reason needed
    to enable the site http://download.eclipse.org/releases/ganymede)

    1) libstdc++2.10-glibc2.2 is not available under ubuntu hardy any
    more, but the gutsy version seems to work:

    https://launchpad.net/ubuntu/gutsy/i386/libstdc++2.10-glibc2.2/1:2.95.4-24

    (install libstdc++2.10-glibc2.2_2.95.4-24_i386.deb
    eg. with GDebi)

    2) The bug fix (Bug 175696, 201989) introduces a bug in the start and
    stop scripts (RAStart.sh, RAStop.sh which I found with
    -name RASt\*.sh”) of the IAC:

    [[ -n $TEMP ]]

    is not kown bei sh (unless it is in fact bash, which it is not under
    ubuntu hardy at least in my installation). Replacing this bei

    [ -n "$TEMP" ]

    in two lines in both scripts, they work like s charm.

    Now local profiling works (at least for me).

  17. Rick Beton
    Dec 3rd, 2008 at 20:26

    I installed v4.5.0 from the Ganymede update site. I also installed the .deb on my Ubuntu (see Paul’s post, Sept 5th above).

    I downloaded and installed the AC (http://www.eclipse.org/tptp/home/downloads/4.5.0/documents/installguide/agentcontroller_45/linux/getting_started.html). I amended the shell scripts as described above.

    I am now able to start the AC using ACStart.sh and run the SampleClient program, which gives satisfactory output.

    However, in Eclipse I cannnot connect to the AC. In the Preferences window there is a new “Agent Controller” section. Under “Hosts”, this has a “Test Connection” button. However, this always gives me an error (Connection failed on host localhost) even though the AC is running and the same port was used (10002).

    There is no useful output in the AC log file nor in Eclipse’s workspace log file.

    Any suggestions?

Comments are closed.

TimeGT Task and Note Manager