This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 259035

Summary: Implement wrapper technique in discovery in addition to preload/interpose technique
Product: cnd Reporter: Vladimir Kvashin <vkvashin>
Component: Project DiscoveryAssignee: Alexander Simon <alexvsimon>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 214920    
Attachments: A couple of test scripts that implement the idea for gcc and g++

Description Vladimir Kvashin 2016-04-27 16:28:29 UTC
Now the most perfect technique for project discovery is interception is preloading a shared library that interposes exec* calls.

However sometimes this does not work. In particular it does not work on modern Macs.

I think a wrapping technique should be used in addition to that. I mean that there should be a scripts with names gcc, g++, cc, CC, etc that log parameters and delegate execution to "real" compilers.
Comment 1 Vladimir Kvashin 2016-04-27 16:29:25 UTC
See related issue #214920 (MacOSX: Smart Build Analyzer doesn't fix project)
Comment 2 Vladimir Kvashin 2016-04-27 16:31:08 UTC
Created attachment 159450 [details]
A couple of test scripts that implement the idea for gcc and g++
Comment 3 Alexander Simon 2016-04-29 08:33:25 UTC
Investigation:
1. This technique works on Mac. The main problem is how to explain user that (s)he heeds a tool collection wrapper. To use wrapper IDE should:
- create a wrapper in file system
- configure project for using the wrapper
- build project with the wrapper
- and if user need a dynamic support of "build analyzer", use the wrapper in development cycle prebuild-clean-build
2. The same problem on Windows. Proposed tool collection wrappers does not work on Windows. Wrappers should be an executable (PE) files with 32 and 64 bitness.
Comment 4 Quality Engineering 2016-04-30 01:59:21 UTC
Integrated into 'main-silver', will be available in build *201604300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/aa020b96262b
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #259035 Implement wrapper technique in discovery in addition to preload/interpose technique
- implementing native tool wrappers
Comment 5 Quality Engineering 2016-05-05 01:53:11 UTC
Integrated into 'main-silver', will be available in build *201605050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b4b8b3cd062b
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #259035 Implement wrapper technique in discovery in addition to preload/interpose technique
- implementing native tool wrappers
Comment 6 Quality Engineering 2016-05-07 01:59:54 UTC
Integrated into 'main-silver', will be available in build *201605070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/0f493b6cc45e
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #259035 Implement wrapper technique in discovery in addition to preload/interpose technique
- do not use path to real tool env variable
Comment 7 Quality Engineering 2016-05-18 01:48:08 UTC
Integrated into 'main-silver', will be available in build *201605180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c931511c0073
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #259035 Implement wrapper technique in discovery in addition to preload/interpose technique
- use wrapper on Mac and Windows
Comment 8 Quality Engineering 2016-05-19 01:44:14 UTC
Integrated into 'main-silver', will be available in build *201605190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/407081ba68e1
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #259035 Implement wrapper technique in discovery in addition to preload/interpose technique
- TAB symbol cannot be safely printed in output. Reader should be prepared to understand "\t" string instead of TAB symbol
Comment 9 Alexander Simon 2016-05-20 10:35:22 UTC
IDE creates tool collection wrapper in a project metadata in the folder nbproject/private/tools/<hostname>/<real tool collection name>
Folder contains scripts or binary files with names of real C and C++ compilers.
Created wrappers are used in pre-build, clean and build actions.