Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex failed with exit code 1 - xcode

I am trying to include a file in my resource bundle the files contains the following:
LeadPunc="({[`'
TrailPunc=}:;-]!?`,.)"'
NumLeadPunc=#({[#$
NumTrailPunc=}):;].,%
Operators=*+-/.:,()[]
Digits=0123456789
Alphas=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
*extra line*
The files is called:
eng.cube.lm
The error I get is:
IExpenseReporter/tessdata/eng.cube.lm:6: premature EOF
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lex failed with exit code 1
This file goes along with the newest version of tesseract (OCR). Does anyone have an idea what is causing this error and how to fix it?

Make sure you select the "Create folder references" option when adding the tessdata folder to your project.
From the documentation:
NOTE: This library currently requires the tessdata folder to be linked
as a referenced folder instead of a symbolic group. If Tesseract can't
find a language file in your own project, it's probably because you
created the tessdata folder as a symbolic group instead of a
referenced folder. It should look like this if you did it correctly:
Note how the tessdata folder has a blue icon, indicating it was
imported as a referenced folder instead of a symbolic group.
Trashing the current folder and adding it again as a folder reference should solve the problem.

XCode "thinks" this is a lex file and try to process it by calling lex. However, lex finds and unbalanced quote and thus a premature end of file.
You should try to call the designated tool explicitly.

I had this issue and I found that copying the folder "tessdata" from the language zip into the project directory rather then into Xcode fixed the issue.

Related

What is "lrelease"?

I am trying to make a naoqi package with qipkg (I dont know if this problem is specific to aldebaran naoqi or if it is a general windows problem)
qipkg make-package Pepper-Demo.pml
but I get the folowing error:
NotInPath Could not find executable: lrelease
qipkg deploy-package is working as it should.
I solved it with the folowing steps:
Check if there is a .exe file called lrelease in the folder at:
C:\Program Files (x86)\Softbank Robotics\Choregraphe Suite 2.5\bin
If not, search for the file on your computer using search in file explorer.
The error message displayed in which folders it searched for.
Go to the first folder it searched in (or create it) and paste the lrelease file.

"The selected directory is not valid home for Lua SDK"?

I'm new here so I apologize if this question is breaking some rule or something. But this is becoming a problem for me. I downloaded Intellij and downloaded the lua plugin for it. Well, now I'm trying to configure lua sdk but everytime I put in the location for it, it says "The selected directory is not valid home for Lua SDK"
What is the valid home? What am I doing wrong?
The problem might be that your lua.exe file is actually named luaXX.exe where XX is the version.
In my case it was lua53.exe. I renamed just the lua53.exe file to lua.exe; I didn't rename the rest.
So at first I had:
lua53.dll
lua53.exe
luac53.exe
wlua53.exe
After renaming the file I have:
lua53.dll
lua.exe
luac53.exe
wlua53.exe
With this changed, the Intellij plugin detected the folder as a valid home.

Error: Make Directory: No such file or directory

For some reason, I am getting these 2 errors when I try to run my app.
error: make directory /Users/ameya/Library/Developer/Xcode/DerivedData/TennisTracker-gnfmqlprqnkoxbabnbcmuxgmrskv/Build/Products/Debug-iphonesimulator/TennisTracker.app/Watch/Tennis Tracker WK.app/_WatchKitStub: No such file or directory
error: couldn't remove
'/Users/ameya/Library/Developer/Xcode/DerivedData/TennisTracker-gnfmqlprqnkoxbabnbcmuxgmrskv/Build/Products/Debug-iphonesimulator/TennisTracker.app/Watch/Tennis Tracker WK.app' after command failed: Directory not empty
I am relatively new to xcode and don't really have an idea about what this error means or how to fix it. I currently attempted to upgrade from WatchOs1 to Watchos2 by deleting my old files. I've already had some troubles trying to fully get rid of my old files and implementing the new ones. Is this in anyway related to the error that I am facing?
You have spaces in your watch app Project name.
This will lead to problems with file path, since the spaces aren't being escaped and the path isn't enclosed by double quotes.
For the first issue, the _WatchKitStub file couldn't be removed since the path wasn't escaped, so the file couldn't be found.
That triggered the second issue, when the now-quoted path couldn't be deleted (since the directory wasn't empty because the earlier command failed).
How to fix this issue:
You should create a new watch app target named TennisTrackerWK, change the target for your existing source files, then delete the old watch app target.

Front end and back end not compatible - get more linker information

while building a project in VisualStudio 2012 I get the error message
LINK : fatal error C1905: Front end and back end not compatible (must target same processor).
Checking the project manually does not help, all involved (static) libraries have been built for the same processor. I also added
/VERBOSE:lib and /VERBOSE
to command line to get some more information but this does not help, only additional output line I got by this was a stupid
Starting pass 1
So: any ideas how I can find out what causes this strange error message? How can I get more output from the linker?
Thanks!
Old question and I'm not sure whether anyone still need an answer. I had this problem with Visual Studio 2017.
Check paths for generated .obj files, especially when you use some .cpp files in more than one project (within solution) and/or use %(RelativeDir) variable in Properties -> C/C++ -> Output Files -> Object File Name. It happened to me with this path in Object File Name '$(IntDir)\%(RelativeDir)' and this $(ProjectDir)Junk\$(Platform)\ in Intermediate Directory. Error gone when I moved $(Platform) part to Object File Name.
Old paths:
Intermediate Directory: $(ProjectDir)Junk\$(Platform)\.
Object File Name: $(IntDir)\%(RelativeDir).
New paths:
Intermediate Directory: $(ProjectDir)Junk\.
Object File Name: $(IntDir)$(Platform)\%(RelativeDir).
You can also specify Object File Name option for each file, shared between multiple projects to keep using old path (or if new paths configuration isn't working for you) and get rid of that error.

appledoc Exception: at least one directory

After wasting some time to figure out what goes wrong, I finally have to ask for help. I want to use appledocs from Gentle Bytes. I followed every step of the quick install guide, but I´m not able to compile the project.
Here is what I´ve done:
1. cloned it from git://github.com/tomaz/appledoc.git
2. installed the templates to ~/Library/Application Support/appledoc
3. tried to compile the project
Everytime I try to compile, I get following error:
ERROR: AppledocException: At least one directory or file name path is required, use 'appledoc --help'
What do I have to do now?
Sounds like you've compiled it just fine and are now running the program. If it's a command-line program try command-option-R in Xcode to provide some arguments (i.e. names of files that you want to process).
The error means you didn't give it source paths: after all switches, you must give it at least one path to your source files. Can be either file or directory. In later case it will recursively scan the dir. Here's example
appledoc <options> ~/MyProject
Above example will use ~/MyProject directory as a source. You can also add multiple source paths. Note that you need to give the tool few options, see this page for minimum command line and other usage examples.
You either have to copy appledoc executable to one of directories in your path, as suggested by Caleb, or use full path to it when invoking (for example: /path/to/appledoc)

Resources