Command /Developer/usr/bin/dsymutil failed with exit code 10 - objective-c

I am getting the above error message randomly (so far as I can tell) on iPhone projects. Occasionally it will go away upon either:
Clean
Restart XCode
Reboot
Reinstall XCode
But sometimes it won't. When it won't the only solution I have found is to take all the source material, import it into a new project, and then redo all the connections in IB. Then I'm good until it strikes again.
Anybody have any suggestions?
[update 20091030]
I have tried building both debug and release versions, both full and lite versions. I've also tried switching the debug symbols from DWARF with external dSYM file to DWARF and to stabs. Clean builds in all formats make no differences.
Permission repairs change nothing.
Setting up a new user has no effect. Same error on the builds.
Thanks for the suggestions!
[Update 20091031]
Here's an easier and (apparently) reliable workaround. It hinges upon the discovery that the problem is linked to a target not a project
In the same project file, create a new target
Option-Drag (copy) all the files from the BAD target 'Copy Bundle Resources' folder to the NEW target 'Copy Bundle Resources' folder
Repeat (2) with 'Compile Sources' and 'Link Binary With Libraries'
Duplicate the Info.plist file for the BAD target and name it correctly for the NEW target.
Build the NEW target!
[Update 20100222]
Apparently an IDE bug, now apparently fixed, although Apple does not allow direct access to the original bug of a duplicate. I can no longer reproduce this behaviour, so hopefully it is dead, dead, dead.

Troubleshooting steps:
(1) dsymutil deals with debug information so you should probably start with the debug build. Once the problem starts can you run the release build?
(2) Create a new users and work from there to see if the problem follows. If not the problem is most likely a corrupted file in your user's directory.
(3) In my experience most linker problems are caused a permission problem somewhere. (We have to pay for security.) I would repair permissions and see if the problem goes away.
(4) In the extreme you can uninstall the dev tools from the command line:
sudo /Developer/Library/uninstall-devtools --mode=all
However, this won't help if the problem is in your user's directory. In that case, you might need to work under a new user or spend a lot of time tracking down every dev related file in the user directory.

Related

How can I obtain few of vc runtime dll's to include in my installer?

I've tried for many hours to find the solution for my problem and couln't find it even here.
So I have that application.exe that I am writing the Wix Toolset installer for it. Unfortunately I have no access to the source code but I hope I can do my task without it.
The problem is that it runs correctly with vc_redist.x64 installed on the end user's machine, but not without it.
What I've tried:
I was trying to run it without those runtimes and got into "couldn't find vcruntime140.dll error"
So I pasted it in the app's folder and tried to move on with dll's and the next error occured as shown in picture:
the application was unable to start correctly (0xc000007b). Click OK to close the application
I've read those runtimes after installation go into eg. "C://Windows/System32"
so I tried to go to that location and
dir > before.txt
and
dir > after.txt
after installing the vc++ runtime.
and copy pasted the files that occured only after the installation.
I tried to use gumpbin.exe from Visual Studio that gave given output:
found some dependencies
and the Dependency Walker gave me kind of similar output.
Dependency Walker output the same libs as direct ones, but also gave imo about hundreds of indirect ones. So I thought copy/pasting all of them is a really hard job without software to help.
I was also thinking about forcing vc_redist.x64.exe to extract files to folder given by me so I could use them for my purpose and the only parameter that looked fine was /layout but it only copied the whole .exe to another folder. Didn't extract it.
My questions is:
is there an easy way of obtaining the vc_redist.x64 libraries so I could author only the needed ones in my installer?
Any help will be appreciated. Thanks in advance!
Edit:
My goal is to secure newbie end users from being unable to run the application when they accidentally uninstall the VC runtime, therefore having vc_redist.exe as prerequisite in bootstrapper is unfortunetely not the case

IntelliJ 2017.1.4 - Refusing to open terminal window

I recently downloaded the latest version of IntelliJ Ultimate (at this time, it is 2017.1.4) for work.
For some reason, I cannot get it to open a new terminal window. When clicking the plus button here:
...nothing happens. Additionally, nothing shows up in the event log. I restarted IntelliJ, my computer, and did the "invalidate caches and restart" option.
Any ideas? Is there a log file I can look at?
It could be a known issue that is already fixed in 2017.2.
Another possible case is that the native terminal library fails to initialize on your system (check idea.log for exceptions). This can be caused by an antivirus or a corrupted IDE installation.
Thanks to #CrazyCoder for reminding me to check idea.log - the native terminal library, as well as other plugins, failed to initialize.
The root cause of the issue is that at my workplace, there is a security restriction to not run any executable that exists outside of C:\Program Files. As a result, IntelliJ cannot run certain plugins, jars, etc. that exist outside of that location, because it will attempt to execute them from your user directory.
To fix this, in IntelliJ, go to Help > Edit Custom Properties and point the config and system path to a known path where you can run executables, like so:
# custom IntelliJ IDEA properties
idea.config.path=C:\\Program Files\\JetBrains\\.IntelliJIdea2017.2\\config
idea.system.path=C:\\Program Files\\JetBrains\\.IntelliJIdea2017.2\\system
You will need to make sure to copy the contents of both directories to the new location. Hopefully this helps anyone else who runs into this issue.

