Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

"error occurred: unknown target" when trying to add a new target #135271

Closed

Description

@0x0nyx98

when forking the rust-lang/rust repo and attempting to add support for a new target triple, x will fail to recognise the new target when trying to build the cross compiling rustc

this happens when exactly following the directions laid out by "adding a new target" on the rustc dev guide, so either x has an issue with building the new rustc, or the documentation needs updating!

i've added the target triple to the supported targets macro, included it in the stage0 missing targets array, and (not entirely sure if this is necessary but still did it) supplied a json file with a rough specification of the target platform

the exact error given by x (presumably coming from the rustc used for building) is: error occurred: unknown target 'my-target-triple'

Activity

  1. added
    needs-triage
    on Jan 8, 2025
  2. 0x0nyx98 commented on Jan 8, 2025

    @0x0nyx98
    Author

    reproduced on nixos and debian by the way!

  3. jieyouxu commented on Jan 8, 2025

    @jieyouxu
    Member

    Please include more specific repro steps. Best if you have some changes that we can checkout to try to repro locally or look at. The description as is is kinda vague ngl.

  4. added
    S-needs-repro
    T-bootstrap
    requires-custom-config
    on Jan 8, 2025
  5. 0x0nyx98 commented on Jan 8, 2025

    @0x0nyx98
    Author

    oh the repo im using is on my profile!
    https://github.com/0x0nyx98/dostogo-rustc-target
    it has a silly name i know >w<

    i havent actually done any porting of the std/pal stuff yet because i am first trying to take care of this error
    it really seems like it is on x's side , unless theres something missing from the docs ,,,, i dunno..

    but the repro steps are really just following the docs on how to add a target -w- and setting up the usual information pertaining to one

  6. workingjubilee commented on Jan 8, 2025

    @workingjubilee
    Member
    error occurred: unknown target `i686-unknown-msdos6`
    

    the ` is not a ', unfortunately

  7. 0x0nyx98 commented on Jan 8, 2025

    @0x0nyx98
    Author

    oh , is that important , o////o sorry ,,,

  8. ChrisDenton commented on Jan 8, 2025

    @ChrisDenton
    Member
  9. added
    A-contributor-roadblock
    on Jan 8, 2025
  10. jieyouxu commented on Jan 8, 2025

    @jieyouxu
    Member

    AFAICT this is emitted from cc, you may need to temporarily fork cc to add your custom target, but this seems not ideal

  11. changed the title [-]x fails to build for a custom target triple[/-] [+]"error occurred: unknown target" when trying to add a new target[/+] on Jan 8, 2025
  12. 0x0nyx98 commented on Jan 8, 2025

    @0x0nyx98
    Author

    oh !
    thank you all for replying so fast i was not expecting this >w< , it is very much appreciated
    i should probably mention just because it might be relevant , but , i am not making a target with intent to like , actually add it to rust! its just a hobby project that will stay on my little personal fork

    i will look into forking cc! unless another solution pops up before i get to that
    thank you :3

  13. workingjubilee commented on Jan 8, 2025

    @workingjubilee
    Member

    oh , is that important , o////o sorry ,,,

    not enormously, I was just noting for posterity's sake

    seems rust-lang/cc-rs#1317

  14. jieyouxu commented on Jan 8, 2025

    @jieyouxu
    Member

    Yeah, so:

  15. added
    C-bug
    C-external-bug
    and removed
    needs-triage
    S-needs-repro
    requires-custom-config
    C-external-bug
    on Jan 8, 2025
  16. added
    T-compiler
    on Jan 29, 2025
  17. added 2 commits that reference this issue on Feb 25, 2025
  18. added a commit that references this issue on Feb 25, 2025
  19. cuviper commented on Mar 18, 2025

    @cuviper
    Member

    This was backported to 1.85.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockC-bugT-bootstrapT-compiler

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions