Debugging objc4 (532.2) on OS X 10.9 - objective-c

I'm trying to get objc4-532.2 to work on Mavericks.
(First of all, I tried to compile the latest version of objc4 (objc4-551.1).
This fails due os/lock_private.h is missing (objc-os.h). Maybe anyone knows how to solve this issue?)
Back to topic:
To successfully build objc4-532.2 I need to link against the frameworks which are based
on OS X 10.8.
So I configured the Xcode project to use OS X 10.8 SDKs for Base SDK and OS X Deployment Target.
This works, and I can compile and link a simple console based C program (Xcode template).
However when I try to link this program against Foundation and debug it, it miserably fails with the following error:
dyld: Symbol not found: _objc_debug_taggedpointer_mask Referenced from:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
Expected in:
/Users/manu/Library/Developer/Xcode/DerivedData/objc-dtrsexfveobodwdnwlpknyyiekpe/Build/Products/Debug/libobjc.A.dylib
in
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
The symbol _objc_debug_taggedpointer_mask was first introduced in objc4-551.1 (latest runtime) and all 10.9 Frameworks needs to access this symbol (at least in debug mode).
Example:
$ cd /System/Library/Frameworks/Foundation.framework/Versions/C
$ grep objc_debug_taggedpointer_mask Foundation
Binary file Foundation matches
A Framework based on 10.8 doesn't contain such a symbol.
Since my project is configured to use 10.8 SDKs this error should not occur?!
So, what's the missing point?
Thanks!

I solved this problem: the symbol of objc_debug_taggedpointer_mask was imported into runtime after mac os x 10.9, so you need to add the new tags into the 532.2's code to make it compatible with os x 10.9's foundation and other frameworks.
Here is my working directory:
https://github.com/Jeswang/objc4-532.2

(First of all, I tried to compile the latest version of objc4
(objc4-551.1). This fails due os/lock_private.h is missing
(objc-os.h). Maybe anyone knows how to solve this issue?)
The best solution I could find is to manually scrape together the header files as described here:
http://www.mulle-kybernetik.com/weblog/2011/how_to_build_libobjc_for_os_x.html
The closest thing to os/lock_private.h that I have found is private/tsd_private.h from the libpthread project:
https://opensource.apple.com/source/libpthread/libpthread-105.40.1/private/tsd_private.h
Edit
I have also found this:
https://github.com/samdmarshall/OSXPrivateSDK

Related

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

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.

Could not launch Mac OS X 10.7 application archived with RestKit

I'm a newbie for RestKit and developing Mac OS X application.
I'm trying to develop Mac OS X application using the RestKit.
I can run the app on debug mode of Xcode.
But I could not run the app on production mode (It means archived application).
Launch the app, this error will be occurred.
TestRestKit cannot be opened because of a problem.
Check with the developer to make sure TestRestKit works with version of Mac OS X.
You may need to reinstall the application. Be sure to install any available updates for the application and Mac OS X.
Click Report to see more detailed information and send a report to Apple.
And I checked the system log, then I find these logs.
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.test.TestRestKit[30585]: dyld: Library not loaded: #executable_path/../Frameworks/RestKit.framework/Versions/A/RestKit
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.test.TestRestKit[30585]: Referenced from: /Users/tfmagician/Desktop/TestRestKit.app/Contents/MacOS/TestRestKit
May 14 12:41:01 black-umbrella [0x0-0x26b26b].jp.co.fuller.TestRestKit[30585]: Reason: image not found
May 14 12:41:02 black-umbrella com.apple.launchd.peruser.501[235] ([0x0-0x26b26b].jp.co.fuller.TestRestKit[30585]): Job appears to have crashed: Trace/BPT trap: 5
So I noticed the warning when the app is archiving.
Check dependencies
Warning: Installation Directory starts with #executable_path but Skip Install is disabled.
I was followed this documentation to install RestKit.
https://github.com/RestKit/RestKit/wiki/Installing-RestKit-in-Xcode-4.x
Xcode version is 4.3.2, and I'm using master branch of RestKit.
Please help me and I would be glad if I can get any idea about this problem.
In the target's Build Phases
Click Add Build Phase (bottom right), Add Copy Files and add this:

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):

Xcode app version not compatible with Mac OS X version

am using Os X 10.6.4 and X code Version 3.2.3 for developing some simple app files and using PackageMaker to distribute these app files. But when trying to run the package on some other mac I am getting error that the package is not compatible with the Os X its running and file would not be installed. Is this a problem with X code or package maker. sorry for reposting it but although I tried changing base SDK to 10.5, it was getting compiled and ran well on mac I am using for development (Mac OS X 10.6.4) but when installed on mac running OS X 10.5 the .app files were grayed out and message poped up saying 'you cannot use this version of application with this version of Mac'. Any idea why is this happening? Also as mentioned earlier I am using IBOutlet for accepting user date from form and then writing that into a text file. Any idea or solution about it?
Do you have anything set in your Info.plist for the LSMinimumSystemVersion key? This is one place the system looks.
When I was brand new I had trouble figuring this out...
Make sure that your Base SDK and deployment target are 10.5 and that you have the right compiler on(GCG4.0/4.2), also make sure that when you change these settings you change it for both Release and Debug, I once made this mistake of changing it only on debug, and when I built for release it only worked on 10.6 because I didn't change those settings.

Universal binary build using 10.4sdk is not working in 10.3.9?

I have build an universal binary with xcode 2.4 using sdk10.4 on Mac 10.4.4, when I'm trying to invoke the application in 10.3.9 PPC machine,the application is not getting invoked, saying it is not able to find the libcurl.3.dylib.
Since 10.3.9 has only libcurl.2.dylib the application is not getting invoked?
But according to Universal binary definition, the universal binary build using 10.4sdk should run in the MAC OS prior to 10.4?
What am I missing? Y my application is trying to load libcurl.3.dylib instead of libcurl.2.dylib?
(FYI: In the xcode.proj I'm linking libcurl.dylib, which is the alias name for libcurl
Sorry, but "Universal" means the binary can run on different processors (x86, PowerPC), but it does not mean it can run on earlier versions of Mac OS. This article gives details on building a "Universal" binary that can also run on Mac OS X 10.3.