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

Building for Windows #176

Open
jaehongyoon opened this issue Jan 26, 2024 · 0 comments
Open

Building for Windows #176

jaehongyoon opened this issue Jan 26, 2024 · 0 comments

Comments

@jaehongyoon
Copy link

Hi Im trying to build the e2fsprogs for windows using mingw toolchain from Windows server 2022. I'ved tried to configure the make file to enable _XOPEN_SOURCE to 600 by
export CFLAG="-g -O2 -D_XOPEN_SOURCE_=600" export CFLAGS_SHLIB ="-g -O2 -D_XOPEN_SOURCE_=600" export CFLAGS_STLIB ="-g -O2 -D_XOPEN_SOURCE_=600" ./configure --host=x86_64-w64-mingw32
and build thru make. Based on the make file generated and the output from make command call, seems like the the right toolchain is being used and _XOPEN_SOURCE is defined as 600 but Im getting
../../../source/e2fsprogs/lib/ss/listen.c:64:5: warning: implicit declaration of function 'sigemptyset' [-Wimplicit-function-declaration] 64 | sigemptyset(&igmask); | ^~~~~~~~~~~ ../../../source/e2fsprogs/lib/ss/listen.c:65:5: warning: implicit declaration of function 'sigaddset' [-Wimplicit-function-declaration] 65 | sigaddset(&igmask, SIGINT); | ^~~~~~~~~ ../../../source/e2fsprogs/lib/ss/listen.c:66:5: warning: implicit declaration of function 'sigprocmask' [-Wimplicit-function-declaration] 66 | sigprocmask(SIG_BLOCK, &igmask, &omask); | ^~~~~~~~~~~ ../../../source/e2fsprogs/lib/ss/listen.c:66:17: error: 'SIG_BLOCK' undeclared (first use in this function); did you mean 'SIG_ACK'? 66 | sigprocmask(SIG_BLOCK, &igmask, &omask); | ^~~~~~~~~ | SIG_ACK ../../../source/e2fsprogs/lib/ss/listen.c:66:17: note: each undeclared identifier is reported only once for each function it appears in ../../../source/e2fsprogs/lib/ss/listen.c:70:17: error: 'SIG_SETMASK' undeclared (first use in this function) 70 | sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0); | ^~~~~~~~~~~ ../../../source/e2fsprogs/lib/ss/listen.c:70:39: error: 'sigset_t' undeclared (first use in this function); did you mean 'sigret_t'? 70 | sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0); | ^~~~~~~~ | sigret_t ../../../source/e2fsprogs/lib/ss/listen.c:70:49: error: expected expression before ')' token 70 | sigprocmask(SIG_SETMASK, &omask, (sigset_t *) 0); | ^ ../../../source/e2fsprogs/lib/ss/listen.c:74:27: error: 'SIGCONT' undeclared (first use in this function); did you mean 'SIGINT'? 74 | sig_cont = signal(SIGCONT, print_prompt); | ^~~~~~~ | SIGINT
I see from mingw headers that the SIG_BLOCK and SIG_SETMASK are defined in pthread.h so included those headers to resolve it but unsure if that is the right approach nor where to find reference of SIGCONT. Is there a configuration arguments to be passed to build for Windows thru MinGW64 that you recommend?

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

1 participant