Menu

#813 Blocked at adding gcc compiler on Linux

Undefined
invalid
nobody
None
Undefined
2021-12-18
2019-04-11
kipade
No

If the wx was built as unicode support, and the LANG environment was not en_US(such as zh_CN.UTF-8), cb would be blocked while adding gcc compiler because of wxExecute can't sparse the result of defult output string of command "/usr/bin/gcc --version".
I think, it should using anther version of wxCommand with environment for LANG.
to fix that, just modifycompilergcc source file plugins/compilergcc/compilerMINGW.cpp:
line 234:
wxExecuteEnv env;
env.env["LANG"] = "en_US.UTF-8";
long result = wxExecute(gcc_command + _T(" --version"), output, errors, flags, &env );

I think this should be a bug of wx, however, cb should avoid being blocked at starting.

Discussion

  • Teodor Petrov

    Teodor Petrov - 2019-04-11

    If I haven't read your wxwidgets issue report I wouldn't have known what you're talking about. The proposed solution is not acceptable, because the mentioned locale might not be available on the system! You're not required to have it.

    Please first try to reproduce the problem in a minimal wx sample application (see the doc howtosubmitpatch in wx, you'll get a comment about it on trac.wxwidgets.org) then when it is clear where the problem is we could think about a solution.

    Thanks...

     
  • kipade

    kipade - 2019-04-15

    Yes, after I commit this issue, I realized its a issue of wx. So, I had report it for wx. Becase wx use wxConvLibc for Unicode encoding, however it can not parse UTF-8 correctly.

     
  • Miguel Gimenez

    Miguel Gimenez - 2021-12-18
    • status: open --> invalid
     

Log in to post a comment.