[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde
Subject:    Re: Mimelib compile fails on Solaris 2.5.1 with gcc 2.95.1
From:       Henry Stern <stern () cs ! dal ! ca>
Date:       1999-09-14 14:06:55
[Download RAW message or body]

Joeri,
Your problem's not as complicated as you think.  It'll do that with any C
compiler, my Linux box does it on occasion too (I screwed up autoconf or
something).  Edit config.h and look for #undef HAVE_GETHOSTNAME or something...
change it to #define HAVE_GETHOSTNAME 1 to fix the problem.

Henry Stern

On Tue, 14 Sep 1999, Joeri Mastop wrote:
>Hi there,
>
>I decided it would be nice to have a KDE desktop on my SUN workstation,
>and stumbled into one big compiling adventure.
>
>First of all: I'm runnig Solaris 2.5.1, and I'm using the new gcc 2.95.1
>compiler. I know that this compiler is relatively new and therefore a
>source for problems, but I don't think this problem is caused by gcc
>only.
>
>I'm trying to compile the KDESUPPORT package from KDE 1.1.1, so I
>haven't even started on KDE itself yet. When the makefile reaches the
>mimelib dir, it stops compiling at msgid.cpp with the following error:
>
>/bin/sh ../libtool --silent --mode=compile g++ -DDW_DEVELOPMENT_VERSION
>-DHAVE_CONFIG_H -I. -I.    -O2 -Wall -c msgid.cpp
>msgid.cpp: In function `void GetHostName(char *, int)':
>msgid.cpp:381: implicit declaration of function `int gethostname(...)'
>make[3]: *** [msgid.lo] Error 1
>make[3]: Leaving directory
>`/home/castor/joeri/projects/kde1.1.1/kdesupport-1.1.1/mimelib'
>make[2]: *** [all-recursive] Error 1
>make[2]: Leaving directory
>`/home/castor/joeri/projects/kde1.1.1/kdesupport-1.1.1/mimelib'
>make[1]: *** [all-recursive] Error 1
>make[1]: Leaving directory
>`/home/castor/joeri/projects/kde1.1.1/kdesupport-1.1.1'
>make: *** [all-recursive-am] Error 1
>
>Now it seems that this 'implicit declaration' error is more serious than
>the 'warning-implicit-declaration' from which I get a lot. I did some
>research on the system, and it appears that there is not a single
>headerfile on my system that defines/declares the function
>gethostname(). However, there is a manpage on the system that tells me
>about gethostname(), but it won't tell me were to find it.
>
>Can anyone tell me in which lib/headerfile this function should be
>located on a Solaris 2.5.1 system? Or does the Solaris system have an
>alternative for this? I would expect that gcc 2.95.1 had a declaration
>for this function if the original system lacked one, but maybe it's a
>shortcoming for this gcc version?
>
>If anyone of you can shed some light on this issue, I'd be 'muchobliged'
>:)
>
>Thanks,
>
>    Joeri
>
>--
>
>/**************************************************
> *
> * Ing. Joeri Mastop
> *
> * FOM Instituut voor plasmafysica 'Rijnhuizen'
> * Software Engineering Group
> * Postbus 1207, 3430 BE Nieuwegein
> * the Netherlands
> *
> * Email : jmastop@rijnh.nl
> * Tel   : +30 6096999 [switchboard]
> *         +30 6096728 [direct]
> * Fax   : +30 6031204
> *
> *************************************************/
>
>
>-- 
>Send posts to:  kde@lists.netcentral.net
> Send all commands to:  kde-request@lists.netcentral.net
>  Put your command in the SUBJECT of the message:
>   "subscribe", "unsubscribe", "set digest on", or "set digest off"
>PLEASE READ THE ARCHIVED MESSAGES AT http://lists.kde.org/ BEFORE POSTING
>**********************************************************************
>This list is from your pals at NetCentral <http://www.netcentral.net/>
-- 
Send posts to:  kde@lists.netcentral.net
 Send all commands to:  kde-request@lists.netcentral.net
  Put your command in the SUBJECT of the message:
   "subscribe", "unsubscribe", "set digest on", or "set digest off"
PLEASE READ THE ARCHIVED MESSAGES AT http://lists.kde.org/ BEFORE POSTING
**********************************************************************
This list is from your pals at NetCentral <http://www.netcentral.net/>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic