[Bug 32369] New: dlls/ntdll/file.c fails to link with older glibc due to missing fallocate64()
http://bugs.winehq.org/show_bug.cgi?id=32369 Bug #: 32369 Summary: dlls/ntdll/file.c fails to link with older glibc due to missing fallocate64() Product: Wine Version: 1.5.18 Platform: x86-64 OS/Version: Linux Status: NEW Keywords: regression Severity: normal Priority: P2 Component: ntdll AssignedTo: wine-bugs(a)winehq.org ReportedBy: dmitry(a)baikal.ru CC: hans(a)meelstraat.net Classification: Unclassified Regression SHA1: c019083240e70b52fb119dad469bb8c6cfda4ade ../../tools/winegcc/winegcc -m32 -B../../tools/winebuild --sysroot=../.. -fasynchronous-unwind-tables -shared ./ntdll.spec actctx.o atom.o cdrom.o critsection.o debugbuffer.o debugtools.o directory.o env.o error.o exception.o file.o handletable.o heap.o large_int.o loader.o loadorder.o misc.o nt.o om.o path.o printf.o process.o reg.o relay.o resource.o rtl.o rtlbitmap.o rtlstr.o sec.o serial.o server.o signal_arm.o signal_i386.o signal_powerpc.o signal_sparc.o signal_x86_64.o string.o sync.o tape.o thread.o threadpool.o time.o version.o virtual.o wcstring.o version.res -nodefaultlibs -Wl,--image-base,0x7bc00000 -o ntdll.dll.so -lwinecrt0 ../../libs/port/libwine_port.a -lpthread file.o: In function `NtSetInformationFile': /home/dmitry/wine/dlls/ntdll/file.c:2264: undefined reference to `fallocate64' collect2: ld returned 1 exit status winegcc: gcc failed --- commit c019083240e70b52fb119dad469bb8c6cfda4ade Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Dec 4 10:40:16 2012 +0100 kernel32: Implement SetFileValidData. --- Adding '#undef _FILE_OFFSET_BITS' after '#include "config.h" to dlls/ntdll/file.c is a workaround. Probably configure needs to add '#define _FILE_OFFSET_BITS 64' when detecting the presence of various optional libc exports (in case it was detected to be required). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #1 from Hans Leidekker <hans(a)meelstraat.net> 2012-12-05 02:30:17 CST --- This appears to be https://bugzilla.redhat.com/show_bug.cgi?id=500487. On my system configure already adds #define _FILE_OFFSET_BITS 64. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #2 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-12-05 03:09:18 CST --- (In reply to comment #1)
This appears to be https://bugzilla.redhat.com/show_bug.cgi?id=500487. On my system configure already adds #define _FILE_OFFSET_BITS 64.
Configure (correctly) adds '_FILE_OFFSET_BITS 64' here as well. The problem is that this define redirects fallocate() to fallocate64() which is missing in an older glibc, but configure fails to detect that. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #3 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-12-05 03:54:42 CST --- (In reply to comment #2)
This appears to be https://bugzilla.redhat.com/show_bug.cgi?id=500487. On my system configure already adds #define _FILE_OFFSET_BITS 64.
Configure (correctly) adds '_FILE_OFFSET_BITS 64' here as well. The problem is that this define redirects fallocate() to fallocate64() which is missing in an older glibc, but configure fails to detect that.
I'll rephrase that: Configure (correctly) adds '_FILE_OFFSET_BITS 64' to config.h here as well. The problem is that this define redirects fallocate() to fallocate64() which is missing in an older glibc, but configure fails to detect that because it doesn't add that define while compiling the detecting code. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #4 from Hans Leidekker <hans(a)meelstraat.net> 2012-12-05 04:09:57 CST --- (In reply to comment #3)
Configure (correctly) adds '_FILE_OFFSET_BITS 64' to config.h here as well. The problem is that this define redirects fallocate() to fallocate64() which is missing in an older glibc, but configure fails to detect that because it doesn't add that define while compiling the detecting code.
It does add that define here. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #5 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-12-05 05:45:26 CST --- (In reply to comment #4)
Configure (correctly) adds '_FILE_OFFSET_BITS 64' to config.h here as well. The problem is that this define redirects fallocate() to fallocate64() which is missing in an older glibc, but configure fails to detect that because it doesn't add that define while compiling the detecting code.
It does add that define here.
You mean while configure checks for fallocate()? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #6 from Hans Leidekker <hans(a)meelstraat.net> 2012-12-05 06:08:34 CST --- (In reply to comment #5)
(In reply to comment #4)
Configure (correctly) adds '_FILE_OFFSET_BITS 64' to config.h here as well. The problem is that this define redirects fallocate() to fallocate64() which is missing in an older glibc, but configure fails to detect that because it doesn't add that define while compiling the detecting code.
It does add that define here.
You mean while configure checks for fallocate()?
Yes. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #7 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-12-05 22:40:08 CST --- (In reply to comment #6)
Configure (correctly) adds '_FILE_OFFSET_BITS 64' to config.h here as well. The problem is that this define redirects fallocate() to fallocate64() which is missing in an older glibc, but configure fails to detect that because it doesn't add that define while compiling the detecting code.
It does add that define here.
You mean while configure checks for fallocate()?
Yes.
You are right, it's _GNU_SOURCE defined by wine/port.h which breaks it. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #8 from Hans Leidekker <hans(a)meelstraat.net> 2012-12-06 03:40:42 CST --- Created attachment 42725 --> http://bugs.winehq.org/attachment.cgi?id=42725 patch Does this patch work for you? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #9 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-12-06 03:59:22 CST --- (In reply to comment #8)
Created attachment 42725 [details] patch
Does this patch work for you?
Yes, this patch fixes fallocate() detection here (HAVE_FALLOCATE is not defined by configure). Perhaps _GNU_SOURCE should be defined by a generic API detector, since wine/port.h forces its definition anyway? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 --- Comment #10 from Hans Leidekker <hans(a)meelstraat.net> 2012-12-06 04:40:33 CST --- (In reply to comment #9)
(In reply to comment #8)
Created attachment 42725 [details] patch
Does this patch work for you?
Yes, this patch fixes fallocate() detection here (HAVE_FALLOCATE is not defined by configure). Perhaps _GNU_SOURCE should be defined by a generic API detector, since wine/port.h forces its definition anyway?
Well, wine/port.h states that it needs that for pread and pwrite but for them the standard configure check seems to suffice. It would guard us against the next function that needs it but on the other hand, this is only the second function and I don't see many more coming. There's also value in being made aware of broken systems ;) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com --- Comment #11 from Bruno Jesus <00cpxxx(a)gmail.com> 2012-12-07 11:28:14 CST --- Patch commited: http://source.winehq.org/git/wine.git/?a=commit;h=3244be050048e2ce5e60c2d4a5... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 Dmitry Timoshkov <dmitry(a)baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |3244be050048e2ce5e60c2d4a5a | |5dac193e4b2a5 Status|NEW |RESOLVED Resolution| |FIXED --- Comment #12 from Dmitry Timoshkov <dmitry(a)baikal.ru> 2012-12-07 21:09:55 CST --- Thanks Hans. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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=32369 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> 2012-12-21 13:27:55 CST --- Closing bugs fixed in 1.5.20. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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 (1)
-
wine-bugs@winehq.org