libclang_rt.profile_driverkit.a' not found

Hi guys!

I have gone through an absolute nightmare, trying to solve the issue that I am about to tell you about.

As the title says, I am getting the error:

Library '/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/lib/darwin/libclang_rt.profile_driverkit.a' not found

I trimmed off part of that directory as I did not want to reveal that information about my computer.

From what I can tell, the file in question is no longer even a part of Xcode. I have searched, it is not on my computer anywhere.

I have also downloaded older versions of Xcode to search with it. None of them have it.

I have literally tried everything under the Son to solve this issue.

I have been stuck on it for two days.

I have even resorted to doing something I hate, which is asking for ChatGPT to assist me with solving the issue. No help there.

I am at my wits end. So I am coming to you guys, have you seen this error?

Any ideas at all? The odds are pretty good whatever you recommend I have probably already tried 200 times over. But I am still open to hearing anything.

Have any of you had this error? Any ideas?

I am on the latest version of macOS.

The project is for a macOS app.

M4 Mac mini.

Any additional information I can provide, that will be helpful?

At this point, I am leaning more towards this being a bug with Xcode than anything.

Answered by Kmpok in 855148022

Well, I actually did solve it. I have no idea how I solved it. I fiddled around with about 2 trillion different settings and then it just worked. No clue. No idea what I did that fixed it. But now it is fixed. Thank you for responding though. I do appreciate it. Xcode is a fickle beast for someone who’s new to it.

The name of that library suggests you’re building a DriverKit driver. Is that correct?

The name also suggests your building for profiling. Is that what you’re expecting to do?

Consider this:

% ls /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/17/lib/darwin | egrep '(driverkit|profile)'
libclang_rt.driverkit.a
libclang_rt.profile_ios.a
libclang_rt.profile_iossim.a
libclang_rt.profile_osx.a
libclang_rt.profile_tvos.a
libclang_rt.profile_tvossim.a
libclang_rt.profile_watchos.a
libclang_rt.profile_watchossim.a
libclang_rt.profile_xros.a
libclang_rt.profile_xrossim.a

The rt stands for runtime, that is, the Clang runtime library. The thing before the .a is the platform, so driverkit, ios, and so on. The profile_, if present, is the profiling version of that runtime. So it seems like you’re trying to build a DriverKit driver with profiling enabled. Which, I gotta say, is an odd combo.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Well, I actually did solve it. I have no idea how I solved it. I fiddled around with about 2 trillion different settings and then it just worked. No clue. No idea what I did that fixed it. But now it is fixed. Thank you for responding though. I do appreciate it. Xcode is a fickle beast for someone who’s new to it.

libclang_rt.profile_driverkit.a' not found
 
 
Q