[collectd] Compiling on HP-UX/Solaris

Jeff Haney jah at clan-rum.org
Mon Nov 6 21:12:55 CET 2006


It worked, woohoo!  Thanks for you help octo!

On to Solaris...  I'm trying to compile collectd on Solaris 6 and I get 
this configure error:

checking for nanosleep... no
checking for nanosleep in -lrt... no
configure: error: cannot find nanosleep

And again, any help would be greatly appreciated.



Florian Forster wrote:
> Hi again :)
>
> On Mon, Nov 06, 2006 at 01:44:34PM -0500, Jeff Haney wrote:
>   
>> Thanks octo, I didn't realize you had made any changes. It got past 
>> that point but got another error further on, see below.
>>     
>
> No problem, good to know that it works as expected :)
>
>   
>> I attached the full output of my configure and compile.  Again, your
>> help is very much appreciated.
>>
>> network.c: In function 'network_receive':
>> network.c:428: warning: passing argument 6 of 'recvfrom' from 
>>   incompatible pointer type
>>     
>
> Great. That's why I love standards in general and UNIX in particular:
> The sixth argument, named `fromlen' is an `int *' under HP-UX (and,
> according to the glibc's manpage `recv(2)', 4.x BSD, libc4 and libc5)
> but it is a `socklen_t *', according to some POSIX specification. And,
> because someone felt funny, the `getaddrinfo' and `getnameinfo'
> functions use `size_t' for this, which usually doesn't fit into an int
> on 64bit machines. Here, the glibc and HP-UX agree - but the arguments
> are of type `socklen_t' according to Stevens' APUE[*].
>
> If I simply change the `fromlen' argument to `int' on my machine
> (GNU/Linux) I get the following compiler-error:
> -- 8< --
>  network.c: In function 'network_receive':
>  network.c:428: warning: pointer targets in passing argument 6 of
>    'recvfrom' differ in signedness
> -- >8 --
>
> So, apparently we need some more autoconf checks to handle this madness.
> Could you, for now, change the declaration of the `addrlen' variable
> (file `src/network.c', line 412) from `socklen_t' to `int' and see if
> that works?
>
> Regards,
> -octo
>
> [*] <http://www.kohala.com/start/apue.html>
>   




More information about the collectd mailing list