Apache OpenOffice (AOO) Bugzilla – Issue 6243
My Linux box lacks CLK_TCK, which makes /source/datetime/ttime.cxx not to compile
Last modified: 2002-07-18 11:27:03 UTC
I have tried to read the include-files over and over, and can't grasp why CLK_TCK isn't defined. Also, the fix in the later versions (according to the web-cvs) tries to use _SC_CLK_TCK, but this isn't picked up either. (I doing this on RedHat7.2-x86 gcc3.04) Since time.h in some cases declared CLK_TCK as CLOCKS_PER_SEC (as used later on in ttime.cxx) I've replaced CLK_TCK with CLOCKS_PER_SEC and then it compiles, but I don't really know if that is ok. Since the machine is rather stock RH-install, I can't see how it never was an issue for anyone before?
Well, it doesnt lack the definition, it just never gets defined. The string CLK_TCK is in time.h of course, but the #ifdef's seems to get it unparsed. Quote: /* This is the obsolete POSIX.1-1988 name for the same constant. */ # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K # ifndef CLK_TCK # define CLK_TCK CLOCKS_PER_SEC # endif # endif
Actually the OOo build requirements for Linux are gcc 3.02 or gcc 2.95.2 as mentioned on http://www.openoffice.org/dev_docs/source/build_linux.html#BuildRequirements With that compiler the time.h CLK_TCK is defined if !defined(__STRICT_ANSI) || defined(__USE_POSIX).
Now there, I've built gcc3.0.2 and restarted a fresh compile of OOo. Same error. Somehow, I didn't think the gcc folks would change to/from __STRICT_ANSI__ or __USE_XOPEN2K overnight going form 3.0.2 to 3.0.4.
hro@hjs: Can please tell how to workaround this problem. Guess this is a know issue. I didn't found the thread in porting.dev you mentioned.
see patch in fixed issue #3482 *** This issue has been marked as a duplicate of 3482 ***
...