In CLion, can you start a build on a specific file?

I'm doing some refactoring (more than what CLion can do automatically) and making lots of changes. When I change a header file, it prompts a significant fraction of my project to rebuild, but I know the error messages will always come from the same spot (which unfortunately starts with "w").
Is there any way to control where CLion will start building so I don't have to wait 30s+ to get the next error message?
I've been typing make src/workflow.o in a console (I tried using the CLion console, but that doesn't make links from errors), but I'd rather have the direct links to the error location.
You can add another cmake target to build only the stuff you need.
See e.g. here:
https://www.jetbrains.com/help/clion/2016.1/creating-and-editing-run-debug-configurations.html?origin=old_help

Xcode custom shell scripts are slowing down the compiling time

Testing any changes to my Xcode project has become an exercise in patience whenever I build. After all the source files have compiled, I get the following message in the activity window at the top of Xcode:
"Running 3 of 3 Custom Shell Scripts"
I have not added any of my own custom shell scripts but I am using quite a few dependencies via Cocoapods and I am using 2 frameworks for the build environment, Crashlytics and Tapstream. Crashlytics requires you add a run script in the build phases, other than that I don't know where the other ones are coming from and they appear to be the bottleneck in my build time.
Can anyone enlighten me as to what is going on and how i possibly speed it up?
I can't enlighten you but I can tell you how I stopped mine from running. This also happened after installing Cocoapods. In my main project's Target, under Build Phases, I noticed two entries entitled Check Pods Manifest.lock and another called Copy Pods Resources.
Under both there was an unchecked option Run script only when installing. I checked both and at least for now my projects build and run fine without running the scripts.
This is kind of a crappy answer because I can't really give you any more information, and it might not even work for your case, so hopefully someone comes along and enlightens us.
POSSIBLE EXTERNAL BUNDLE ISSUES
So I just had a frustrating experience debugging an issue where a pod installed library's NSLocalized strings file weren't working. Turns out it was because I checked the option mentioned above. Pods-resources.sh, which had the lines to install the bundle, wasn't running in debug mode. It was only running when installing - of course! Something to watch out for.
More info in this question:
NSLocalizedStringFromTable not working in CocoaPod dependency
To fix the slow "Copy pods resources" problem I figured out a solution to only copy the resources if they haven't been copied before.
For this purpose we have to patch the *-resources.sh files that are created by cocoapods such that the copy procedure only happens if a generated file in the target directory doesn't exist (it is created upon first copy). As long as this target directory exists and includes this autogenerated file, the copy resources phase is skipped. This saves me about 30 seconds in my project (of course depends on your project size). To accomplish this do the following:
Create a patch file called 'copy_pod_resources_once.patch' in your project root dir with the following contents:
5a6,13
> NONCE_FILE="${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/copyresources-done.nonce"
> if [ -f "$NONCE_FILE" ]; then
> echo "already copied resources"
> exit 0
> else
> touch "$NONCE_FILE"
> fi
>
In the Podfile for your project add the following post install hook:
post_install do |installer_representation|
system('find "./Pods/Target Support Files" -name "*-resources.sh" | xargs -I{} patch -p0 {} -i ./copy_pod_resources_once.patch')
<other post install stuff>
end
For me, it was Crashlytics. There were some outstanding changes, as Crashlytics does auto-updating of its files. I reset/removed them and rebuilt and got past it.
So the general answer may be to check any third party components and make sure they're working properly.
As Ramsel has said in this answer,
https://stackoverflow.com/a/21318086/1752988
I also went to Build Phases and cleared out all the possible links to PODs, after trying most of the other solutions and the three build issues shown regarding Pods were cleared out.
But then one file which was not list under the XCode Project navigator was missing, but they were in the Downloaded Git Zip folder! Obviously, I copied it and put into the XCode project and try running it runs cleanly! :)
I had a similar issue in my project (however not using Cocoapods). It ended up being an issue with an application external to Xcode (Spritebuilder) somehow holding onto a resource within my Xcode project when it crashed. I forced the non-xcode application to close and now the issue is gone
Check your project folder name have any space.Because space creates problem in directory path like "SRCROOT".I removed spaces and project run fine.
I've found that this happens to me frequently. Exact cause unknown, but appears to be switching between git branches that have differences in what pods are being used. In my case simply touching the Pods-xxx-Resources.sh shell script file causes it to speed back up.
Probably not going to work for you, but cleaning the project fixed it for me (Product -> Clean)

Compile, Build or Archive problems with Xcode 4 (and dependencies)

