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.
The static library project with 305 source files failed to build at "archiving" stage due to very big command line for "ar" tool. The resulting command line ( the "${AR} rv dist/Debug/${PLATFORM}/libfox_d.a ${OBJECTFILES}" command in the generated makefile after substitution for ${OBJECTFILES} ) is 33.627 characters long and this cause following error: "make[2]: execvp: ar: Bad file number" To check if the issue is really in the length of the tool's command line I have copy the complete command line for the "ar" tool from the Output window to *.bat file and split it into two commands with half of source big command line each. This batch file works normally and library is created without any errors. This test confirm my suggestion about the cause of the issue. Tools used: The "ar" tool version is 2.19 The "make" tool version is 3.81 The MSYS version is 1.0.11 (MINGW32_NT-5.1 EZH 1.0.11(0.46/3/2) 2009-01-05 22:56 i686 Msys)
not sure what we can do.....
Maybe the "xargs" tool can be useful ? The "build/{CONFIG}" directory can be scanned for the object files (*.o) and result must be passed to the "xargs" which will run the "ar" tool.
I just tried ar from MinGW distro from 20110316 (not sure how to get the specific ar version) and it does weem to work with a large number of libraries. I tried 700 and it worked. Don't know if it has a limit too. I may suggest using a newer MinGW or Cygwin.