Cygwin gitk issue

China☆狼群 提交于 2020-07-17 00:27:34

问题


I have recently installed all of the X11 packages in the cygwin setup and now have is massive annoying error with not being able to see gitk. Everything was working perfectly well until I installed this stuff.

Before I had this issue I didn't really note done any of the configuration I merely started xwinserver went to my branch and typed gitk and everything appeared. Now I have to put in my display as it claims the display is not set. I export my display settings check that it is set properly by running xclock which does appear. Then I get the issue:

1 [main] wish8.5 3436 child_info_fork::abort: data segment start: parent(0x4CF000) != child(0x67F000)
Error in startup script: unknown color name "SystemButtonFace"
while executing
"winfo rgb . $c"
(procedure "setui" line 3)
invoked from within
"setui $uicolor"
(file "C:\cygwin\bin\gitk" line 11504)

Not got a clue what this is. I have seen a couple of relevant questions but no answers.

Notes: I am using Windows 7 64 bit and using a Bash shell

Update: I am still getting exactly the same error. This is really frustrating! I may just download Debian


回答1:


I was able to get gitk working as of today with the following versions on Win 7 64 Bit :

$ cygcheck -c cygwin git gitk tcl tcl-tk
Cygwin Package Information
Package              Version        Status
cygwin               1.7.10-1       OK
git                  1.7.9-1        OK
gitk                 1.7.9-1        OK
tcl                  8.5.11-1       OK
tcl-tk               8.5.11-1       OK

The most valuable link was the one posted by aap. That led me to all the other steps.

To fix the fork failures follow this link from Cygwin FAQ. The steps I followed were as follows:

  1. Start -> Run -> ash.exe -> /bin/rebaseall (There was no output when I ran that command)

  2. One of the reasons why you might get fork failures is the presence of Antivirus/Firewall/Spyware-cleaner softwares.

    In my case the BLODA softwares listed as reasons for the fork failures was McAfee which I have on my work pc. The fix was to move the Cygwin directory inside a folder excluded by McAfee's OAS and create a symbolic link to the old location like so:
    mklink /D C:\Cygwin C:\Dev\Cygwin

    C:\Dev is the excluded folder

    The folder exclusions can be configured using the Viruscan Console. To test whether your current Cygwin directory is excluded see this.

  3. Starting GITK

    •     Method 1
          
      1. In Cygwin Console :
        startx&

      2. The title of the window that pops up must be used to set the DISPLAY env variable in Cygwin like so:
        Title : Cygwin/X:1.0, then do export DISPLAY=localhost:1.0
        Title : Cygwin/X:0.0, then do export DISPLAY=localhost:0.0

      3. Finally start gitk like so :
        gitk&

      4. What I ended up with was this :


    •     Method 2
          
      1. Create a file ~/.startxwinrc with the following contents:
        gitk&
      2. Then run the following command:
        startxwin >/dev/null 2>&1
      3. I ended up with a gitk window which looks exactly like the one before the whole 'require X' thing mentioned by aap happened :






回答2:


Seems there are three issues here.

  1. DISPLAY requirement is due to Cygwin Tk changing to require X.

  2. SystemButtonFace error is also due to the same change. The recommended fix is to remove your ~/.gitk settings file, or at least the line in that file referencing SystemButtonFace.

  3. fork issue -- seems to require rebaseall.

Note also that there is an updated version 1.7.9 of git and gitk finding its way to the cygwin mirrors, but by itself that version did not solve the problem for me.




回答3:


Based on the above answer, I did a different fix. In my ~/.bash_profile, I added the following:

startxwin >/dev/null 2>&1
export DISPLAY=localhost:0.0

I think that's a better solution than adding gitk& to the ~/.startxwinrc, since then it only works with gitk. This way you can then do git gui and other things as well.




回答4:


The other answers suggesting to remove ~/.gitk pointed in the right direction, but in new releases the config file is in ~/.config/git/gitk by default, as pointed by the manual.




回答5:


The solutions everyone else is posting are relating to Tcl/Tk's new reliance on X11. Actually, the error you're seeing is a follow-on error due to having run gitk under GDI before the X11 requirement came along.

The fix is to edit your ~/.gitk file, and delete any lines that refer to SystemButtonFace. Once you've done that, everything should Just Work™ again.




回答6:


Based on bender's answer

  • Install xinit package
  • Go go C:\cygwin\bin, double click ash.exe
  • enter ./rebaseall

Then you can start gitk with

startxwin
gitk



回答7:


I got the same error. The issue was that I initially used git bash and later switched to using git in cygwin.

Git bash's gitk had created a ~/.gitk file that was incompatible with cygwin's tcl/tk. If you delete ~/.gitk, when you run cygwin's gitk it will create a new file.




回答8:


In the end I had to remove cygwin and re-install it. The issue lies somewhere in the X11 for me. When I re-installed I had to rebaseall as I had a fork issue so these answers really helped. I did have to set the display as well so that is going in my .bashrc

I'm sorry that I can not provide something more concrete, however, whatever I tried my same issue kept reappearing.



来源:https://stackoverflow.com/questions/9248034/cygwin-gitk-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!