Trying to install Xcode 3.2.6 on a Lion machine but it won't install correctly (Not Date issue) - objective-c

So I have some Objective-c code that was created in Xcode 3.1 on OSX 10.5.8, and it will no run in Xcode 4. I used this handy little guide http://hints.macworld.com/article.php?story=20110318050811544 on one of my 10.7.4 box and it worked swimmingly. (I had just upgraded from 10.6).
So now I am trying to do the same, install 3.2, install 4, link SDKs etc on another machine running 10.7.3, and after using the little date hack with the same 3.2 mpkg that i used on the other computer, the installer says it finishes successfully but when I go to look, Xcode isn't installed anywhere, and the directory mentioned in the instructions linked above /Developers/SDKs doesn't even exist (it did on the other computer). I tried copying the 10.5 SDK from the 10.7.4 machine to the 10.7.3 machine and still nothing, 4 won't run it, and I get this error.
ld: cannot link directly with /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libcrypto.0.9.7.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
A little history too, the 10.7.4 machine had xcode 3 installed on it previous to it's update to lion so that was already there and I didn't have to mess with any of that nonsense. Is it something with having had it installed previous to the Lion upgrade?
So, how do I get Xcode 3 to work on the machine, and second does anyone recognize that error?

I think mean Xcode 4 does run, but can't build your project since that error message is from the linker at the last stage of building your project.
Here's a much easier way to install Xcode 3 on Lion: http://anatomicwax.tumblr.com/post/8064949186/installing-xcode-3-2-6-on-lion-redux
Make sure you install it to a different folder named other than Developer. Xcode 4 may go out of its way to find /Developer and remove it. I named mine /Xcode3.

Related

How do I setup and run gfortran on Xcode 8 and Sierra

I modified my old fortran code to run on my Mac. Not having an application to develop I left it alone for the last 2.5 years. Now I have an application that I want to write but find that I am generating some error messages. I assume that Xcode and Sierra have changed things enough that the gfortran I am trying to run is not configured correctly, or they just don't match.
I know Xcode was not written for fortran but some of my old code is in a project. I have no idea if was an attempt to use it as a development spot or just a holder for the code. Can someone point me in a direction that will get me going again. I am presently trying to use Terminal but without full success.
The best way to get your code running is to compile gfortran. It will work just fine with macOS Sierra - I have tested it in the past.
All you have to do is to go here:
https://gcc.gnu.org/wiki/GFortran
And compile the code. Simply download sources:
https://gcc.gnu.org/wiki/GFortranSource
> ./configure
> make
and that's it. You can also take a look here:
gfortran is not working on Mac OS X 10.9 (Mavericks)

dyld: Library not loaded: #rpath/libxcrun.dylib referenced from xcrun

I'm relatively new to mac and now trying to setup a dev. environment for Cordova based iOS app. I'm using Yosemite 10.10.3
I've installed xcode 6.3.1 and the commandlinetools for 6.3.1, under /Applications/Xcode.app/Contents/Developer/ I can see usr/bin and usr/lib, also xcode-select -p is pointing to this path, so I think the command line tool is fine.
However, when I run xcodebuild I got command not found. I've manually added the path above into the PATH environment variable to make xcodebuild visible, but not sure why this is needed, I thought the installation should have taken care of this.
Then when xcrun was executed in certain script ( npm install -g ios-deploy ), I got the following error:
dyld: Library not loaded: #rpath/libxcrun.dylib referenced from /usr/bin/xcrun, reason: image not found.
I see xcrun is available in /usr/bin as well as in the usr/bin under command line tool installation path. But the libxcrun.dylib is only available in the installation path.
I manually copied this dynamic library to /usr/lib and xcrun worked.
Though it seemed working but I got suspicious, such manual actions shouldn't be the normal post-installation procedure, should they?
Is there something I forgot to do after the command line installation? What if there's more such little files I need to copy/move around? Can I simply specify the installation path somewhere?
BTW, I added the install path/usr/lib into PATH, but didn't work with xcrun, had to copy the .dylib.
There's other mac which the Xcode and CLT were upgraded from previous version, and there no such issue.
Well, after some try-out I've got ios-deploy installed by npm. I'm not sure if what I did is preferred resolution, to me it's more like a workaround.
First of all, as far as I see, if it was upgraded from previous version of CLT or Xcode, such issue doesn't exist, though all the executable behaviour are the same.
e.g. /usr/bin/xcrun will be used, and /usr/lib doesn't have libxcrun.dylib, while #executable_path=../lib, meaning xcrun is looking for library in the ../lib location.
Normally the library not loaded error is expected, but somehow with the upgraded case some hidden setting told xcrun to search for library in the correct path.
I've tried DYLD_LIBRARY_PATH, worked with gcc and xcrun but didn't work with npm install. I can only fix the error by copying the lib file to /usr/lib at the moment.
Well, I'm still getting "cannot infer developer directory from our own path (/usr/bin/xcrun)" warning, even though I've set DEVELOPER_DIR to the correct one, and xcode-select -p shows the same.
But this warning seems not doing harm to npm install -g ios-deploy ...... therefore I can live with it for now.
So the mystery persisted. I still don't know why /usr/bin/xcrun has to be used instead of CLT/usr/bin/xcrun, I still don't know how in the upgraded case /usr/bin/xcrun managed to locate the correct lib file and didn't throw any warning. What's the difference between the new installation and upgrade?
This answer is just providing a workaround to continue without recreating everything on the machine.
Additional information:
As shown in comments, afterwards I found ios-sim is not working, always crash with exception, thus I had to reinstall OS and started over. The issue disappeared. Now the only difference I can remember, is I installed mac ports in between of OS and xcode during last time.
My recommendation would be, install Xcode right after the OS to avoid unexpected system changes.

