gotk4 icon indicating copy to clipboard operation
gotk4 copied to clipboard

colliding namespace GLib, got v2.0, add v2.0

Open jinzhongmin opened this issue 2 years ago • 9 comments

root@debian:~/workspace/gotk4# ~/go/bin/gir_generate -o ./pkg/ 2022/02/21 13:31:19 error adding package "gdk-pixbuf-2.0": failed to add file "/usr/share/gir-1.0/GLib-2.0.gir": colliding namespace GLib, got v2.0, add v2.0

jinzhongmin avatar Feb 21 '22 05:02 jinzhongmin

I forgot to reply to this issue; did commit https://github.com/diamondburned/gotk4/commit/011521d5ff6c138e0f39e36505ed51cea5a1d357 fix this?

diamondburned avatar Mar 13 '22 11:03 diamondburned

Some libraries can be generated, but not all, the gtk directory is empty. I also had the problem "The filename or extension is too long" under windows. Whether the version number behind the package is too long. When running "go build -v -x" I see sometimes very long commands. How can I generate the gotk4 code in my project directory, not by referencing your package, to test the operation after circumventing these problems. ----My English is not good, translated by google

jinzhongmin avatar Mar 15 '22 04:03 jinzhongmin

The "filename or extension is too long" problem should've been fixed long ago (see https://github.com/diamondburned/gotk4/issues/43). I'm not sure why it's not fixed.

I'll leave this issue open for now since I don't have a lot of time to investigate into this. I will also need to use a Debian VM to investigate this.

How can I generate the gotk4 code in my project directory, not by referencing your package, to test the operation after circumventing these problems.

You can just copy-paste the whole pkg folder in and use the sed command to change all the imports. I don't think it will fix the issue though, but I'm very much not sure.

diamondburned avatar Mar 15 '22 05:03 diamondburned

What's your go env GOPATH?

diamondburned avatar Mar 15 '22 05:03 diamondburned

D:\Program\Go\path

jinzhongmin avatar Mar 15 '22 07:03 jinzhongmin

Is this WSL?

diamondburned avatar Mar 15 '22 07:03 diamondburned

msys2

jinzhongmin avatar Mar 15 '22 08:03 jinzhongmin

I found a workaround for the "filename or extension is too long" problem. In the last step of linking under the windows system, all .o files will be placed in the temporary directory for processing. Maybe each widget has a file, resulting in too many .o files. When the temporary directory is too deep, it will cause "filename or extension is too long". I have experimented with the reshape setting of the temporary directory test, and the build can be successful. set TEMP=D:\tmp set TMP=D:\tmp go build link_log.txt

jinzhongmin avatar Apr 21 '22 08:04 jinzhongmin

Thank you for the hint. In MSYS2 I had to adjust it as follows:

export tmp=C:\\temp
go build

webracer999 avatar Jun 02 '22 18:06 webracer999