Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 240677 - Compile AC with a more update version of gcc.
Summary: Compile AC with a more update version of gcc.
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P1 major with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Joshua Bowles CLA
QA Contact: Kathy Chan CLA
URL:
Whiteboard:
Keywords:
: 244213 255434 271136 (view as bug list)
Depends on:
Blocks: 244432 300811
  Show dependency tree
 
Reported: 2008-07-14 09:53 EDT by Eugene Chan CLA
Modified: 2016-05-05 10:51 EDT (History)
28 users (show)

See Also:
oec: pmc_approved+
paulslau: pmc_approved? (chris.l.elford)
paulslau: pmc_approved? (sluiman)
paulslau: pmc_approved? (ernest)
kathy: pmc_approved+
paulslau: pmc_approved+
ewchan: pmc_approved+
jgwest: review+


Attachments
Patch - AC Shared Memory Changes (21.22 KB, patch)
2009-04-16 11:22 EDT, Jonathan West CLA
no flags Details | Diff
New libverifier compiled with gcc 3.4.6 (298.82 KB, application/octet-stream)
2009-05-12 15:28 EDT, Joshua Bowles CLA
no flags Details
Patch for getting_started.html (1.15 KB, patch)
2009-05-26 21:11 EDT, Joel Cayne CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Chan CLA 2008-07-14 09:53:01 EDT
"Anindya" <xxxxxxxxx@hotmail.com> wrote in message news:1215805828.1565.13.camel@hal...
> ......
> I think I know now what the problem is, at least
> in my case. I started eclipse with the -consoleLog command line option
> which shows the standard output on the terminal. It appears that the
> ACServer binary which is being called by ACStart.sh is compiled against
> gcc 2.95 and thus needs a really old version of libstdc++. All new Linux
> distros ship with gcc 4 (and maybe 3) libraries installed, but not the
> older version. In Ubuntu, it is still available on the repository,
> however. I installed this, and immediately the IAC started working (I
> didn't even need to restart eclipse, probably because IAC is launched
> externally using a script). I have not checked all profiling options
> yet, but execution time analysis at least is working, which is what I
> needed.
>  Maybe it will be possible for the Eclipse team to compile the Agent
> Controller against a newer version of gcc? Just a suggestion. The
> problem is that the error message from Eclipse gives you no clue as to
> what went wrong with the IAC. Thanks again for your reply.
> ......
>
Comment 1 Anindya Mukherjee CLA 2008-07-14 23:50:47 EDT
A similar problem also existed for the Europa build.
Comment 2 Jeffrey W. Baker CLA 2008-07-17 17:44:21 EDT
The libstdc++2.10-glibc2.2 package is no longer present in Ubuntu 8.04 "Hardy", not even in the universe repository.  Therefore it is now not possible to use TPTP on Ubuntu without manually pulling in the old libraries.

This library was obsolete in 2001.  It's expecting a lot from people to keep this lib laying around on their systems for decades.  If nothing else, it should be noted in the release notes or in the prerequisites that Linux users need to have an antique libstdc++.
Comment 3 Jonathan West CLA 2008-07-30 17:50:37 EDT
Confirmed on my Ubuntu 8.04 machine:

