Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Rh9 Frustration, C lib query
elezar87801
post Sep 21 2003, 06:48 PM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 21-September 03
Member No.: 1,490



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.
Go to the top of the page
 
+Quote Post
hughesjr
post Sep 21 2003, 09:19 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
elezar87801
post Sep 23 2003, 04:04 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 21-September 03
Member No.: 1,490



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.
Go to the top of the page
 
+Quote Post
hughesjr
post Sep 24 2003, 05:36 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



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.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd October 2017 - 05:18 AM