pherrymason / c3-lsp

Language Server for C3 Language
https://pherrymason.github.io/c3-lsp/
GNU General Public License v3.0
75 stars 10 forks source link

Linux binaries build with CC="x86_64-linux-musl-gcc" crash #38

Closed tonis2 closed 3 months ago

tonis2 commented 3 months ago

Describe the bug

Currently the linux-amd64-c3lsp.zip

Is built with this line in the Makefile GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC="x86_64-linux-musl-gcc" go build -C server/cmd/lsp -o ../../bin/c3-lsp

But using CC="x86_64-linux-musl-gcc" makes the lsp crash on my Linux machines, not sure why, so I need to rebuild the linux binary everytime without the CC= part

Was just wondering can this part be remove in Gitlab runner too, or is it required ?

pherrymason commented 3 months ago

If that works better, we can remove it yes. I'm not on a linux machine so I'm not really sure about the implications

pherrymason commented 3 months ago

I realized that flag is needed when crosscompiling for linux from mac, so I added a condition to only add it when under mac. Check if now that works for you please.

tonis2 commented 3 months ago

Hei, the Makefile works fine now in linux, but linux-amd64-c3lsp is still crashing.

LSP works fine if I build it manually with Go, on my Linux machine.

Not a big deal, I can do the builds manually, just puzzling why its not working from github releases.

pherrymason commented 3 months ago

Mac and linux versions in release page are built from my mac machine, maybe that's the reason.

Can you try instead the one generated in an action? Example: https://github.com/pherrymason/c3-lsp/actions/runs/10238384476/artifacts/1773993725

Those are generated from the CI.

tonis2 commented 3 months ago

Yeah, Linux binary from CI works fine, can you build mac binary in GitHub CI too ?

pherrymason commented 3 months ago

Mac is already being built too, together with Windows.

tonis2 commented 3 months ago

I'l close the issue then

pherrymason commented 3 months ago

I've updated the linux binaries in the release with the ones generated in the CI.

Thank you for your feedback!