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

[SR-1836] Several test/Reflection tests fail on Android due to a linker error #44445

Open
modocache mannequin opened this issue Jun 20, 2016 · 0 comments
Open

[SR-1836] Several test/Reflection tests fail on Android due to a linker error #44445

modocache mannequin opened this issue Jun 20, 2016 · 0 comments
Labels
Android Platform: Android bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. good first issue Good for newcomers

Comments

@modocache
Copy link
Mannequin

modocache mannequin commented Jun 20, 2016

Previous ID SR-1836
Radar None
Original Reporter @modocache
Type Bug
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, Android, StarterBug
Assignee None
Priority Medium

md5: 1e33b0f1fb1aa59090ef0955a4dc2c95

Issue Description:

The following reflection tests fail when run against an Android target:

  • test/Reflection/box_descriptors.sil

  • test/Reflection/capture_descriptors.sil

  • test/Reflection/typeref_decoding.swift

  • test/Reflection/typeref_decoding_imported.swift

  • test/Reflection/typeref_lowering.swift

All of them use swift-reflection-dump, and all of them fail with the following message:

/usr/bin/ld.gold: fatal error: -shared and -pie are incompatible
clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)

I think these tests pass on Linux targets that use the gold linker. Perhaps we need to modify the %target-swift-reflection-dump substitution on Android?

Prerequisites:

  • An Ubuntu 15.10 development environment capable of building Swift from source.

  • A physical Android device.

Helpful skills:
Familiarity with Python and llvm-lit would be helpful, but not strictly necessary.

Starting point:

  1. Follow the instructions in docs/Android.md to build and run the test suite on a physical Android device. Confirm this test still fails.

  2. Take a look at the %target-swift-reflection-dump substitution on Android:

    swift/test/lit.cfg

    Lines 952 to 953 in add621a

    config.substitutions.append(('%target-swift-reflection-test', lit.util.which('swift-reflection-test{variant_suffix}'.format(variant_suffix=config.variant_suffix), config.environment['PATH'])))
    config.substitutions.append(('%target-swift-reflection-dump', '{} {} {}'.format(config.swift_reflection_dump, '-arch', run_cpu)))
    – maybe these need to be changed for Android? Or perhaps some other substitution in that file is passing bad linker flags?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Platform: Android bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

0 participants