Bug 202009 - dbx and hotspot can't be compiled from IDE
dbx and hotspot can't be compiled from IDE
Status: VERIFIED FIXED
Product: cnd
Classification: Unclassified
Component: Project
7.0.1
All Unix
: P2 (vote)
: 7.1
Assigned To: Alexander Simon
issues@cnd
701patch2-verified, elif
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-12 11:40 UTC by Vladimir Voskresensky
Modified: 2011-09-28 16:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2011-09-12 11:40:25 UTC
When compiling dbx or hotstpot (fastdebug target) => build fails with messages
ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be
preloaded: ignored.
ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be
preloaded: ignored. 

it occurs, because build system unset LD_LIBRARY_PATH 
IDE should recover from such situations more gracefully and do not break build of user's project
Comment 1 Vladimir Voskresensky 2011-09-12 11:45:42 UTC
instead of LD_PRELOAD/LD_LIBRARY_PATH we should use LD_PRELOAD_32 and LD_PRELOAD_64 variables with abs path to libBuildTrace.so
Comment 2 Alexander Simon 2011-09-12 12:36:56 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/6b7241c0f551
Comment 3 Vladimir Voskresensky 2011-09-12 14:48:21 UTC
fix is safe and correct
Comment 4 Vladimir Voskresensky 2011-09-12 19:24:38 UTC
I have checked built of hotspot on Ubuntu 64 and exec*.log is always zero size...
Comment 5 Vladimir Voskresensky 2011-09-12 19:32:53 UTC
Looks like it is a solution for Solaris only
Comment 6 Vladimir Voskresensky 2011-09-12 19:53:28 UTC
LD_DEBUG=files,symbols,bindings,detail

will probably give you more than you ever wanted to know.
Comment 7 Leonid Lenyashin 2011-09-12 20:38:46 UTC
[paths.size() == 2] - can not be safe and correct as it is cryptic (I know it is not new, but it is bad style anyway)
The same about [paths.get(0)]
Comment 8 Alexander Simon 2011-09-13 07:52:15 UTC
fix was rolled back:
http://hg.netbeans.org/cnd-main/rev/b1fdc654e650

Solution with LD_PRELOAD_32/LD_PRELOAD_64 has following lacks:
- works only on Solaris
- hides user LD_PRELOAD
So it not better when LD_PRELOAD/LD_LIBRARY_PATH

User has works around:
- switch off smart build analyzer (Tools->Options->C/C++->Project Options)
- unset LD_PRELOAD in case unsetting LD_LIBRARY_PATH at build time
So it is not P2.

Possible safe solution is:
- switch off smart build analyzer by default.
Comment 9 Leonid Lenyashin 2011-09-13 08:28:46 UTC
another thing to consider:
http://www.linuxcertif.com/man/1/readonly.1posix/313701/
Comment 10 Leonid Lenyashin 2011-09-13 08:38:47 UTC
Another thing to consider:
https://bugzilla.redhat.com/show_bug.cgi?id=249256

'$LIB'

