coyim / coyim

coyim - a safe and secure chat client

Home Page:https://coy.im

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build hangs and never completes

PolarianDev opened this issue · comments

Hello,

So I adopted the coyim AUR package today hoping to update and fix the issues with it. The compile guide on the repository recommends uses make build, however this just hangs indefinitely:

❯ make build
mkdir -p .build-tools
./build/find_esc.sh .build-tools
(cd gui; go generate -x ui_reader.go)
../.build-tools/esc -o definitions.go -modtime 1489449600 -pkg gui -ignore Makefile definitions/
(cd gui/css; go generate -x reader.go)
../../.build-tools/esc -o definitions.go -private -modtime 1489449600 -pkg css -ignore Makefile definitions/
PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH CGO_CFLAGS_ALLOW="-Wno-deprecated-declarations" CGO_CFLAGS="-Wno-deprecated-declarations"  go build -ldflags "-X 'main.BuildTimestamp=2023-06-17 21:37:31' -X 'main.BuildCommit=959ace9e1c6836a08dbd2166debef21da8c08fdc' -X 'main.BuildShortCommit=959ace9e' -X 'main.BuildTag='" -tags "glib_2_76","gtk_3_24","pango_1_50","cairo_1_17" -o bin/coyim

but following typical go build guidelines, using go build works just fine and coyim is popped out, and when its ran works just fine.

For now I will stick to go build seen as it works, but why does the Makefile not work?

Hello,

I'm not sure how go build worked out of the box. There are several things that will definitely not work correctly - the Makefile does a bunch of things that are necessary - including generating embedded files, etc.

What happens if you execute just the last line - the go build command?

PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH CGO_CFLAGS_ALLOW="-Wno-deprecated-declarations" CGO_CFLAGS="-Wno-deprecated-declarations"  go build -ldflags "-X 'main.BuildTimestamp=2023-06-17 21:37:31' -X 'main.BuildCommit=959ace9e1c6836a08dbd2166debef21da8c08fdc' -X 'main.BuildShortCommit=959ace9e' -X 'main.BuildTag='" -tags "glib_2_76","gtk_3_24","pango_1_50","cairo_1_17" -o bin/coyim

And related, what happens if you remove the build tags? My most likely explanation is that it wasn't actually hanging, but building the gotk3 package. Since this is implemented using cgo, it's extremely slow to build - but go will cache the results, so it's likely that your go build simply used the cached versions, and that's why it worked.

It would be great if you could do the procedure again, but adding -v to the go build command in the Makefile to be able to see what is going on.

Sure I will try it again with -v

I am aware of the fact that go build does not generate everything, but it still produces a semi-working coyim without any of the metadata or tools.

I am aware of the astronomically large build time for gotk3 because go build had the same issue, but let me try again :)

I forgot to mention, as per packaging guidelines the latest version of coyim I can build is the latest tag which is:

https://github.com/coyim/coyim/releases/tag/v0.4.1

The line you gave me does not exist in Makefile, so I am not sure where I should append to verbose flag.

Thanks,
Polarian