diamondburned/gotk4

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

Opened this issue · 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

I forgot to reply to this issue; did commit 011521d fix this?

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

The "filename or extension is too long" problem should've been fixed long ago (see #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.

What's your go env GOPATH?

D:\Program\Go\path

Is this WSL?

msys2

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

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

export tmp=C:\\temp
go build