Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upOn MacOS, libtrace.dylib can't load into platform binaries for build instrumentation during DB creation #26
Comments
|
Thank you for your issue report. Looking at the report above I suggest the following steps:
I have successfully done a CodeQL managed build using Xcode installed in codeql database create /tmp/db --language=cpp --command="./Tools/Scripts/build-webkit --jsc-only --debug"/tmp/db ends up being about 2.8GB in size. If you have any further questions please feel free to ask. |
|
Hi, thanks for checking out my issue. I'm still seeing the same errors about My database after generation for latest commit of webkit is also about 2.8GB, so maybe there's nothing significant missing |
|
Another thing to try (along with using Xcode in /Applications) is to put the database in /tmp when creating it (the directory can be relocated afterwards). If that still fails I would appreciate a copy of /log/build-tracer.log and /log/database-create-*.log. These are plain text files, so feel free to examine what they contain before you send them to ensure they have no secrets (via DropBox or equivalent is fine). These may help to diagnose what is happening. |
|
Same thing with creating the database in Here's a copy of my logs, let me know if there's anything else I can provide to be helpful: |
|
Thank you for these. I have taken local copies - so don't feel the need to preserve them in your Google Drive. The good news is that from the database create log I think the vast majority of the build is being processed correctly - so the database should be usable. Unfortunately I don't have a solution to the problem you've been having yet. I need to do some further investigations locally, and this will take some time. |
|
Sounds good, thanks for taking a look into this |
Description
During database creation for compiled languages, it looks like CodeQL tries to add some instrumentation to your compiler to get more info. This fails for "platform binaries" on OSX, which are protected from
DYLD_INSERT_LIBRARIESas well astask_for_pidand friends. For example, below I'm attempting to create a database for a particular revision of WebKit:You can see above the lines about
libtrace.dylibinjection failing, specifically:Disabling SIP doesn't appear to work around this, the outcome is the same. This is one example that under the hood probably uses things like
xcodebuildandclang.Database creation "finishes", but it's unclear how much information is actually missing. I actually don't know what all CodeQL tries to gather from the compilation process. How messed up will my database be if instrumentation fails during the build step?