Skip to content

Port corehost to QNX7 #33374

Description

@guesshe

Hi,

I am trying to port the entire runtime to qnx7 platform on x64 arch. I am able to build coreclr but it won't run unless I have dotnet executable built. Any suggestions on how to build corehost for qnx?

Activity

  1. added
    questionAnswer questions and provide assistance, not an issue with source code or documentation.
    and removed on Mar 9, 2020
  2. jkotas commented on Mar 9, 2020

    @jkotas
    Member

    Any suggestions on how to build corehost for qnx?

    The same way as coreclr? It lives under https://github.com/dotnet/runtime/tree/master/src/installer/corehost

  3. guesshe commented on Mar 9, 2020

    @guesshe
    Author

    How about the .nuget packages downloaded for specific RID? I used this repo https://github.com/dotnet/core-setup/tree/v2.2.8, when I tried on linux, it pulls down some .nuget files for linux platform, but I don't have these files for QNX to pull down.

  4. jkotas commented on Mar 9, 2020

    @jkotas
    Member

    You may want to build it from dotnet/runtime repo. dotnet/runtime has everything together that avoids the issues with publishing and downloading packages between repos.

  5. guesshe commented on Mar 9, 2020

    @guesshe
    Author

    @jkotas Oh. Thanks! Shall I start with all subprojects or only coreclr and corehost should be enough for me?

  6. jkotas commented on Mar 9, 2020

    @jkotas
    Member

    You can start src\coreclr, src\libraries\Native and corehost; and get the managed libraries from other Unix flavor.

  7. guesshe commented on Mar 9, 2020

    @guesshe
    Author

    Thanks! By saying managed libraries, do you mean the .dll libraries?

  8. jkotas commented on Mar 9, 2020

    @jkotas
    Member

    Right

  9. guesshe commented on Mar 9, 2020

    @guesshe
    Author

    @jkotas I tried the dotnet core 5.0.0-dev on linux and it can build a binary dotnet under artifacts directory, but when I tried to execute it, it gave me an error "A fatal error occurred. The folder [/home/<user_dir>/Github/runtime/artifacts/obj/linux-x64.Debug/cli/dotnet/host/fxr] does not exist". This is the same error when I tried the v2.2.8 version of ccorehost on linux. If I download the cli tar file and untar it, it has sub-directories host. What did I miss? Is the built dotnet directly executable or I have to do some post-processing?

  10. jkotas commented on Mar 9, 2020

    @jkotas
    Member

    obj is directory for intermediate build files. It does not have the right directory layout.

    Try the one under bin, e.g. artifacts/bin/testhost/netcoreapp5.0-linux-Debug-x64

  11. guesshe commented on Mar 10, 2020

    @guesshe
    Author

    @jkotas Thanks! I will try it out and let you know the progress.

  12. 104 remaining items

  13. guesshe commented on Apr 29, 2020

    @guesshe
    Author

    @janvorli @wfurt Thanks! I will try it out and let you know the result.

  14. janvorli commented on Apr 29, 2020

    @janvorli
    Member

    also debug/release needs to match, right?

    Yes, I've mentioned that in a comment above.

  15. guesshe commented on Apr 30, 2020

    @guesshe
    Author

    @janvorli It seems we still have issue with Linux-version of System.Private.CoreLib.dll, any idea what does this error mean? The new error is that the PE Image file is not in native machine format.

  16. janvorli commented on Apr 30, 2020

    @janvorli
    Member

    Can you please set the following env variables and try again? This should let the runtime load only the IL code from the System.Private.CoreLib.dll and not the already precompiled binary code that is likely causing the trouble.

    COMPlus_ZapDisable=1
    COMPlus_ReadyToRun=0
    
  17. janvorli commented on May 6, 2020

    @janvorli
    Member

    @quesshe, it was discovered that the COMPlus_ZapDisable handling was accidentally disabled for some time and fixed four days ago in #35741. I'm not sure what state of the repository you are using, but you'll likely need that fix to be able to load the System.Private.CoreLib.dll built on Linux. You can easily port that change to any state of the repository as it just removes an #ifdef around getting the option related to that env variable.

  18. am11 commented on May 30, 2020

    @am11
    Member

    /x86_64/usr/bin/x86_64-pc-nto-qnx7.0.0-ld: ../../../pal/src/libcoreclrpal.a(context2.S.o): relocation R_X86_64_PC32 against symbol `CONTEXT_CaptureContext' can not be used when making a shared object; recompile with -fPIC

    I was also getting this error when compiling coreclr's superpmi project with illumos sysroot on Ubuntu 18.04. I was using gcc v8.4.0 and binutils v2.25.1, both built for illumos target. The fix was to upgrade binutils to v2.33.1, without code modifications in coreclr. It was due to an upstream bug in binutils's assembler (as) or archiver (ar), which was fixed around v2.29-v2.30.

  19. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 7, 2020
  20. added this to the Future milestone on Jul 7, 2020
  21. karthikshanmugam commented on Oct 2, 2020

    @karthikshanmugam

    @guesshe Can you please tell me if you get the corehost to work?

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

    area-MetaquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions