Skip to content
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

DSYM fails to generate with ObjC Crosstool #3372

Closed
jerrymarino opened this issue Jul 12, 2017 · 5 comments
Closed

DSYM fails to generate with ObjC Crosstool #3372

jerrymarino opened this issue Jul 12, 2017 · 5 comments
Labels
category: rules > ObjC / iOS / J2ObjC P2 We'll consider working on this in future. (Assignee optional) type: bug

Comments

@jerrymarino
Copy link
Contributor

Description of the problem / feature request / question:

The DSYM fails to generate with the presence of a crosstool:

Build options:

build  --apple_generate_dsym=true  --crosstool_top=//tools/local_config_cc:toolchain --apple_crosstool_top=//tools/local_config_cc:toolchain --apple_crosstool_transition --experimental_objc_crosstool=all

Output:

INFO: From Linking ios-app/ios-app.apple_binary_bin:
ld: warning: -undefined dynamic_lookup is deprecated on iOS
ERROR: /Users/jerry/Projects/bazel-crosstool-dsym-failure/ios-app/BUILD:3:1: output 'ios-app/ios-app.apple_binary.app.dSYM.temp.zip' was not created.
ERROR: /Users/jerry/Projects/bazel-crosstool-dsym-failure/ios-app/BUILD:3:1: not all outputs were created or valid.
Target //ios-app:ios-app failed to build

If possible, provide a minimal example to reproduce the problem:

I've attached an example project and iOS app that reproduces this.

Environment info

  • Operating System:
    10.12.2 (16C67)

  • Bazel version (output of bazel info release):
    release 0.5.2

Have you found anything relevant by searching the web?

#3228

Anything else, information or logs or outputs that would be helpful?

The .bazelrc in the attached sample project sets generate_dsym_file through --apple_generate_dsym. It looks like this issue happens in both rules_apple and native bazel iOS rules

Here is a test project including a basic iOS app:
bazel-crosstool-dsym-failure-submit.zip

The README has more info, but simply run bazel build ios-app

@jerrymarino
Copy link
Contributor Author

cc @calpeyser do you have any suggestions around this one? It looks like the DSYM is generated during the build, but the .temp zip archive isn't working

@laszlocsomor laszlocsomor added category: rules > ObjC / iOS / J2ObjC P2 We'll consider working on this in future. (Assignee optional) type: bug labels Jul 13, 2017
@aragos aragos assigned dmishe and unassigned aragos Jul 13, 2017
@dmishe
Copy link
Contributor

dmishe commented Jul 14, 2017

Hm not sure what I can do here. As a start, @jerrymarino, can you dump your build log with -s flag so it's clear what the link action is doing?

@calpeyser
Copy link
Contributor

We're working on a solution in the CROSSTOOL to add DYSM generation, hopefully it will go out next week.

@c-parsons

@c-parsons
Copy link
Contributor

Cal, is this done? (See #3940)

bazel-io pushed a commit that referenced this issue Feb 6, 2018
…is compiled as part of bazel's repository bootstrap. This should make crosstool's clang invocations faster. An added benefit of this is that wrapped_clang.cc supports the "DSYM_HINT" flags specified through the CROSSTOOL, so with this change, apple_binary gets support for the --apple_generate_dsym flag.

The dSYM generation issue has been flagged multiple times:
#4312
#3940
#3372

RELNOTES: apple_binary can now generate dSYM outputs with the --apple_generate_dsym=true flag.
PiperOrigin-RevId: 184688215
@sergiocampama
Copy link
Contributor

This should be fixed at head, probably will take a while to get rolled out to a release binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: rules > ObjC / iOS / J2ObjC P2 We'll consider working on this in future. (Assignee optional) type: bug
Projects
None yet
Development

No branches or pull requests

8 participants