Skip to content

Run dsymutil less on OSX #10198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2013
Merged

Run dsymutil less on OSX #10198

merged 1 commit into from
Nov 12, 2013

Conversation

alexcrichton
Copy link
Member

Instead of running dsymutil for all builds, this changes it to only run the program for debug builds.

Closes #3495

@metajack
Copy link
Contributor

I would be thrilled to get rid of this warning! 🐤

@jdm
Copy link
Contributor

jdm commented Oct 31, 2013

I'm pretty confident that this is necessary when debug symbols are generated.

@alexcrichton
Copy link
Member Author

@jdm, do you have an example that I could test with? I'm having trouble getting any debug symbols at all (even with -Z extra-debug-info), so I may just not know what I'm doing.

@jdm
Copy link
Contributor

jdm commented Oct 31, 2013

@alexcrichton Why not try any of the debuginfo tests?

@alexcrichton
Copy link
Member Author

It looks like debuginfo tests don't work at all on darwin. There's a few things that are all hindering it:

  • gdb was removed from 10.9 by default
  • debuginfo tests are all disabled on darwin (something about gdb needing root)
  • If you run the debuginfo tests on this pull request, they all fail
  • If you run the debuginfo tests before this pull request, they all fail.

Here's what I was getting: https://gist.github.com/alexcrichton/7256495. Note that I created the .dSYM folder manually in the middle (and got the same error both times)

@jdm
Copy link
Contributor

jdm commented Oct 31, 2013

Ok, I'll bust out my 10.6 machine tomorrow and see if I can spot a behaviour difference with this PR applied.

@alexcrichton
Copy link
Member Author

From some small tests with C though, it looks like you're right in that the dSYM folder is used by gdb somehow (I get extra debugging symbols when the folder exists as opposed to when it doesn't).

I'm still not convinced though that our usage of dsymutil is useful at all. I looks like the warning: no debug symbols in executable is completely legitimate because maybe that's why darwin can't debug any rust executables...

@larsbergstrom
Copy link
Contributor

@alexcrichton If you're still having trouble with debugging, you can download the Command Line Tools for Mountain Lion (from XCode 4.6.3, not 5.0) and mount it. Rather than installing, cd into /Volumes/Command Line Tools (Mountain Lion)/Packages and then install DeveloperToolsCLI.pkg, which will drop a less-not-working version of gdb in /usr/bin. In particular, that version will be able to set breakpoints and annotate frames with their source locations.

@jdm
Copy link
Contributor

jdm commented Nov 1, 2013

On 10.6 the warning does not appear when building rust programs with debug symbols enabled. So I'm pretty confident that we could solve the bit that annoys people by just not running dsymutil when no debug symbols are requested.

@alexcrichton
Copy link
Member Author

I've updated to only run dsymutil in debug builds (those with -Z extra-debug-info on the command line). This still prints the warning on 10.9 (and I think 10.8 as well), so I'm curious why this works on 10.6 and not the current version. Regardless, that's a bug for another time.

@jdm
Copy link
Contributor

jdm commented Nov 1, 2013

Note that my last comment about the warning came from my memory of nearly two years ago; I'll investigate when I'm around my 10.6 machine this weekend.

@alexcrichton
Copy link
Member Author

r? @jdm

When there are no debug symbols generated, then the program just prints an
annoying warning otherwise.

Closes rust-lang#10198
@catamorphism
Copy link
Contributor

@jdm @alexcrichton Can this merge?

bors added a commit that referenced this pull request Nov 12, 2013
Instead of running dsymutil for all builds, this changes it to only run the program for debug builds.

Closes #3495
@bors bors reopened this Nov 12, 2013
@bors bors merged commit 64afa4e into rust-lang:master Nov 12, 2013
@alexcrichton alexcrichton deleted the darwin-quiet branch November 12, 2013 08:02
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eliminate the 'no debug symbols in executable' warning on mac
6 participants