BTW, the solution for Solaris still worth implementing.
Comment 11 Vladimir Voskresensky 2011-09-13 09:47:12 UTC
(In reply to comment #9)
> another thing to consider:
> http://www.linuxcertif.com/man/1/readonly.1posix/313701/
read only for LD_LIBRARY_PATH will break sanity tests which are called at the end of hotspot build as part of build
Comment 12 Vladimir Voskresensky 2011-09-13 09:47:38 UTC
(In reply to comment #10)
> Another thing to consider:
> https://bugzilla.redhat.com/show_bug.cgi?id=249256
> 
> '$LIB'
I agree

> 
> BTW, the solution for Solaris still worth implementing.
I agree
Comment 13 Alexander Simon 2011-09-13 13:09:13 UTC
(In reply to comment #12)
> (In reply to comment #10)
> > Another thing to consider:
> > https://bugzilla.redhat.com/show_bug.cgi?id=249256
> > 
> > '$LIB'
> I agree
> 
> > 
> > BTW, the solution for Solaris still worth implementing.
> I agree
I do not agree. It will be unsafe change set because fix should change rfs.
Comment 14 Leonid Lenyashin 2011-09-13 13:25:12 UTC
(In reply to comment #13)
...
> > > BTW, the solution for Solaris still worth implementing.
> > I agree
> I do not agree. It will be unsafe change set because fix should change rfs.
Can you please be a bit more clear here?
Comment 15 Alexander Simon 2011-09-13 13:58:08 UTC
(In reply to comment #14)
> (In reply to comment #13)
> ...
> > > > BTW, the solution for Solaris still worth implementing.
> > > I agree
> > I do not agree. It will be unsafe change set because fix should change rfs.
> Can you please be a bit more clear here?
1. User has works around => It is not P2 => It is not patch candidate.
2. Fix based on LD_PRELOAD_32/LD_PRELOAD_64 for Solaris must change remote rfs machinery because setting of LD_PRELOAD_32/LD_PRELOAD_64 makes unworking LD_PRELOAD used by rfs.
3. I do not see advantage of LD_PRELOAD_32/LD_PRELOAD_64 under LD_PRELOAD/LD_LIBRARY_PATH. Both can break user build. So it is premature change one solution to another.
Comment 16 Quality Engineering 2011-09-13 16:07:41 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/6b7241c0f551
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #202009 dbx and hotspot can't be compiled from IDE
Comment 17 Quality Engineering 2011-09-14 06:26:07 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/b1fdc654e650
User: Alexander Simon <alexvsimon@netbeans.org>
Log: roll back fix Bug #202009 dbx and hotspot can't be compiled from IDE
Comment 18 Alexander Simon 2011-09-14 08:40:48 UTC
I would suggest another fix.
Scenario:
1. User start building a project. Build failed.
2. IDE highlight line in output window:
ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be preloaded: ignored.
3. Action on click on the highlighted line shows dialog with problem description and troubleshooting like this:

IDE uses preloaded libraries to intercept compiler invocations.
IDE configures code assistance based on the intercepted compiler arguments.
Probably cause of error is resetting or unsetting of environment variable LD_LIBRARY_PATH in your build.
You can resolve problem by following ways:
1. Unset environment variable LD_PRELOAD in your build simultaneously with LD_LIBRARY_PATH. Intercepting will be forbidden.
2. Do not unset LD_LIBRARY_PATH in your build if it is possible.
3. Forbid intersecting by unchecking options "Use Smart Build Analyzer to Configure Code Assistance" in Tools->Options->C/C++->Project Options
or click button: [Forbid intercepting right now].

The same scenario can be applied for remote build using  automating coping based on "rfs_preload.so".
Dialog:
IDE uses preloaded libraries to automating coping needed files on remote host.
Probably cause of error is resetting or unsetting of environment variable LD_LIBRARY_PATH in your build.
You can resolve problem by following ways:
1. Do not unset environment variable LD_PRELOAD in your build if it is possible.
2. Change remote host properties "Access project files via" to "System level file sharing" or click button: [Change access right now].
Comment 19 Alexander Simon 2011-09-15 10:23:50 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/1f2846f0f590
Comment 20 Alexander Simon 2011-09-15 15:11:32 UTC
additional fix:
http://hg.netbeans.org/cnd-main/rev/be542df03d30
Comment 21 Vladimir Voskresensky 2011-09-16 09:34:48 UTC
fix is safe for 7.0.1 and correct. Although I think it's worth to show popup cloud, because user might not realize that he should click on error line
Comment 22 Alexander Simon 2011-09-16 10:23:33 UTC
transplanted in releases_elif branch release701_fixes
1f2846f0f590 transplanted to b449a7ee8515
be542df03d30 transplanted to 0151ba31b123
Comment 23 Quality Engineering 2011-09-17 14:14:19 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/1f2846f0f590
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #202009 dbx and hotspot can't be compiled from IDE
- output log highlighted ld errors. Clicking on link suggests ways to resolve problems.
Comment 24 Alexander Pepin 2011-09-22 15:03:14 UTC
verified in oss-platform-build #67 (20110921)
Comment 25 Quality Engineering 2011-09-26 13:29:31 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/b449a7ee8515
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #202009 dbx and hotspot can't be compiled from IDE
- output log highlighted ld errors. Clicking on link suggests ways to resolve problems.
(transplanted from 1f2846f0f59033e513af8f739524fa5135dee32b)
Comment 26 Alexander Pepin 2011-09-28 16:51:51 UTC
verified in OSS dev build based on 7.0.1 patch2


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo