Executable not found?

I'm trying to run my iOS project.  Everything builds fine, but when I try to run it, I get an error in the Build pane which says "Executable not found for build configuration ....".  This is an XCode 4 project with everything as is when I opened it.  The build configuration is Debug, Simulator - iOS 4.2, Standard, iPhone.  Any ideas what might be going wrong?

thanks!

John Watson

11 comments

John,
Is it possible to attach a poject.pbxpoj file or just a sections of it (/* Begin PBXNativeTarget section */, /* Begin XCBuildConfiguration section * /)?
Please also check where exactly the your compiled app is put (more likely somewhere under /projdir/build/...).

0

Please also attach Build Console log.

0

As my question is redirected here, I'm going to give more information about my problem here...

Here's what I get when I build my very simple test app:


/Developer/usr/bin/xcodebuild -project Asteroid.xcodeproj -target Asteroid -configuration Release -sdk iphonesimulator4.2 ARCHS=i386 ONLY_ACTIVE_ARCH=NO build
Build settings from command line:
    ARCHS = i386
    ONLY_ACTIVE_ARCH = NO
    PLATFORM_NAME = iphonesimulator
    SDKROOT = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk


=== BUILD NATIVE TARGET Asteroid OF PROJECT Asteroid WITH CONFIGURATION Release ===
Check dependencies
** BUILD SUCCEEDED **


I'm using Xcode 3.2.5.

Here's the excerpt from my project file:

/* Begin PBXNativeTarget section */

          1D6058900D05DD3D006BFB54 /* Asteroid */ = {

               isa = PBXNativeTarget;

               buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Asteroid" */;

               buildPhases = (

                    1D60588D0D05DD3D006BFB54 /* Resources */,

                    1D60588E0D05DD3D006BFB54 /* Sources */,

                    1D60588F0D05DD3D006BFB54 /* Frameworks */,

               );

               buildRules = (

               );

               dependencies = (

               );

               name = Asteroid;

               productName = Asteroid;

               productReference = 1D6058910D05DD3D006BFB54 /* Asteroid.app */;

               productType = "com.apple.product-type.application";

          };

/* End PBXNativeTarget section */


I can see that appCode is building into the correct build folder (outside the project structure) however when it comes down to running the app, it is trying to locate the executable in the projdir/build directory, which doesn't exist.

0

Please first clean the project and attach Console logs for the next build (current log is not enough).
Is it possible to attach project.pbxproj file?

0

Hi Anton,

No problem at all. It's a small test project anyway.

Here's the console output:

/Developer/usr/bin/xcodebuild -project Asteroid.xcodeproj -target Asteroid -configuration Release -sdk iphonesimulator4.2 ARCHS=i386 ONLY_ACTIVE_ARCH=NO build
Build settings from command line:
    ARCHS = i386
    ONLY_ACTIVE_ARCH = NO
    PLATFORM_NAME = iphonesimulator
    SDKROOT = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk


=== BUILD NATIVE TARGET Asteroid OF PROJECT Asteroid WITH CONFIGURATION Release ===
Check dependencies
ProcessInfoPlistFile /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/Info.plist Asteroid-Info.plist
    cd /Workspace/Test/Asteroid
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-infoPlistUtility Asteroid-Info.plist -genpkginfo /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -o /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/Info.plist

CompileXIB MainWindow.xib
    cd /Workspace/Test/Asteroid
    setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.2
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/MainWindow.nib /Workspace/Test/Asteroid/MainWindow.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk

CompileXIB AsteroidViewController.xib
    cd /Workspace/Test/Asteroid
    setenv IBC_MINIMUM_COMPATIBILITY_VERSION 4.2
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/AsteroidViewController.nib /Workspace/Test/Asteroid/AsteroidViewController.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk

ProcessPCH /var/folders/Sa/Sasf17k6ETGeyRYH59lOz5di8kk/-Caches-/com.apple.Xcode.2054040332/SharedPrecompiledHeaders/Asteroid_Prefix-hawwvvytnnvlmkhjhgoumlavetem/Asteroid_Prefix.pch.gch Asteroid_Prefix.pch normal i386 objective-c com.apple.compilers.gcc.4_2
    cd /Workspace/Test/Asteroid
    setenv LANG en_US.US-ASCII
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c-header -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-generated-files.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-own-target-headers.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-all-target-headers.hmap -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-project-headers.hmap -F/Workspace/CommonBuildOutput/Release-iphonesimulator -I/Workspace/CommonBuildOutput/Release-iphonesimulator/include -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources/i386 -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources -DNS_BLOCK_ASSERTIONS=1 -c /Workspace/Test/Asteroid/Asteroid_Prefix.pch -o /var/folders/Sa/Sasf17k6ETGeyRYH59lOz5di8kk/-Caches-/com.apple.Xcode.2054040332/SharedPrecompiledHeaders/Asteroid_Prefix-hawwvvytnnvlmkhjhgoumlavetem/Asteroid_Prefix.pch.gch

CompileC /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/main.o main.m normal i386 objective-c com.apple.compilers.gcc.4_2
    cd /Workspace/Test/Asteroid
    setenv LANG en_US.US-ASCII
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-generated-files.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-own-target-headers.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-all-target-headers.hmap -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-project-headers.hmap -F/Workspace/CommonBuildOutput/Release-iphonesimulator -I/Workspace/CommonBuildOutput/Release-iphonesimulator/include -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources/i386 -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/Sa/Sasf17k6ETGeyRYH59lOz5di8kk/-Caches-/com.apple.Xcode.2054040332/SharedPrecompiledHeaders/Asteroid_Prefix-hawwvvytnnvlmkhjhgoumlavetem/Asteroid_Prefix.pch -c /Workspace/Test/Asteroid/main.m -o /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/main.o

CompileC /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/AsteroidAppDelegate.o Classes/AsteroidAppDelegate.m normal i386 objective-c com.apple.compilers.gcc.4_2
    cd /Workspace/Test/Asteroid
    setenv LANG en_US.US-ASCII
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-generated-files.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-own-target-headers.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-all-target-headers.hmap -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-project-headers.hmap -F/Workspace/CommonBuildOutput/Release-iphonesimulator -I/Workspace/CommonBuildOutput/Release-iphonesimulator/include -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources/i386 -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/Sa/Sasf17k6ETGeyRYH59lOz5di8kk/-Caches-/com.apple.Xcode.2054040332/SharedPrecompiledHeaders/Asteroid_Prefix-hawwvvytnnvlmkhjhgoumlavetem/Asteroid_Prefix.pch -c /Workspace/Test/Asteroid/Classes/AsteroidAppDelegate.m -o /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/AsteroidAppDelegate.o

CompileC /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/AsteroidViewController.o Classes/AsteroidViewController.m normal i386 objective-c com.apple.compilers.gcc.4_2
    cd /Workspace/Test/Asteroid
    setenv LANG en_US.US-ASCII
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-generated-files.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-own-target-headers.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-all-target-headers.hmap -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-project-headers.hmap -F/Workspace/CommonBuildOutput/Release-iphonesimulator -I/Workspace/CommonBuildOutput/Release-iphonesimulator/include -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources/i386 -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/Sa/Sasf17k6ETGeyRYH59lOz5di8kk/-Caches-/com.apple.Xcode.2054040332/SharedPrecompiledHeaders/Asteroid_Prefix-hawwvvytnnvlmkhjhgoumlavetem/Asteroid_Prefix.pch -c /Workspace/Test/Asteroid/Classes/AsteroidViewController.m -o /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/AsteroidViewController.o

CompileC /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/AsteroidsView.o Classes/AsteroidsView.m normal i386 objective-c com.apple.compilers.gcc.4_2
    cd /Workspace/Test/Asteroid
    setenv LANG en_US.US-ASCII
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -Wreturn-type -Wunused-variable -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -fexceptions -fvisibility=hidden -mmacosx-version-min=10.6 -gdwarf-2 -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-generated-files.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-own-target-headers.hmap -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-all-target-headers.hmap -iquote /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Asteroid-project-headers.hmap -F/Workspace/CommonBuildOutput/Release-iphonesimulator -I/Workspace/CommonBuildOutput/Release-iphonesimulator/include -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources/i386 -I/Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/DerivedSources -DNS_BLOCK_ASSERTIONS=1 -include /var/folders/Sa/Sasf17k6ETGeyRYH59lOz5di8kk/-Caches-/com.apple.Xcode.2054040332/SharedPrecompiledHeaders/Asteroid_Prefix-hawwvvytnnvlmkhjhgoumlavetem/Asteroid_Prefix.pch -c /Workspace/Test/Asteroid/Classes/AsteroidsView.m -o /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/AsteroidsView.o

Ld /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/Asteroid normal i386
    cd /Workspace/Test/Asteroid
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk -L/Workspace/CommonBuildOutput/Release-iphonesimulator -F/Workspace/CommonBuildOutput/Release-iphonesimulator -filelist /Workspace/CommonBuildOutput/Asteroid.build/Release-iphonesimulator/Asteroid.build/Objects-normal/i386/Asteroid.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework Foundation -framework UIKit -framework CoreGraphics -o /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/Asteroid

GenerateDSYMFile /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app.dSYM /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/Asteroid
    cd /Workspace/Test/Asteroid
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/usr/bin/dsymutil /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app/Asteroid -o /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app.dSYM

Touch /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app
    cd /Workspace/Test/Asteroid
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/touch -c /Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app

** BUILD SUCCEEDED **




Attachment(s):
project.pbxproj.zip
0

Yagiz, thanks for the files.
I cannot reproduce the problem, though, on my environment.

Does the problem recur consistently?
If so, please check if AppCode looks for executable under '/Workspace/CommonBuildOutput/Release-iphonesimulator/Asteroid.app' (you can see the expected path in the error message 'Executable not found') and that app is actually exists under this path.

0

I'm seeing a similar problem. My OS X app builds, and the resulting binary is where one would expect (build/Debug/MyApp.app/contents/MacOS or similar, the point is, its in the .app bundle), yet its unable to open it, as for some reason, its looking for a differently named executable. The project, which I imported from Xcode, has the target named differently than the project. appCode is looking for the name of the Target, and not the name of the executable.

0

Anton,

It is looking for /Workspace/Test/Asteroid/build/Release-iphonesimulator/Asteroid.app.

In my Xcode's Preferences, in the Building tab, "Place Build Products in:" is set to "Customized Location" and not "Project directory" (the default). I can see appCode placing the build files to the correct location, but it doesn't look for them there.

Other projects using the same configuration produce the same result.

I have an old project that had a now-unused build subfolder. When I run this project, I get the following error:

/Applications/appCode-106.385.app/bin/simlauncher 4.2 run iphone /Workspace/Test/UITextView/build/Debug-iphonesimulator/UITextView.app /private/var/folders/Sa/Sasf17k6ETGeyRYH59lOz5di8kk/-Tmp-/___4682009439661558892out /private/var/folders/Sa/Sasf17k6ETGeyRYH59lOz5di8kk/-Tmp-/___2557376717726830420err
Started 3944
objc[3944]: found old-ABI metadata in image /Users/yerkan/Library/Application Support/iPhone Simulator/4.2/Applications/59FED7C7-9F5C-4BB8-BBEE-C92ED34815BA/UITextView.app/UITextView !
Session finished

Process finished with exit code 0


So I assume appCode is finding the old executable.

If I change the "Place Build Products in:" setting back to "Project directory" in Xcode then all projects work fine.
0

Thanks for the investigation,
I've created a youtrack issue (http://youtrack.jetbrains.net/issue/OC-548).

0

Thanks for your help Anton.  I'm sure you'll iron out these little problems. You guys rock. Keep up the good work.

0

If I set me output path to the default value, then everything works fine.  Sounds like the bug has been identified.  Thanks!


John

0

Please sign in to leave a comment.