Unable to use WSL

Sysprogs forums Forums VisualGDB Unable to use WSL

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27785
    j.jemine
    Participant

    Hi,

    I’m trying to compile with WSL and I face the following problem:

    Exception details:

    VisualGDB version: 5.5.4.3540
    ------------------ System.Exception ------------------
    System.Exception: Failed to build Linux subsystem launcher. Please check that the Linux subsystem is installed and contains gcc. ---> System.Exception: gcc exited with code 2
    at q4.b()
    --- End of inner exception stack trace ---
    at q4.b()
    at cj2.g.m1(CommandLineAction c, CommandFlags b, Boolean a)
    at cj2.g..ctor(q4 b, CommandLineAction d, CommandFlags c, m22 a, Boolean e)
    at cj2.b_2(m22 a, String d, String b, String f, ExpandedEnvironment e, CommandFlags c)
    at vi2.l1(String a, String b, zr& c)
    at kk1.l(og a)
    at kk1.n1(og a, String f, String c, String b, s1 e, Boolean d)
    at jv1.c1(og d, String f, String e, String c, s1 b, Boolean a)
    at nv1.a(String a)
    at nv1.Run()
    at VisualGDB.Common_GUI.WPF.AdvancedToolchainSelectionControl.Controller.ImportToolchain(BasicToolchainProviderBase provider)
    trace=[q4.b:309, cj2+g.m1:578, cj2+g..ctor:98, cj2.b_2:36, vi2.l1:0, kk1.l:2, kk1.n1:31, jv1.c1:46, nv1.a:95, nv1.Run:0, VisualGDB.Common_GUI.WPF.AdvancedToolchainSelectionControl+Controller.ImportToolchain:0]
    ------------------ Inner exception ------------------
    ------------------ System.Exception ------------------
    System.Exception: gcc exited with code 2
    at q4.b()
    trace=[q4.b:269]

    I’ve tried with both legacy WSL and the Alpine distribution with the same result.

    I’m using WSL 1 (sadly, our IT department won’t let us upgrade to 2 yet)

    I have already checked https://sysprogs.com/w/forums/topic/unable-to-connect-to-wsl-on-windows-10-1903-build/

    I have gcc installed (5.4.0) and C: mounted in the default /mnt/c.

    Thanks.

     

    #27786
    j.jemine
    Participant

    Here is the output of the compilation command

    C:\Users\jj>C:\windows\system32\wsl.exe -- gcc -std=gnu99 "/mnt/c/Program Files (x86)/Sysprogs/VisualGDB/TargetTools/LinuxAppLauncher.c" -o /tmp/LinuxAppLauncher-v3 -lutil
    /bin/bash: --: invalid option
    Usage: /bin/bash [GNU long option] [option] ...
    /bin/bash [GNU long option] [option] script-file ...
    GNU long options:
    --debug
    --debugger
    --dump-po-strings
    --dump-strings
    --help
    --init-file
    --login
    --noediting
    --noprofile
    --norc
    --posix
    --rcfile
    --restricted
    --verbose
    --version
    Shell options:
    -ilrsD or -c command or -O shopt_option (invocation only)
    -abefhkmnptuvxBCHP or -o option
    • This reply was modified 4 years ago by j.jemine.
    #27788
    j.jemine
    Participant

    Oh I see, it’s because we’re still running on Windows 1803, and the arguments to WSL have changed in 1903.

    For this particular command, it just works if I remove the “–“. I don’t know if that would fix every use case of WSL by VisualGDB ?

    Could VisualGDB detect the version of wsl.exe and use “–” only when required ?

    Thanks.

    #27789
    support
    Keymaster

    No problem, please try this build: VisualGDB-5.5.4.3559.msi

    It will automatically detect the old Windows 10 builds and will revert to using the old bash.exe syntax when targeting WSL.

    #27790
    j.jemine
    Participant

    Wow, that was quick 🙂

    EDIT: I had a problem but it was my mistake. I think it’s working. It’s pretty late here, I’ll keep you updated.

    • This reply was modified 4 years ago by j.jemine.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.