Help - Search - Members - Calendar
Full Version: Rh9 Frustration
Linuxhelp > Support > Technical Support
elezar87801
I have used RH6.1 for many years, and decided to update to RH9
with the latest stable kernel. Problem is, I code and run a MUD
server, which relies on the 'tm' structure to provide info for
date/time etc. RH9 does not recognise this structure, and refuses
to compile my code. Anyone know what 'tm' has become?
And why in the world would RH alter the basic C language?
I have dug around in the source, but can't find what I need.
Thanks in advance.
hughesjr
RedHat didn't change anything ... they use GNU gcc and glibc. If something in C is different, it is different in all distros, because they all use the GNU gcc/glibc combo.

You can install these following rpms:

compat-gcc
compat-libstdc++
compat-gcc-c++
compat-libstdc++-devel

And then edit your code and change the CC variable from gcc to gcc296 and try to recompile. This uses gcc 2.9.6 to compile.
elezar87801
Thanks for the input. RH9 installs those packages by default, but I did update
my Makefile to use the new compiler. It was still failing, and I was still
frustrated until I spotted what was wrong; the module to blame had a
#include <sys/time.h> instead of #include <time.h> in it, and had been that
way since it was written, I guess. Previous RH releases apparantly didn't
care, and neither does FreeBSD, which I also run. Correcting that mistake
made tm magically appear, and everything compiles clean.
hughesjr
There are 2 files named time.h ... one in /usr/include and one in /usr/include/sys.

The one in /usr/include/sys doesn't contain tm ... the one in /usr/include does contain tm.

I have looked in Mandrake 9.0 & 9.1, RedHat 8 & 9, Debian SID and SUSE 8.1 & 8.2. They have both files and they are the same in each install (1 larger file in /usr/include ... 1 smaller file in /usr/include/sys ... the file in /usr/include/sys doesn't have tm ... the one in /usr include does).

I think the change is that the GNU C Library changed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.