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.
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.
See related issue #214920 (MacOSX: Smart Build Analyzer doesn't fix project)
Created attachment 159450 [details] A couple of test scripts that implement the idea for gcc and g++
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.
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
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
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
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
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
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.