Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile fyne application for Windows operating system, gcc_linux-amd64. c: 63:2: error: unknown type name 'sigset_t' #221

Open
lizhao-8202 opened this issue Feb 26, 2024 · 1 comment

Comments

@lizhao-8202
Copy link

os:Win10 Professional Edition
go version: go1.19.1 windows/amd64

I plan to package the fyne code under Windows as a Linux version, but there is a compilation error. Related operations:
1、SET CGO_ENABLED=1
2、SET GOOS=linux
3、go build main/build_job.go

Error logs:

runtime/cgo

gcc_linux_amd64.c: In function '_cgo_sys_thread_start':
gcc_linux_amd64.c:63:2: error: unknown type name 'sigset_t'; did you mean '_sigset_t'?
sigset_t ign, oset;
^~~~~~~~
_sigset_t
gcc_linux_amd64.c:68:2: error: implicit declaration of function 'sigfillset' [-Werror=implicit-function-declaration]
sigfillset(&ign);
^~~~~~~~~~
gcc_linux_amd64.c:63:16: error: unused variable 'oset' [-Werror=unused-variable]
sigset_t ign, oset;
^~~~
cc1.exe: all warnings being treated as errors

I want to know how fyne implements cross compilation on Windows machines

@andydotxyz
Copy link
Member

It looks like you don't have the C compiler for linux, it should be set with CC. https://docs.fyne.io/started/cross-compiling

If this sounds complicated you can use fyne-cross instead which containerises the whole setup for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants