StephanTLavavej / mingw-distro

MinGW distro build scripts.
492 stars 55 forks source link

coreutils: getegid and geteuid errors during build process #66

Closed oldpink closed 5 years ago

oldpink commented 5 years ago

I was able to get the coreutils to compile roughly halfway, but it stalls at the point below, and I have no idea how to get it to complete. I was able to get past this roadblock by passing the "-k" flag to make, allowing it to complete building the likes of wc.exe and sort.exe, but I was mainly wanting to get mv.exe to build, and this error prevents building that and several other exe files. Is there any patch or flag that I need to pass to the build or configure process that would get past the below getegid and geteuid errors? Thanks.

make all-recursive make[1]: Entering directory '/root/Downloads/coreutils/coreutils-8.30' Making all in po make[2]: Entering directory '/root/Downloads/coreutils/coreutils-8.30/po' make[2]: Nothing to be done for 'all'. make[2]: Leaving directory '/root/Downloads/coreutils/coreutils-8.30/po' Making all in . make[2]: Entering directory '/root/Downloads/coreutils/coreutils-8.30' CCLD src/[.exe src/lbracket.o:lbracket.c:(.text+0x93d): undefined reference to getegid' src/lbracket.o:lbracket.c:(.text+0xe73): undefined reference togeteuid' src/lbracket.o:lbracket.c:(.text+0x123f): undefined reference to getegid' src/lbracket.o:lbracket.c:(.text+0x12ac): undefined reference togeteuid' /opt/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.0/../../../../x86_64-w64-mingw32/bin/ld: src/lbracket.o: bad reloc address 0x0 in section `.pdata' collect2: error: ld returned 1 exit status make[2]: [Makefile:7793: src/[.exe] Error 1 make[2]: Leaving directory '/root/Downloads/coreutils/coreutils-8.30' make[1]: [Makefile:11737: all-recursive] Error 1 make[1]: Leaving directory '/root/Downloads/coreutils/coreutils-8.30' make: *** [Makefile:5998: all] Error 2

StephanTLavavej commented 5 years ago

This is essentially a duplicate of https://github.com/StephanTLavavej/mingw-distro/issues/4. Upstream coreutils isn't built or tested for MinGW, and as a result it's a total mess. My distro contains the most extensive patches in existence (that I'm aware of) for making it minimally work, but as you've discovered, not for all executables. I'm going to resolve this as wontfix, because I don't know how to help you any further; if you want improved MinGW support for coreutils, you'll need to work directly with the upstream coreutils maintainers. I wish you good luck.