Ticket #145 (closed enhancement: lackofresponse)

Opened 6 years ago

Last modified 3 years ago

patch to compile on solaris

Reported by: trs80 Owned by: lennart
Milestone: Component: avahi-core
Keywords: solaris Cc: trs80@…, Padraig.Obriain@…

Description

Attatched is a patch that makes avahi compile on solaris. It also fixes a bug in docs/man/Makefile.am relating to multiple invocations of make install. avahi-daemon runs ok and avahi-resolve also works, but avahi-browse segfaults while calling if_indextoname, backtrace to follow.

Attachments

avahi-solaris.patch Download (2.0 KB) - added by trs80 6 years ago.
patch to let avahi compile on solaris

Change History

Changed 6 years ago by trs80

patch to let avahi compile on solaris

Changed 6 years ago by trs80

Here's the backtrace:

#0 0xbfd58ef8 in realfree () from /lib/libc.so.1 #1 0xbfd58ade in _malloc_unlocked () from /lib/libc.so.1 #2 0xbfd588ff in malloc () from /lib/libc.so.1 #3 0xbfec7637 in if_indextoname () from /lib/libsocket.so.1 #4 0x08051eba in print_service_line (config=0x70637164, c=-12 '▒', interface=2, protocol=134652652,

name=0x806753c "parantechinus []", type=0x2f0 <Address 0x2f0 out of bounds>, domain=0x806756c "local") at avahi-browse.c:149

#5 0xbff87cfb in avahi_service_browser_event (client=0x70637164, event=AVAHI_BROWSER_NEW, message=0x80673b0) at browser.c:777 #6 0xbff849c6 in filter_func (bus=0x8067080, message=0x80673b0, userdata=0x8064fd8) at client.c:247 #7 0xbff440bb in dbus_connection_dispatch () from /usr/lib/libdbus-1.so.3 #8 0xbff8a224 in dispatch_timeout_callback (t=0x8066f00, userdata=0x8065108) at ../avahi-common/dbus-watch-glue.c:103 #9 0xbff16a66 in timeout_callback (t=0x8066f00) at simple-watch.c:449 #10 0xbff16f59 in avahi_simple_poll_dispatch (s=0x80673b0) at simple-watch.c:562 #11 0xbff1701d in avahi_simple_poll_iterate (s=0x8064f38, timeout=-1) at simple-watch.c:597 #12 0xbff17117 in avahi_simple_poll_loop (s=0x8064f38) at simple-watch.c:638 #13 0x08053160 in main (argc=2, argv=0x80478d8) at avahi-browse.c:772

Changed 6 years ago by trs80

  • cc Padraig.Obriain@… added

In addition to the patch, to compile with Sun's cc, you need to pass

CFLAGS=-xc99 CC=cc CPPFLAGS=-I/usr/sfw/include "LDFLAGS=-L/usr/sfw/lib -R/usr/sfw/lib"

on the configure line.

Changed 6 years ago by lennart

(In [1485]) Proplery remove bvnc man page before installing it. (re #145)

Changed 6 years ago by lennart

  • status changed from new to assigned

(In [1484]) fix compilation when compiled with DBM instead of gdbm. Patch supplied from Padraig O'Briain. (re #145)

Changed 6 years ago by lennart

(In [1486]) Some additional solaris portability issues. (Patch from trs80) (re #145)

Changed 6 years ago by lennart

What shall I do about that CFLAGS=-xc99 CC=cc CPPFLAGS=-I/usr/sfw/include "LDFLAGS=-L/usr/sfw/lib -R/usr/sfw/lib" issue? I can only acknowledge this, but I cannot do anything about it since I have no access to Solaris. If you want configure to run fine without any special environment variable settings, please supply a patch.

Also, I cannot help with the if_indextoname() issue. It works fine on Linux and looks quite unproblematic too me. That's all I can say.

I fixed the other three issues now.

Next time, please file seperate bugs for each issue. Thank you!

Changed 6 years ago by tedp

What version of Solaris & what architecture did you get the segfault on?

Changed 6 years ago by trs80

tedp: SXCE b59, intel with a 64bit kernel. ifconfig -a says index 1 is lo0, and index 2 is iprb0. Sometimes the crash occurs after printing a line or two. Hmm, looking at  http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libsocket/inet/interface_id.c#104 it's malloc dying trying to allocate (numifs * sizeof (struct lifreq)) bytes, which isn't dependent on the if_indextoname parameters.

lennart: for the CC=cc issue, I'm not fussed since gcc works, but if anyone else (eg Sun) tries to use the Sun Studio cc, at least it's documented.

Changed 6 years ago by lennart

Also see:

 http://lists.freedesktop.org/archives/avahi/2007-June/001075.html

Unless someone with access to Solaris looks into this this bug will stay open forever...

Changed 3 years ago by lennart

  • status changed from assigned to closed
  • resolution set to lackofresponse

Closing due to lack of response.

Note: See TracTickets for help on using tickets.