Ticket UUID: | 748946 | |||
Title: | cannot compile current cvs tree on Tru64Unix 5.1A | |||
Type: | Bug | Version: | obsolete: 8.5a0 | |
Submitter: | mmokrejs | Created on: | 2003-06-04 15:54:02 | |
Subsystem: | 37. File System | Assigned To: | das | |
Priority: | 5 Medium | Severity: | ||
Status: | Closed | Last Modified: | 2003-07-18 09:03:19 | |
Resolution: | Fixed | Closed By: | das | |
Closed on: | 2003-07-18 02:03:19 | |||
Description: |
cc -c -O2 -arch ev56 -O -DTCL_DBGX= -I./../generic -I. -DHAVE_TZSET -std1 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 -Dsocklen_t=unsigned -DNO_UNION_WAIT=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_CHFLAGS=1 -DHAVE_SYS_IOCTL_H=1 -DUSE_FIONBIO=1 -DTCL_SHLIB_EXT=\".so\" ./../unix/tclUnixFCmd.c cc: Info: ./../unix/tclUnixFCmd.c, line 128: Trailing comma found in enumerator list. (trailcomma) }; ^ cc: Error: ./../unix/tclUnixFCmd.c, line 1859: In this statement, "UF_IMMUTABLE" is not declared. (undeclared) *attributePtrPtr = Tcl_NewBooleanObj((statBuf.st_flags & UF_IMMUTABLE) != 0); -------------------------------------------------------------^ cc: Error: ./../unix/tclUnixFCmd.c, line 1906: In this statement, "UF_IMMUTABLE" is not declared. (undeclared) statBuf.st_flags |= UF_IMMUTABLE; ----------------------------^ cc: Error: ./../unix/tclUnixFCmd.c, line 1908: In this statement, "UF_IMMUTABLE" is not declared. (undeclared) statBuf.st_flags &= ~UF_IMMUTABLE; -----------------------------^ make: *** [tclUnixFCmd.o] Error 1 | |||
User Comments: |
das added on 2003-07-18 09:03:19:
Logged In: YES user_id=90580 patch committed mmokrejs added on 2003-06-24 17:39:44: Logged In: YES user_id=696559 I tried current cvs and saw same problem. So, I tried the patch and I could compile without problems(the HAVE_CHFLAGS is not defined). Tested on Tru64Unix 5.1A against current cvs(20030624). mmokrejs added on 2003-06-11 20:46:37: Logged In: YES user_id=696559 I cannot find using grep under /usr/include "chflags" at all. Although, I don't have any manpage chflags. Tru64Unix 5.1A das added on 2003-06-11 16:15:12: File Added - 52751: 748946.patch das added on 2003-06-11 16:15:11: Logged In: YES user_id=90580 ack, forgot to attach patch... das added on 2003-06-11 16:13:35: Logged In: YES user_id=90580 yes, the chflags() code is mine. indeed also testing #ifdef UF_IMMUTABLE should workaround the issue, c.f. attached patch (could you test?) however, if the chflags() API on these non-BSD OSs has similar functionality to the BSD one, we should try to use it if possible (it may only be a matter of adding an include do define UF_IMMUTABLE). Could somebody provide manpages for chflags(2) on these systems? googling for "chflags Tru64" doesn't seem to yield anything interesting... for reference, the BSD chflags(2) manpage: http://www.rocketaware.com/man/man2/chflags.2.htm dkf added on 2003-06-11 15:44:15: Logged In: YES user_id=79902 So this means that configure needs to test not only whether there is a chflags() but whether it works. Can't do that myself (wrong version of autoconf and no experience with the chflags() call either) but shouldn't be too challenging. Assigning to Dan Steffen who I believe was the originator of the chflags() code in Tcl. Perhaps test for the define UF_IMMUTABLE as well? sysphrog added on 2003-06-11 12:48:11: Logged In: YES user_id=98124 Oh, and a local workaround: After running ./configure, just edit 'config.status', and find the -DHAVE_CHFLAGS. Delete it, save it, run './config.status', and then 'make'. At least for me, the resulting binary passes 'make test' (more or less - I hit 3 unrelated errors that I need to look into). sysphrog added on 2003-06-11 11:34:02: Logged In: YES user_id=98124 Further debugging indicates that on Linux, this is a squirrely glibc issue - they've apparently added a dummy chflags() function, so autoconf tests for it find it, and hilarity ensues. I've opened a RedHat bugzilla entry on this: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=97169 I also checked one of our Tru64 v5.1a boxes, and there is indeed a function chflags() in their libc.a as well, so apparently there is a similar autoconf issue on Tru64. I'm not enough of an autoconf wizard to suggest a resolution. sysphrog added on 2003-06-11 10:41:18: Logged In: YES user_id=98124 Linux RedHat 9.0, with Rawhide gcc-3.3. Similar issues on Linux RedHat, although st_flags is a problem too: gcc -pipe -c -Os -pipe -march=pentium4 -mfpmath=sse -msse2 -mmmx -fexpensive-optimizations -ffast-math -fno-math-errno -funsafe-math-optimizations -fno-trapping-math -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES -DTCL_DBGX= -Wall -Wconversion -Wno-implicit-int -fPIC -I./../generic -I. -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOLL=1 -DHAVE_STRTOULL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_STRUCT_TM_TM_ZONE=1 -DHAVE_TM_ZONE=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_CHFLAGS=1 -DPEEK_XCLOSEIM=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_SHLIB_EXT=\".so\" ./../unix/tclUnixFCmd.c ../unix/tclUnixFCmd.c: In function `GetReadOnlyAttribute': ../unix/tclUnixFCmd.c:1859: error: structure has no member named `st_flags' ../unix/tclUnixFCmd.c:1859: error: `UF_IMMUTABLE' undeclared (first use in this function) ../unix/tclUnixFCmd.c:1859: error: (Each undeclared identifier is reported only once ../unix/tclUnixFCmd.c:1859: error: for each function it appears in.) ../unix/tclUnixFCmd.c: In function `SetReadOnlyAttribute': ../unix/tclUnixFCmd.c:1906: error: structure has no member named `st_flags' ../unix/tclUnixFCmd.c:1906: error: `UF_IMMUTABLE' undeclared (first use in this function) ../unix/tclUnixFCmd.c:1908: error: structure has no member named `st_flags' ../unix/tclUnixFCmd.c:1912: warning: implicit declaration of function `chflags' ../unix/tclUnixFCmd.c:1912: error: structure has no member named `st_flags' make: *** [tclUnixFCmd.o] Error 1 dkf added on 2003-06-06 15:31:05: Logged In: YES user_id=79902 Isn't this related to OSX support (TIP#118)? vincentdarley added on 2003-06-05 14:55:21: Logged In: YES user_id=32170 Sorry, not my area of expertise at all. |
Attachments:
- 748946.patch [download] added by das on 2003-06-11 16:15:12. [details]