Post

Replies

Boosts

Views

Activity

Reply to What does it mean? "mixed ObjC ABI, somelibrary.a compiled without category class properties"
Done, logged as FB13353555 with a simple test acse that has the Elements linbraryu projects (and the binary, so no need to build it yourself), and a very sikmple Xcode project that uses the library and fails right away. Or perhaps the new linker should be compatible with your current code generation and the fact that this doesn’t work is a bug. It’s hard to say without in-depth knowledge about how the linker works, which I don’t have )-: We’ll know more once the linker engineers have had a chance to look at your bug. 🤞🏼 as this is a bit of a breaking/show-stopper issue for us ;) thanx for your assistance!
Nov ’23
Reply to What does it mean? "mixed ObjC ABI, somelibrary.a compiled without category class properties"
Hi Quinn, What compiler is that? The compiler is Elements (https://www.remobjects.com/elements). It uses LLVM as the back-end but does not use Clang, as it is not C language-based. The path forward for ld_prime issues is clear but, as this reproduces with ld64, I can’t send you down that path. i will double-check this to be sure. Any assistance would be appreciated.
Nov ’23
Reply to What does it mean? "mixed ObjC ABI, somelibrary.a compiled without category class properties"
Hi Quinn, is there any documentation on "category class properties" at all? i am getting the same warning when linking a binary compiled with an (LLVM-based) compiler other than Xcode into an Xcode 15 project (and i get the reverse, when linking a Xcode 15 l,ibrary into an project with the other compiler). Also (probably not surprising), regular category methods declared in the code compiled with the other compiler don't work when linked into the Xcode app (even when called from inide the same binary), they fail with "unknown selector" at runtime. I am assuming someting has changed for how Categories are encoded on the binary level, but i can find zero coverage of this in the documentations for the Objective-C runtime or anywhere else. I'd very much like to be able to fix this issue with the compiler to restore comaptbility, so any pointers would be appreciated. FWIW, this happens whetehr usig the "classic" or new defauklt linker in Xcode. thanx, marc
Nov ’23
Reply to How to detect an Apple Silicon system from an x86_64 process?
https://developer.apple.com/documentation/apple_silicon/about_the_rosetta_translation_environment?language=objc#3616845 Determine Whether Your App Is Running as a Translated Binary On Apple silicon, a universal binary may run either natively or as a translated binary. The system runs the native version whenever possible, but the user might opt to run the code using Rosetta to support older plug-ins.  To programmatically determine when a process is running under Rosetta translation, call the sysctlbyname function with the sysctl.proc_translated flag, as shown in the following example. The example function returns the value 0 for a native process, 1 for a translated process, and -1 when an error occurs. int processIsTranslated() { 	 int ret = 0; 	 size_t size = sizeof(ret); 	 if (sysctlbyname("sysctl.proc_translated", &ret, &size, NULL, 0) == -1) 	 { 			if (errno == ENOENT) 				 return 0; 			return -1; 	 } 	 return ret; }
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’20