This question has evolved over the past several weeks to cover more general issues with xcode4 (and upgrading projects form older xcodes).
However many of the issues can be solved by following the same set of instructions.
If you have any of the following issues, try the methods in the accepted answer:
Xcode 4 fails to archive an App
Xcode 4 creates an unusable archive
Xcode 4 does not create an .ipa
Xcode 4 fails to compile due to preprocessor errors
Xcode 4 cannot find headers
Xcode 4's code complete is not working
Project dependancies won't compile
Adding a dependancy causes any of the above issues
Original Question
Title: "lexical or preprocessor issue file not found" in Xcode 4
I have a project in Xcode 4 that will build fine and run on the device and simulator but when trying to Archive it errors when looking for headers files associated with a static library:
In file included from /Volumes/Development/Path/LBProject/LBProject/LBProject-Prefix.pch:15:
In file included from /Volumes/Development/Path/LBProject/LBFDefines.h:23:
In file included from /Volumes/Development/Path/LBProject/Classes/LBProjectAppDelegate.h:11:
In file included from /Volumes/Development/Path/LBProject/LBProject/../FKNDirectory/FKNDirectoryManager.h:10:
/Volumes/Development/Path/LBProject/LBProject/../FKNDirectory/FKNDataModel.h:11:9: fatal error: 'Merchant.h' file not found [1]
#import "Merchant.h"
^
1 error generated.
Xcode gives the error
lexical or preprocessor issue file not found
Much Googling has show many people are having this issue but no solution. Anyone got a fix or even a clue.
Update: The user header search paths are set to ${BUILT_PRODUCTS_DIR} in all configurations. It builds fine using any configuration except when archiving.
Update 2: Merchant.h is a Core Data class that is auto-generated and therefore inside .xcdatamodeld package, however the headers are all copied to the public headers directory when the library is built.
NB: The steps below will solve 90% of your Xcode archive issues
however, from the comments it is suggested you try quitting Xcode
first. This may save you hours of setting tweaking.
Check the "user header paths" are correct (Add "" to paths for spaces, both in your project and dependencies)
Set "Always search user paths" to YES
Create a group call "Indexing headers" in your project and drag the headers to this group, DO NOT add to any targets when prompted. This includes any headers inside your .xcdatamodeld, you'll need to right-click and view package contents to find them.
For all dependencies set "Skip Install" build setting to "Yes"
Moving any "Public" headers in Build Phases to "Project"
Set the Build Setting "Installation Directory" on your Target to $(LOCAL_APPS_DIR)
Change the target build setting "scan all source files for includes" to YES. (link)
With newer versions of Xcode (> 4.2) you might want to read this question related to workspaces.
Manually delete the project.xcworkspace files form all referenced projects
I had the same problem in XCode 4: "Lexical or preprocessor issue MyFile.h not found". However, MyFile.m was not a static library, just a standard class. And MyFile.m and MyFile.h were included properly and indexed in the project.
So ... I quit XCode and the Simulator, then restarted them and the problem disappeared.
I found that the problem went away when I changed the target build setting "scan all source files for includes" from no to yes.
I was able to resolve this issue without any changes to any of the build settings by simply copying the .h files into the Project's directory in the finder. I did NOT add them to the project at all. Just having them in the project's filesystem directory seemed to be enough to allow Xcode's implicit linking to work properly. More details here.
I had a weird issue like this. Changing "Scan all resource files..." to Yes didn't help. I took a look at the Framework Search Paths and noticed that I had
$(inherited)
"$(SRCROOT)"
"$(SRCROOT)/my/correct/path"
It seemed right but was still failing. I then tried rearranging the order of 2 & 3 and all of a sudden it built fine. So not sure why that was the hickup, but wanted to add it to the list of things to try in case it helps someone else.
My solution was to change my
#import "HeaderFile.h"
to
#import <FrameworkName/HeaderFile.h>
and everything started working again.
What was unusual was that it had stopped working suddenly after building
a few times.
The problem resolved itself when I set
Build Settings->Project->Search Paths to Yes
I had the same — 2 targets in my project (Project and ProjectTest of GHUnit). When my scheme was set up to Project, the import of <GHUnitIOS/GHUnit.h> was problem of “lexical or preprocessor issue file not found”. But when I set as a scheme ProjectTest, everything was OK. So, I have added GHUnitIOS.framework in Project too.
Looks like your header search paths are incorrect not configured properly in your build settings for the active scheme. Verify them and update your question with the current setting.
I'm having similar issues on the simulator but not the device and my header search path fields are empty (Seems to be default). But changing Workspaces seems to have solved the issue. Maybe you could try creating a new Workspace, add your project to it and see if that helps. Now I'm investigating why.
I was getting this "file not found" error for one particular .h file in my project. I resolved the issue by removing that .h file from the project (selecting "Remove references") and re-adding it.
Adding on more variant: I had two instances of foo.m in the Compile Source build phase, which some how caused "Header not found" for foo.h.
Another chance:
In workspace project: watch in the Target for section Build Phases. As many manuals says you need to have a Copy Files Build Phase to copy all your headers to another place, as iOS Framework cannot contain header files to be shared (this is my case).
Choose for those Copy Files as Destination option "Products Directory". Or another directory of your like where the headers will reside.
That worked for me. Probably the build for Archive (or Release) directory is very different than expected in build for Debug .
Also check in your workspace settings your build directory.
XD
For me, this issue occurred after I added new files to the project; a blank .m and .h derived from NSObject. Here's how I resolved it:
Closed and restarted xCode
Deleted the two new files via XCode
Recompiled successfully
I then Re-added them afterward and it also worked.
Definitely a bug in xCode...