~eliasnaur/gio#76
Error on runing example from opensuse

Hello! I'm trying to run the example by: go run gioui.org/example/hello But this is what I see currently: ~~~ ➜ gio_example go run gioui.org/example/hello

gioui.org/widget

../../go/pkg/mod/gioui.org@v0.0.0-20191211234536-7814da47a0ff/widget/editor.go:468:7: undefined: strings.ReplaceAll note: module requires Go 1.13# gioui.org/app/internal/xkb ../../go/pkg/mod/gioui.org@v0.0.0-20191211234536-7814da47a0ff/app/internal/xkb/xkb_unix.go:27:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory 27 | #include | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ~~~ I made sure to download all xkbcommon related packages too, and no luck. Any ideas to fix this? I really appreciate your work, thanks in advance.

Status
RESOLVED FIXED
Submitter
~royyhlee
Assigned to
No-one
Submitted
a month ago
Updated
9 days ago
Labels
No labels applied.

~royyhlee a month ago

This is what I see: ``` ➜ gio_example go run gioui.org/example/hello gioui.org/widget

../../go/pkg/mod/gioui.org@v0.0.0-20191211234536-7814da47a0ff/widget/editor.go:468:7: undefined: strings.ReplaceAll note: module requires Go 1.13# gioui.org/app/internal/xkb ../../go/pkg/mod/gioui.org@v0.0.0-20191211234536-7814da47a0ff/app/internal/xkb/xkb_unix.go:27:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory 27 | #include | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated ```

~eliasnaur a month ago

On Thu Jan 2, 2020 at 8:33 AM, ~royyhlee wrote:

Hello! I'm trying to run the example by: go run gioui.org/example/hello

But this is what I see currently: ``` ➜ gio_example go run gioui.org/example/hello

gioui.org/widget

../../go/pkg/mod/gioui.org@v0.0.0-20191211234536-7814da47a0ff/widget/editor.go:468:7: undefined: strings.ReplaceAll note: module requires Go 1.13# gioui.org/app/internal/xkb

This message indicates an old Go version. Are you running Go 1.13?

../../go/pkg/mod/gioui.org@v0.0.0-20191211234536-7814da47a0ff/app/internal/xkb/xkb_unix.go:27:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory 27 | #include | ^~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. ```

From the error message, you need the xkbcommon development package. I don't use opensuse myself, but https://software.opensuse.org/package/libxkbcommon-devel-64bit is my best guess.

-- elias

~royyhlee REPORTED FIXED 12 days ago

After digging through, I figured out that for opensuse, xkbcommon is under /usr/include/libxkbcommon/xkbcommon and wayland is under /usr/include/wayland. With the latest pull from master, I added #cgo CFLAGS: -I/usr/include/wayland in app/internal/window/egl_wayland.go and it works!

~eliasnaur FIXED REPORTED 12 days ago

Thanks for investigating. Can you be persuaded to create a patch with your fix?

~royyhlee 12 days ago

Sure, Ill try submitting one later today.

On Feb 13, 2020, at 1:44 AM, ~eliasnaur outgoing@sr.ht wrote:

Thanks for investigating. Can you be persuaded to create a patch with your fix?

View on the web: https://todo.sr.ht/~eliasnaur/gio/76#comment-6130

~royyhlee referenced this from #76 12 days ago

~royyhlee 10 days ago

Hi Elias, I submitted the patch following the contribution guide

~royyhlee 10 days ago

Hi Elias, I submitted the patch following the contribution guide

~eliasnaur 9 days ago

On Sat Feb 15, 2020 at 9:24 PM, ~royyhlee wrote:

Hi Elias, I submitted the patch following the contribution guide

It appears the patch didn't get through. Can I get you to resend the patch to my address, mail@eliasnaur.com? I'm very sorry for the inconvenience.

~royyhlee 9 days ago

Oops, looks like I didn't have git send-email configured correctly. I submitted the patch to '~eliasnaur/gio-patches@lists.sr.ht' :)

~eliasnaur REPORTED FIXED 9 days ago

Register here or Log in to comment, or comment via email.