I had something similar the other day: the release configuration worked but the debug configuration would get that same NSTask error 22.
I did a test app that would load the unit test bundle to get more details on the failure. I got a "malformed rebase opcodes (331/664)" error, which seems to come from the Mach-O image loader. I ran out of time so on a hunch I switched the compiler from LLVM 1.6 to LLVM-GCC 4.2 and now it works fine, so you might want to give this a try. My unit tests were working fine before I updated to the latest iOS SDK so I'm guessing this is a new bug in LLVM. On Tue, Nov 23, 2010 at 9:25 PM, Shane <software.research.developm...@gmail.com> wrote: > Shameless bump ... any ideas? > > On Mon, Nov 22, 2010 at 9:41 AM, Shane > <software.research.developm...@gmail.com> wrote: >> Still trying to get my unit tests to build. I have an app project >> which includes unit tests as well, and it depends on another dylib >> project. They're all built with GCC_ENABLE_OBJC_GC as unsupported. >> AFAIK, that's off. So everything ought to be turned of with respect to >> GC. And according to the output below … seems my OBJC_DISABLE_GC is >> set. I have a Run Script in the Run Script build phase that looks like >> this … >> >> --- >> OBJC_DISABLE_GC=YES >> export OBJC_DISABLE_GC >> # Run the unit tests in this test bundle. >> "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" >> --- >> >> But when I build my unit test, I am not seeing the environment >> variable listed in the output of the "Run custom shell script 'Run >> Script'" output. So it doesn't seem to be seen during a build. >> >> Anyone have thoughts? >> >> Here's the output when trying to build unit tests if this helps ... >> --- >> PhaseScriptExecution "Run Script" >> /Users/napolitano/Projects/test/shared_builds/test.build/Release/UnitTests.build/Script-9D233EDB128F30B900CE8F0D.sh >> cd /Users/napolitano/Projects/test/demo >> setenv ACTION build >> setenv ALTERNATE_GROUP staff >> setenv ALTERNATE_MODE u+w,go-w,a+rX >> setenv ALTERNATE_OWNER napolitano >> setenv ALWAYS_SEARCH_USER_PATHS YES >> setenv APPLE_INTERNAL_DEVELOPER_DIR /AppleInternal/Developer >> setenv APPLE_INTERNAL_DIR /AppleInternal >> setenv APPLE_INTERNAL_DOCUMENTATION_DIR /AppleInternal/Documentation >> setenv APPLE_INTERNAL_LIBRARY_DIR /AppleInternal/Library >> setenv APPLE_INTERNAL_TOOLS /AppleInternal/Developer/Tools >> setenv APPLY_RULES_IN_COPY_FILES NO >> setenv ARCHS "x86_64 i386 ppc" >> >> … (truncated this output, just env vars w/ no mention of >> OBJC_DISABLE_GC env var) >> >> /Developer/Tools/RunPlatformUnitTests.include:419: note: Running tests >> for architecture 'x86_64' (GC OFF) >> objc[11391]: GC: forcing GC OFF because OBJC_DISABLE_GC is set >> 2010-11-20 21:05:57.978 otest-x86_64[11391:903] The test bundle at >> /Users/napolitano/Projects/test/demo/build/Release/UnitTests.octest >> could not be loaded because its Objective-C runtime information does >> not match the runtime information required by the test rig. This is >> likely because the test rig is being run with Objective-C garbage >> collection disabled, but the test bundle requires Objective-C garbage >> collection. To enable Objective-C garbage collection for the test >> rig, run it in an environment without the OBJC_DISABLE_GC environment >> variable. >> 2010-11-20 21:05:57.987 otest-x86_64[11392:203] *** NSTask: Task >> create for path >> '/Users/napolitano/Projects/test/demo/build/Release/UnitTests.octest/Contents/MacOS/UnitTests' >> failed: 22, "Invalid argument". Terminating temporary process. >> /Developer/Tools/RunPlatformUnitTests.include:451: error: Test rig >> '/Developer/Tools/otest' exited abnormally with code 5 (it may have >> crashed). >> > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/bertrandl%40gmail.com > > This email sent to bertra...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com