"jgwest@jgwest1:~/rac-test/rac/bin$ ./RAStart.sh
Starting Agent Controller.
ACServer: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory"
Comment 4 Jonathan West CLA 2008-07-31 15:50:18 EDT
Confirmed on standard RHEL 5.1 installation:
[jgwest@localhost bin]$ ./ACStart.sh
Starting Agent Controller.
ACServer: error while loading shared libraries: libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory
ACServer started successfully.
[jgwest@localhost bin]$ 
Comment 5 Joel Cayne CLA 2008-07-31 16:43:41 EDT
Version to look into upgrading to:
gcc 3.2.3 20030502, glibc-2.3.2-95.50, libstdc++-3.2.3-59
Comment 6 Jeffrey W. Baker CLA 2008-07-31 16:49:56 EDT
That's not new enough, if you're targeting Ubuntu.  The oldest one in Ubuntu 8.04 is 3.3.  3.4, 4.0, 4.1, and 4.2 are also available.  This is also true of the upcoming Debian 5.0 release.
Comment 7 Jonathan West CLA 2008-08-13 13:00:10 EDT
For reference, on RHEL5, the following package can be installed to fix the problem: compat-libstdc++-296 - 2.96-138.i386.rpm
Comment 8 jkubasta CLA 2008-08-16 11:34:42 EDT
What is the risk factor of resolving in 4.5.1?
Comment 9 Joel Cayne CLA 2008-08-18 09:54:04 EDT
Completing in 4.5.1 may require code change to the AC.
Comment 10 Joel Cayne CLA 2008-08-18 09:55:13 EDT
Completing in 4.5.1 may require code change to the AC which may not be containable.
Comment 11 jkubasta CLA 2008-08-18 10:16:45 EDT
Thanks. Not containable in 4.5.1, moving to 4.5.2.  Eugene, please open a defect for a release note.
Comment 12 Eugene Chan CLA 2008-08-18 10:51:19 EDT
Bug 244432 is created for release note.
Comment 13 Bing Xu CLA 2008-08-18 16:11:07 EDT
*** Bug 243474 has been marked as a duplicate of this bug. ***
Comment 14 Bing Xu CLA 2008-10-21 14:03:44 EDT
*** Bug 244213 has been marked as a duplicate of this bug. ***
Comment 15 Pablo Ruggia CLA 2008-10-21 14:08:41 EDT
Are there any plans to fix this for the next release? 
If you need help testing the fix let me know.
Thanks !
Comment 16 Ravshan Kosimov CLA 2008-10-28 04:57:00 EDT
(In reply to comment #7)
> For reference, on RHEL5, the following package can be installed to fix the
> problem: compat-libstdc++-296 - 2.96-138.i386.rpm

On Alt Linux 4.0, the following package can be installed:

cpp2.95-2.95.3-alt3.i586.rpm
gcc2.95-2.95.3-alt3.i586.rpm
libstdc++2.96-2.96-alt3.i586.rpm
libstdc++2.96-devel-2.96-alt3.i586.rpm
libstdc++2.95-devel-2.95.3-alt3.i586.rpm
gcc2.95-c++-2.95.3-alt3.i586.rpm

Packages must be installed in this order with command:
rpm -iv <package.file.name>

You can get this packages in:
http://ftp.altlinux.org/pub/distributions/ALTLinux/2.2/Master/ALTLinux/RPMS/
Comment 17 Joel Cayne CLA 2008-12-02 16:14:34 EST
*** Bug 255434 has been marked as a duplicate of this bug. ***
Comment 18 Jordi Carrillo CLA 2008-12-31 08:08:13 EST
(In reply to comment #2)
> The libstdc++2.10-glibc2.2 package is no longer present in Ubuntu 8.04 "Hardy",
> not even in the universe repository.  Therefore it is now not possible to use
> TPTP on Ubuntu without manually pulling in the old libraries.
> 
> This library was obsolete in 2001.  It's expecting a lot from people to keep
> this lib laying around on their systems for decades.  If nothing else, it
> should be noted in the release notes or in the prerequisites that Linux users
> need to have an antique libstdc++.
> 

I can confirm that. This package is no longer in Ubuntu 8.10 either. It would be nice as well that if one downloads eclipse for Linux, the scripts ACStart.sh and ACStop.sh had #!/bin/bash instead of #!/bin/sh, as it gives you an error:
Starting Agent Controller.
./ACStart.sh: 52: [[: not found 
Comment 19 Christian Becker CLA 2009-01-14 17:52:07 EST
I'd like to share some successful workarounds I discovered today:
A workaround for Ubuntu 8.10 (Intrepid) is available here: http://www.mesdn.net/blog/index.php?entry=entry081211-114653
For the 64-bit version, installing libstdc++5 or running ia32 versions of Java and Eclipse along with libstdc++2.10-glibc2.2, gcc-3.3-base and libuuid1 from Gutsy does the trick. For Red Hat/Fedora, there is the compat-libstdc++-296-2.96-141 package (did not test it).
After getting the AC to start, the profiled Java process would segfault on both Ubuntu and Windows. Downgrading to Java 5 and creating a new workspace from scratch resolved that problem.
Comment 20 jkubasta CLA 2009-01-15 11:15:33 EST
Not containable in 4.5.2
Comment 21 paul stanton CLA 2009-03-04 07:27:10 EST
i've got the same/similar issue on eclipse windows xp + 3.4 + tptp 4.5.1

fresh install of myeclipse 7.0 (eclipse 3.4)

i installed tptp via ganymede 3.4 by selecting all under the "testing and performance section"

i'm trying to profile a stand alone java application.

i select "run" > "profile configurations" and click my java app

when i click the monitor tab, i get the following error message:

"IWAT043E An error occured when connecting to the host"


i then found that if i waited long enough the "revert" button would become available and clicking it would populate this pane. however when trying to "run" the configuration it would exception out:

org.eclipse.tptp.platform.execution.exceptions.AgentControllerUnavailableException
Error: Unable to connect to the Agent Controller.Connection refused: connect

org.eclipse.tptp.platform.execution.exceptions.AgentControllerUnavailableException: Error: Unable to connect to the Agent Controller.Connection refused: connect
  at org.eclipse.tptp.platform.execution.client.core.internal.NodeImpl.connect(NodeImpl.java:128)
  at org.eclipse.tptp.platform.execution.util.internal.AgentControllerFactory$EstablishConnection.run(AgentControllerFactory.java:126)
  at java.lang.Thread.run(Unknown Source)


therefore i cannot use tptp as far as i know. this may be the last time i try and get tptp to work as it's never worked for me over the years.


is there any workaround for windows that doesn't involve a fresh workspace?
Comment 22 Joel Cayne CLA 2009-03-04 08:54:43 EST
Hi Paul,

Your exception does not appear to be related to these libraries not being present as you are running on Windows. The error indicates your Agent Controller cannot be found.

Can you verify the ACServer.exe process has started? Another option is testing the profiling works by using the standalone Agent Controller (http://www.eclipse.org/tptp/home/downloads/).

Some Documentation links that you may find useful:
http://wiki.eclipse.org/Profiling_with_TPTP_-_plug-in_development
http://www.eclipse.org/tptp/home/documents/documentation.php?version=4.5.0&audience=user

Lets try to get your TPTP working by continuing this discussion on the TPTP newsgroup (http://www.eclipse.org/tptp/home/project_info/general/mailnews.php) or offline.

Comment 23 paul stanton CLA 2009-03-04 09:00:03 EST
yes you're right, i'd just figured that out, installed the agent controller, tested the connection then tried to profile again, only to be met with various new exceptions.

this is the 4th time in 2 years that i've tried to use tptp, each time i'm met with daunting configuration and errors.

this is the 4th time i've given up - i'm just a java developer!

anyway, jprofiler does what i need. shame it's so expensive.

thanks anyway.
Comment 24 N. Berntsen CLA 2009-03-17 14:48:15 EDT
FYI: On mandriva 2009.0 this resolves the problem.

# urpmi libstdc++-libc6.2-2.so.3
Comment 25 Kathy Chan CLA 2009-03-22 18:29:54 EDT
Jonathan is the next action taker on this.
Comment 26 Kathy Chan CLA 2009-04-07 15:21:19 EDT
*** Bug 271136 has been marked as a duplicate of this bug. ***
Comment 27 Jonathan West CLA 2009-04-16 11:22:19 EDT
Created attachment 132093 [details]
Patch - AC Shared Memory Changes

This is a patch to the agent controller to replace the platform specific implementations of atomic compare and swap used by the shared memory code. At present, this implementation will only be enabled for Linux, but is available for use by all other UNIX platforms.
Comment 28 Jonathan West CLA 2009-04-16 11:28:46 EDT
Patch checked into HEAD.
Comment 29 Jonathan West CLA 2009-04-16 13:44:13 EDT
Necessary code changes have been delivered to CVS, next step is build process changes. All yours, Josh. :)
Comment 30 Zach Cox CLA 2009-04-22 16:10:44 EDT
Is there any way to actually get Eclipse TPTP 4.5.2 to work with Ubuntu 8.04 and Java6?  I have tried every "workaround" I've been able to find through Google and nothing works.  Running ACStart.sh just gives me this:

Starting Agent Controller.
/opt/tptpAC/bin/ACStart.sh: line 70:  7865 Segmentation fault      ACServer $*
ACServer started successfully.

But ACServer is never actually started.
Comment 31 Joshua Bowles CLA 2009-04-22 17:34:14 EDT
No workarounds, other than those listed above, are currently known to get 4.5.2 with newer libstdc++'s.  The "ACServer started successfully" issue is being covered in bug #263712.
Comment 32 Michael Woski CLA 2009-05-06 02:56:59 EDT
(In reply to comment #31)
I didn't really follow the thread here, but how about statically linking libstdc++.so.5 or shipping one with the AC?
Comment 33 Joshua Bowles CLA 2009-05-12 15:28:34 EDT
Created attachment 135438 [details]
New libverifier compiled with gcc 3.4.6

New libverifier compiled with gcc 3.4.6 to replace the old one under platform/org.apache.harmony_vmcore_verifier/lib/linux/release/IA-32. Do not commit till the rest of the build changes are in.
Comment 34 Joshua Bowles CLA 2009-05-25 17:03:38 EDT
Good news! We are finally able to complete builds using a more up to date gcc (3.4.6).  As of TPTP-4.6.0-200905241529 these changes will be in affect in the linux_ia32 AC and JVMTI.  Early adapters can try this driver out now, but it is suggested that you wait for a stable release as there are still changes being made to the code.  Bug #277765 has been opened for automating the build process for the new machine.
Comment 35 Joel Cayne CLA 2009-05-25 17:08:55 EDT
Documentation should be updated in the Getting_Started.html to indicate the libraries that are no longer required. For example "The Agent Controller is compiled using libstdc++-libc6.2-2.so.3 shared library. Ensure that this shared library exists under the /usr/lib directory. If it does not exist, you have to install the RPM package compat-libstdc++ that comes with the operating system installation media.".
Comment 36 Joel Cayne CLA 2009-05-26 21:11:22 EDT
Created attachment 137254 [details]
Patch for getting_started.html
Comment 37 Joel Cayne CLA 2009-05-26 21:12:07 EDT
Jonathan,

Please review the update to the getting_started.html.

Thanks
Comment 38 Jonathan West CLA 2009-05-26 21:13:48 EDT
Patch is good.
Comment 39 Chengrui Deng CLA 2009-05-27 00:30:16 EDT
  This change will also affect Agent Controller SDK Samples such as ConsoleTestClient etc. It should be noted that all samples should be built with updated GCC in Test Pass, otherwise segmentation fault will be encountered for AC manual testing.
Comment 40 Kathy Chan CLA 2009-05-27 16:08:56 EDT
Chengrui,

Josh confirmed that the samples are already compiled with the new GCC with the latest build.

Joel,

Please fill in the PMC approval template to get approval for TPTP 4.6.
Comment 41 Joel Cayne CLA 2009-05-27 17:03:59 EDT
I would like to request that the following defect be considered for PMC
approval for 4.6.0.

1.  Explain why you believe this is a stop-ship defect. How does the defect
manifest itself, and how will users of TPTP / consuming products be affected if
the defect is not fixed?

The gcc used to compile the Agent Controller and other native components (e.g. JVMTI) have been upgdated to a newer version that is supported on newer Operating Systems. The corresponding documentation requirements need to be updated to reflect this change.

2. Is there a work-around? If so, why do you believe the work-around is
insufficient?
No.

3. Is this a regression or API breakage? Explain.
No.

4. Does this require new API?
No.

5. Who performed the code review?
Jonathan

6. Is there a test case attached to the bugzilla record?
No, documentation is checked as part of Platform.Doc.RAC_Getting_Started.

7. What is the risk associated with this fix?
Low.

8. Is this fix related to any standards that TPTP adheres to? If so, who has
validated that the fix continues to adhere to the standard?
No.
Comment 42 Paul Slauenwhite CLA 2009-05-28 08:43:36 EDT
Requesting PMC approval for Joel.
Comment 43 Paul Slauenwhite CLA 2009-05-28 08:44:50 EDT
PMC approved.
Comment 44 Joel Cayne CLA 2009-05-28 11:14:29 EDT
Patch for getting started checked into HEAD with PMC approval.
Comment 45 Eugene Chan CLA 2009-09-21 10:52:59 EDT
close bug.