svnversion, build numbers and "exported" - xcode

When I run svnversion from the command line, I see version "3978" which is correct.
However, when I run this in a build script in Xcode 4.6.3 from the same directory I see "exported".
Why is this and how can I resolve this?
(My client and server are on SVN 1.7. According to the redbook, this can happen when svnversion is invoked on a directory that is not a working copy but this perhaps doesn't seem to be the case here.)

Digging into Xcode 4.6.3's package contents, in Contents/Developer/usr/bin the version of svn bundled with Xcode is 1.6.18, while the system version is 1.7.10. This seems to explain the mismatch.
Symlinking to /opt/local/bin/svn* in Contents/Developer/usr/bin resolved this for me.

Related

Build phase in Xcode 13.3 started failing

I have a build phase that calls some python scripts.
This has been working fine for well over 2 years, but after recently updating to Xcode 13.3 it now fails.
the error I started receiving is:
/Users/me/Library/Developer/Xcode/DerivedData/MyApp-fsowouspdsdjjzfmlfafizjbkcae/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Script-9002D8C42166BC850081D43D.sh: line 6: python: command not found
Command PhaseScriptExecution failed with a nonzero exit code
At a glance, it looks like xcode is attempting to run the script on the simulator instead of running in the local project directory.
python --version:
Python 3.8.3
I am wondering if there is some new configuration that I am unaware of for new xcode versions?
EDIT:
when i run the the lines in the script in my terminal, they run just fine.
You have installed Python 3 somehow (brew, perhaps), and it is in your PATH. That is why, when you say python, it is found.
But that same Python is not in Xcode's PATH! And it never has been. You've never noticed this, and you've never needed to notice it, because Xcode has always used the system Python, which was located in /SystemLibraryFrameworks. You and Xcode were probably using different Python versions (the system version stopped at 2.7), but this didn't matter.
But now (Monterey 12.3), it isn't. There is now no Python in Xcode's PATH. Thus, when your script says python plain and simple, it isn't found. You can fix this by using a complete path in your scripts that specifies where your Python is. You can find this out by saying which python.
So, Xcode seems to bundles its' own versions of python and python 3. It does not use the system version, so changes to Monteray 12.3 would not affect this.
Since that is the case, the correct solution is changing python to python3 since it looks like an Xcode update dropped python2.7 to parallel the OS dropping it later. I had to also update my python file to ensure compatibility.

VSCode - Maven.archetype.generate fails

I get the below error message when I try to run the command in VSCode.
Command "maven.archetype.generate" fails. Cannot read property 'length' of undefined
As far as I can see, I have all plugins/extensions but cannot work out why it won't work. I found this but still cannot get it to work, however I can run apps for files created before I updated VSCode to version 1.32.1. I just cannot create new ones.
It's look like a bug.
Are you running the commands without any workspace or folder open?
Open a folder first, see if the issue still exists. If it's gone, I
suppose it's because of a potential NPE which is fixed by PR #276 but
not released yet. Please let me know the result.
It worked for me!
See more: https://github.com/Microsoft/vscode-maven/issues/277#issuecomment-473166245
From command line, type in:
mvn --version
to see if Maven is installed properly.
You need maven and jdk installed for maven to work.
Check out the “Before you begin” here:
https://code.visualstudio.com/docs/java/java-tutorial#_create-the-program
What is probably happening is that you do not have Maven or JDK installed, or you have not set the system variables properly. These installations are not the same as the plugins/extensions found in Visual Studio Code. These are in addition to that.

How can I install older version (0.13.x) sbt on my MAC?

I need sbt version 0.13.x for a course in Scala and I am having difficulties installing it. I tried with the brew install sbt#0.13 command, but when I then check with sbt about it gives a message No such file or directory. 
However, if I again try and do brew install sbt#0.13, it gives Warning: sbt#0.13 0.13.16 is already installed, although sbt about does not find anything.
In addition to that, I tried installing the latest version of sbt with brew install sbt and then manually changing the version each of my projects is using by entering sbt.version=0.13.12 in a given build.properties file. This seemed to work initially, when I check with the terminal the version of sbt inside the project. However, I am still not able to import already existing projects.
Finally, I downloaded the version from http://www.scala-sbt.org/download.html but then I need to do some corrections to my PATH from what I've read online and I am not sure what that means.
So, I would be grateful if someone could help me with the installation of an older version.
The way sbt works is that it will look in project/build.properties for the sbt version to use to build your project. So the way you described - installing the latest sbt and set the version you want to use for the build in project/build.properties - should work just fine.
Regarding
not able to import already existing projects
these existing projects also should have project/build.properties indicating the sbt version.
Note that even with installing 0.13.12 locally, when building your project sbt will still use the version specified in project/build.properties, it will just download it as necessary.
If you absolutely want to run a specific version from the command line, as you already discovered, you can download it. Regarding updating your PATH - PATH is an environment variable that tells your command line where to look for executable files. It's a list of directories, so if you unpacked the downloaded file in say "$HOME/tools", you have so say something like export PATH=$HOME/tools/sbt/bin:$PATH. See https://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/ for a more detailed description.

Coverity installation and database setup (cov-install-gui)

I am new to using coverity and this might not be a very challenging question, but I would appreciate it greatly if someone could guide me through the process of setting up the .
I first ran the following command:
cov-configure --compiler /usr/bin/gcc --comptype gcc
This created a few files pertaining to the above command in my /config directory.
The real problem occurs when I run the cov-install-gui command to setup the defect manager and the database, I am not sure what to input for the --datadir option. When I passed in an empty directory (as a mere attempt), it complains saying that coverity_db does not exist within the empty directory.
Its not clear to me as to where I can find the coverity_db directory or how to install it?
I feel like I am missing something from the cov-configure command, but I am not sure.
Also I am using, Linux CentOS 5.4 and Coverity prevent 4.5
Thanks in advance
You are using an old and no longer supported version of Coverity Prevent (4.5 or older) since you are referencing the Defect Manager.
Current version is 6.0 so you should not be using the version that you are.
The answer to your question is that data directory is any directory that will be used to write the results and GUI files, so you can just specify any file path that doesn't already exist and it will create the directory and the files it needs in that directory.

Unable to build mercurial on OSX - Python.h not found

For what I've read I need Python-Dev, how do I install it on OSX?
I think the problem I have, is, my Xcode was not properly installed, and I don't have the paths where I should.
This previous question:
Where is gcc on OSX? I have installed Xcode already
Was about I couldn't find gcc, now I can't find Python.h
Should I just link my /Developer directory to somewhere else in /usr/ ???
This is my output:
$ sudo easy_install mercurial
Password:
Searching for mercurial
Reading http://pypi.python.org/simple/mercurial/
Reading http://www.selenic.com/mercurial
Best match: mercurial 1.5.1
Downloading http://mercurial.selenic.com/release/mercurial-1.5.1.tar.gz
Processing mercurial-1.5.1.tar.gz
Running mercurial-1.5.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_7RaTq/mercurial-1.5.1/egg-dist-tmp-l7JP3u
mercurial/base85.c:12:20: error: Python.h: No such file or directory
...
Thanks in advance.
I was struggling with this problem all day today.
I eventually discovered a site that claimed that all one needed to do was to reinstall Xcode, or install the latest version (4.3.2, as of this writing).
So I tried that. It did not help; not on its own. But then I went a step further: I fired up Xcode.app, and once I had done that, I opened the Xcode..Preferences menu item, and then go to the Downloads tab, and say that you want to install the "Command Line Tools"
Once I did that, and then re-ran easy_install (in my case I was trying to "easy_install dulwich" to satisfy a hg-git dependency), it was able to properly find Python.h for me.
Might depend on what version of Mac OSX you have, I have it in these spots:
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h
/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h
Also I believe the version of python that comes with Xcode is a custom build that plays well with xcode but you have to jump through some hoops if you use another dev environment.
Are you sure you want to build Mercurial from source? There are binary packages available, including the nice MacHg which comes with a bundled Mercurial.

Resources