[Bug 52374] New: compiling on Cygwin fails: error: ‘S_IRUSR’ undeclared (in libs/mpg123)
https://bugs.winehq.org/show_bug.cgi?id=52374 Bug ID: 52374 Summary: compiling on Cygwin fails: error: ‘S_IRUSR’ undeclared (in libs/mpg123) Product: Wine Version: 7.0-rc5 Hardware: x86-64 OS: Windows Status: UNCONFIRMED Severity: normal Priority: P2 Component: l3codeca.acm Assignee: wine-bugs(a)winehq.org Reporter: saulius2(a)gmail.com (This is continuation from the bug 52370) After faking some dlls from there, make then fails in libs/mpg123. Other defines are missing too: S_IWUSR, S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH. --- snip --- $ make gcc -c -o libs/mpg123/src/compat/compat.o libs/mpg123/src/compat/compat.c -Ilibs/mpg123 -Iinclude -Iinclude/msvcrt \ -Ilibs/mpg123/src -Ilibs/mpg123/src/compat -Ilibs/mpg123/src/libmpg123 -DOPT_GENERIC_DITHER \ -DREAL_IS_FLOAT -DNO_CATCHSIGNAL -DMPG123_NO_LARGENAME -D_UCRT -fasynchronous-unwind-tables \ -D_WIN32 -fno-builtin -fshort-wchar -D__WINE_PE_BUILD -pipe -fcf-protection=none \ -fno-stack-protector -fno-strict-aliasing -Wno-packed-not-aligned -gdwarf-4 \ -fno-omit-frame-pointer -g -O2 libs/mpg123/src/compat/compat.c: In function ‘INT123_compat_open’: libs/mpg123/src/compat/compat.c:96:37: error: ‘S_IRUSR’ undeclared (first use in this function) 96 | ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); | ^~~~~~~ libs/mpg123/src/compat/compat.c:96:37: note: each undeclared identifier is reported only once for each function it appears in libs/mpg123/src/compat/compat.c:96:45: error: ‘S_IWUSR’ undeclared (first use in this function) 96 | ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); | ^~~~~~~ libs/mpg123/src/compat/compat.c:96:53: error: ‘S_IRGRP’ undeclared (first use in this function) 96 | ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); | ^~~~~~~ libs/mpg123/src/compat/compat.c:96:61: error: ‘S_IWGRP’ undeclared (first use in this function) 96 | ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); | ^~~~~~~ libs/mpg123/src/compat/compat.c:96:69: error: ‘S_IROTH’ undeclared (first use in this function) 96 | ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); | ^~~~~~~ libs/mpg123/src/compat/compat.c:96:77: error: ‘S_IWOTH’ undeclared (first use in this function) 96 | ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); | ^~~~~~~ make: *** [Makefile:160889: libs/mpg123/src/compat/compat.o] Error 1 --- snip --- This then leads to dlls/l3codeca.acm/l3codeca.acm build failure. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52374 Saulius K. <saulius2(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|compiling on Cygwin fails: |build on Cygwin fails: |error: ‘S_IRUSR’ undeclared |error: ‘S_IRUSR’ undeclared |(in libs/mpg123) |(in libs/mpg123) Priority|P2 |P4 Severity|normal |blocker --- Comment #1 from Saulius K. <saulius2(a)gmail.com> --- To me it seems that compiler doesn't pick up the following header file from libs/mpg123/src/compat/compat.c: --- snip --- #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif --- snip --- If I trace included header files: --- snip --- $ gcc -c -H libs/mpg123/src/compat/compat.c -Ilibs/mpg123 -Iinclude -Iinclude/msvcrt -Ilibs/mpg123/src -Ilibs/mpg123/src/compat -Ilibs/mpg123/src/libmpg123 -DOPT_GENERIC_DITHER -DREAL_IS_FLOAT -DNO_CATCHSIGNAL -DMPG123_NO_LARGENAME -D_UCRT -fasynchronous-unwind-tables -D_WIN32 -fno-builtin -fshort-wchar -D__WINE_PE_BUILD -pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing -Wno-packed-not-aligned -gdwarf-4 -fno-omit-frame-pointer -g -O2 |& grep -e stat.h . include/msvcrt/sys/stat.h --- snip --- ... only include/msvcrt/sys/stat.h seems to be included. But the the header from Cygwin isn't tried. It's present on system along with the defines, though: --- snip --- $ grep S_IRUSR /usr/include/sys/stat.h #define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) #define S_IRUSR 0000400 /* read permission, owner */ #define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) /* 0666 */ --- snip --- -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52374 --- Comment #2 from Saulius K. <saulius2(a)gmail.com> --- After updating Wine to the stable release of 7.0, the bug remains. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=52374 --- Comment #3 from Saulius K. <saulius2(a)gmail.com> --- Wine 7.3 build still fails on Cygwin. I took a look at the related code block: --- snip --- #if (defined(WIN32) && !defined (__CYGWIN__)) /* MSDN says POSIX function is deprecated beginning in Visual C++ 2005 */ /* Try plain old _open(), if it fails, do nothing */ ret = _open(filename, flags|_O_BINARY, _S_IREAD | _S_IWRITE); #else ret = open(filename, flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); #endif --- snip --- ... and now I'm not sure whether the 1st or the 2nd part should be activated when building 3rd party libs. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=52374 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #4 from Alexandre Julliard <julliard@winehq.org> --- Resolving WONTFIX, we require mingw64 for the Cygwin build since 8e0f84a4c6c31d9f750ff6972cb7f53242a6db7c. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=52374 --- Comment #5 from Saulius K. <saulius2@gmail.com> --- Oh, I also noticed the follow-up commit: tools: Remove Cygwin platform and treat it as Mingw. Alexandre, what's the argument behind this? I ask because there are other *nix system implementations on Windows: bother older – Interix, SFU, and newer – Midipix[1], MinC[2]. So I would like to know what drives Wine in this regard. [1] https://www.midipix.org/#sec-midipix [2] https://minc.commandlinerevolution.nl/english/home.html -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=52374 --- Comment #6 from Alexandre Julliard <julliard@winehq.org> --- mingw-w64 is now required to build PE dlls, because it doesn't really make sense to spend effort coercing a Unix-on-Windows toolchain into building Windows dlls. That toolchain adds hacks to make Windows dlls look like Unix shared libraries, and then on top of that, Wine has to add hacks to make the Unix shared libraries look like Windows dlls again. It's much easier to build proper Windows dlls in the first place... So the only support we need from Cygwin is to run configure and build the tools, and then defer to mingw-w64 for the rest. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
WineHQ Bugzilla -
WineHQ Bugzilla