Configure fails to find dirent64 on CentOS 5 and Fedora
Closed / Duplicate1874521fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 1 year ago
Descriptionplain2008-01-18 10:47:09
Tcl, both shipping with Cent OS 5, and when built from the www.tcl.tk source files fails to glob 64bit NFS file shares. Looking at the output of configure this is due to it failing to find dirent64. Behaviour: Mount an NFS share from a 64bit file server, eg Mac OS X 10.4 serving out a 11TB volume. tclsh cd /mylargevolume set files [glob "*"] gives the error, 'no files matched glob pattern "*"' Looking at tcl.m4, autoconf is looking for 'struct dirent64' in <sys/dirent.h>, however on Cent OS (RHEL 5) this file doesn't exist. The 'dirent64' structure is defined in /usr/include/dirent.h, so modifying tcl.m4 to '#include <dirent.h>' allows configuration to complete correctly and the built binaries ARE able to glob the directory structure on the NFS share. [email protected]
[email protected]plain2008-01-18 18:06:30
Logged In: NO Forgot to mention, this is on a 32-bit machine
[email protected]plain2008-01-18 18:43:36
Logged In: NO
The following patch fixes it on CentOS 5, and also looks OK on Solaris 9.
--- tcl.m4.orig2008-01-18 11:41:28.000000000 +0000
+++ tcl.m42008-01-18 11:16:11.000000000 +0000
@@ -2765,6 +2765,7 @@
# Now check for auxiliary declarations
AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
AC_TRY_COMPILE([#include <sys/types.h>
+#include <dirent.h>
#include <sys/dirent.h>],[struct dirent64 p;],
tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
dkf Ticket [1874521fff]: 1 change
[History diff]2008-01-21 07:36:05
[email protected]plain2008-01-21 19:48:53
Logged In: NO Don't know why the patch works, as the equivalent applied to tk fails with a file not found error due to the remaining <sys/dirent.h> #include. I'm guessing there are some platforms out there that require the <sys/dirent.h> and some that require <dirent.h>, but I don't know enough about autoconf to come up with a patch that works properly everywhere.
[email protected]plain2008-03-11 23:52:51
Logged In: NO I've just checked, this is still broken in tcl 8.4.18 and 8.5.1.
chrstphrchvzwiki2025-08-26 03:28:20
Closing; this issue was eventually fixed after being reported again as [32afa6e256].
Log in (anonymous is fine) to add a comment.