Why does brew doctor say XCode 6.0.1 isn't the latest version?

Just installed Yosemite and when I run brew doctor I get:
Warning: Your Xcode (6.0.1) is outdated
Please update to Xcode 6.1.
Xcode can be updated from the App Store.
But in the AppStore it looks like XCode 6.0.1 is the latest version. What's the best way to correct this?
Tis that slight lag between 10.10 being Avail and xcode getting updated. If you read the top of brew doctor output it says
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
So if everything is working, then you should do what it suggests and ignore it. The command line tools / compilers where updated for 10.10 (software update should have picked them up for you). Are you running into any issues with compiling? or just that warning.
pulling up from the comments. Your ruby and postgresql issues are from the upgrade, but it isn't really brews fault, or that compiler error warning.
with rvm just reinstall your ruby. My main dev is done with ruby-2.1.3 so
rvm reinstall ruby-2.1.3
rebuilt ruby and all my gems. The problem is that the ssl libs (maybe others) that ruby was linked to were removed / replaced in the upgrade to 10.10. The reinstall will rebuild and relink to the newer correct libs.
postgresql is slightly different. Apparently during the upgrade a couple of empty directories in /usr/local/var/postgres get removed. No idea why.
see this SO answer for how to fix that.
`pg_tblspc` missing after installation of latest version of OS X (Yosemite or El Capitan)
also if you are use pow (http://pow.cx) you will need to upgrade it to the latest version as 10.10 removed ipfw completely and only leaves pf as the firewall. so you will need to the new version which uses pf anchors.
The above steps where all I needed to do it in order to get my dev back to working.
Looks like developer.apple.com does show an XCode 6.1 as "Available Shortly" as of Fri, Oct 17, at 10pm central time. Not yet available from the AppStore. I guess I'm just too eager for an update.

Error installing ruby on rails on mac osx 10.8

I am first time installing Ruby on Rails on a Mac OSX 10.8 machine and it is generating the following error :-
Error running './configure --prefix=/Users/tcs/.rvm/rubies/ruby-1.9.3-p392 --with-opt- dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libxml2:/usr/local/opt/libxslt:/usr/local/opt/libksba:/usr/local/opt/openssl:/usr/local/opt/sqlite --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/tcs/.rvm/log/ruby-1.9.3-p392/1366722478_configure.log
There has been an error while running configure. Halting the installation.
I have read lot of blogs and articles but this error sticks every time I try to install RoR.
I have Xcode 4.6 installed on the Mac.
if the c compiler can't creat executables you probably just need to install the Xcode command line tools.

Compiling libogg using Xcode 4

I've just downloaded libogg from http://www.xiph.org/downloads/ (http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz) and I'm now trying to compile the Ogg.xcodeproj project provided in that package. When I try to build, I get the following error:
The run destination My Mac 64-bit is not valid for Running the scheme 'Ogg'.
The scheme 'Ogg' contains no buildables that can be built for the SDKs supported by the run destination My Mac 64-bit. Make sure your targets all specify SDKs that are supported by this version of Xcode.
I get a similar error if I attempt to build the static library instead of the framework:
The run destination My Mac 64-bit is not valid for Running the scheme 'libogg (static)'.
The scheme 'libogg (static)' contains no buildables that can be built for the SDKs supported by the run destination My Mac 64-bit. Make sure your targets all specify SDKs that are supported by this version of Xcode.
Again, this is just opening the project in Xcode 4.3.2 for the first time and attempting to build. I've made no changes to the project file at all.
Can anyone point me in the direction of a solution to get this to compile?
In my case, the Xcode project was linking against an old SDK on an old architecture (OS X 10.5 PPC, whereas I have OS X 10.8 Mountain Lion x64).
To fix this in Xcode 5, select the top-level project in Xcode (the top-most node in the project folder pane, with the blue "A" icon) followed by the Project. Change Architectures to something suitable for your current system, such as Native Architecture of Build machine and change Base SDK to an SDK currently installed in your Xcode environment, such as OS X 10.8.
Here is a screenshot of my project to help you find those settings (following the highlighted parts: kisshelper > kisshelper > Architectures):