webui-dev / go-webui

Use any web browser as GUI, with Go in the backend and modern web technologies in the frontend.
https://webui.me/
MIT License
170 stars 14 forks source link

ERROR with CGO #4

Closed Aukstkalnis closed 1 year ago

Aukstkalnis commented 1 year ago

Hello.

I followed build instructions but got this error with CGO: [webui_test]$ go build

webui_test

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: /tmp/go-link-1020940490/000001.o: in function _cgo_2e88dd36e651_Cfunc_webui_decode': /tmp/go-build/cgo-gcc-prolog:77: undefined reference towebui_decode' /usr/bin/ld: /tmp/go-link-1020940490/000001.o: in function _cgo_2e88dd36e651_Cfunc_webui_encode': /tmp/go-build/cgo-gcc-prolog:95: undefined reference towebui_encode' collect2: error: ld returned 1 exit status

The go version is v1.21.1 OS: fedora 38

Am I missing something?

hassandraga commented 1 year ago

This error is because Go-WebUI needs to be updated to the latest WebUI Lib. We need to copy this to here. I will update it today.

hassandraga commented 1 year ago

I updated the repo. I test it locally, build and runs fine now. But I still have some issues with the Go package versioning...

hassandraga commented 1 year ago

https://sum.golang.org/lookup/github.com/webui-dev/go-webui@v2.4.0

not found: github.com/webui-dev/go-webui@v2.4.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/webui-dev/go-webui/v2")

Updating the pkg.go.dev is not working for now... But the repo itself is ready to use.

hassandraga commented 1 year ago

pkg.go.dev is updated to v2.4.0. Please try again go get github.com/webui-dev/go-webui/v2.

Aukstkalnis commented 1 year ago

Yes, it does work now. Thank you :)