#350 closed defect (fixed)

1.1.1dev and bzr head won't build on SunOS 5.10

Reported by: ilkka.s.laukkanen@… Owned by:
Priority: normal Milestone: 1.2
Component: BitlBee Version: devel
Keywords: compile Cc:
IRC client+version: Client-independent Operating System: Other
OS version/distro: SunOS 5.10


I can't get bitlbee to build on SunOS 5.10. Granted, I don't actually know if it should. This happens with both 1.1.1dev and bzr head:

$ sh configure && gmake
BitlBee configure

Using bzr revision #305 as version number
Spoofing version number: "bzr-305"

Architecture: SunOS

Configuration done:
  Debugging disabled.
  Binary stripping enabled.
  Using event handler: glib
  Using SSL library: gnutls
  Building with these storage backends: text xml
  Building with these protocols: msn jabber oscar yahoo
* Compiling account.c
In file included from bitlbee.h:121,
                 from account.c:27:
storage.h:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GList'
In file included from /home/poutanei/src/bitlbee/protocols/nogaim.h:44,
                 from bitlbee.h:123,
                 from account.c:27:
/home/poutanei/src/bitlbee/lib/md5.h:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'md5_byte_t'
/home/poutanei/src/bitlbee/lib/md5.h:32: error: expected specifier-qualifier-list before 'u_int32_t'
/home/poutanei/src/bitlbee/lib/md5.h:38: warning: type defaults to 'int' in declaration of 'md5_byte_t'
/home/poutanei/src/bitlbee/lib/md5.h:38: error: expected ';', ',' or ')' before '*' token
/home/poutanei/src/bitlbee/lib/md5.h:39: error: expected declaration specifiers or '...' before 'md5_byte_t'
In file included from bitlbee.h:123,
                 from account.c:27:
/home/poutanei/src/bitlbee/protocols/nogaim.h:70: error: expected specifier-qualifier-list before 'u_int32_t'
/home/poutanei/src/bitlbee/protocols/nogaim.h:284: error: expected declaration specifiers or '...' before 'u_int32_t'
/home/poutanei/src/bitlbee/protocols/nogaim.h:285: error: expected declaration specifiers or '...' before 'u_int32_t'
/home/poutanei/src/bitlbee/protocols/nogaim.h:301: error: expected declaration specifiers or '...' before 'u_int32_t'
In file included from bitlbee.h:127,
                 from account.c:27:
conf.h:54: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'conf_t'
In file included from bitlbee.h:130,
                 from account.c:27:
help.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'help_t'
gmake: *** [account.o] Error 1

uname -a output:

SunOS hopeatilhi 5.10 Generic_127111-05 sun4u sparc SUNW,Sun-Fire-V240

gcc specs:

Reading specs from /share/local/lang/gcc421-sol10-f/bin/../lib/gcc/sparc-sun-solaris2.10/4.2.1/specs
Target: sparc-sun-solaris2.10
Configured with: /usr/local/lang/src/gcc-4.2.1/configure --prefix=/usr/local/lang/gcc421-sol10-f --enable-shared --with-local-prefix=/opt/local --with-libiconv-prefix=/usr/local/lang/gcc421-sol10-f --enable-cpp --enable-threads=posix --with-gnu-ld --with-ld=/usr/local/lang/gcc421-sol10-f/bin/ld --with-gnu-as --with-as=/usr/local/lang/gcc421-sol10-f/bin/as --disable-nls --enable-languages=c,c++,ada --enable-c99 --with-cpu=v9 --with-gmp=/usr/local/lang/gcc421-sol10-f
Thread model: posix
gcc version 4.2.1

Attachments (0)

Change History (8)

comment:1 Changed at 2008-01-15T11:53:16Z by wilmer

Milestone: 1.2

It'd definitely good to make that work, yes. :-)

comment:2 Changed at 2008-01-15T22:24:26Z by mark@…

On a system running the latest Solaris Express Community Edition, I found two changes necessary to compile 1.1.1dev:

  1. In configure, the test for libresolv.a uses "-e," which is not supported in the old sh on Solaris. I fixed this by running configure under ksh, and clearly it already works under bash.
  1. In four files (protocols/nogaim.c, protocols/nogaim.h, lib/md5.c, lib/md5.h), unsigned integer types were referenced as u_intx_t (where "x" is the bit length), instead of uintx_t.

This left me with the following warnings:

bitlbee.c:281: warning: int format, pid_t arg (arg 3) ipc.c:54: warning: int format, long int arg (arg 2) ipc.c:449: warning: int format, pid_t arg (arg 3) ipc.c:553: warning: int format, pid_t arg (arg 3) unix.c:186: warning: int format, pid_t arg (arg 3) unix.c:188: warning: int format, pid_t arg (arg 3)

...but an otherwise clean compile.

I haven't (yet) pulled the bzr head, or tested the 1.1.1dev binary that I generated.

comment:3 Changed at 2008-01-17T22:51:50Z by wilmer

I just fixed the u_int problems (had to #include <stdint.h> somewhere to make it work), see changeset:devel,306. Also added some typecasts to silence the warnings that were left.

What'd be the best way to check for file existence if test -e doesn't work? test -f, maybe?

comment:4 Changed at 2008-01-19T18:26:19Z by wilmer

Resolution: fixed
Status: newclosed

Switched to test -f in changeset:devel,310. It looks like this should work on Solaris. I hope I won't get complaints from people who have a /usr/include full of symlinks...

comment:5 Changed at 2008-01-25T09:30:22Z by ilkka.s.laukkanen@…

With devel,315 it *almost* worked =) I only had to tweak a couple of things to make it build. It seems like G_GNUC_MALLOC doesn't get defined or gets defined incorrectly, which causes the errors from storage.h line 64 in my original bug report ("syntax error before GList"). I worked around by adding this to config.h post-configure:

#define G_GNUC_MALLOC __attribute__((__malloc__))

The same incorrect definition then causes similar errors when compiling crypting.c, so I added this to pick up the definition:

--- crypting.c  2007-11-23 22:25:04 +0000
+++ crypting.c  2008-01-25 09:18:16 +0000
@@ -28,6 +28,10 @@
    included if CRYPTING_MAIN is defined. Or just do "make decode" and
    the programs will be built. */

+# include "config.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>

And with these changes, it builds successfully.

comment:6 Changed at 2008-02-02T13:03:41Z by wilmer

Resolution: fixed
Status: closedreopened

Hmmm... That could be a GLib issue too. Which GLib version do you have? IF this is the only thing missing in it, then it's a pretty lame reason for BitlBee to not work with it. :-/

comment:7 Changed at 2008-02-04T23:55:53Z by wilmer

Resolution: fixed
Status: reopenedclosed

Okay, work-around added.

comment:8 Changed at 2008-02-05T07:14:28Z by ilkka.s.laukkanen@…

Yay, compiles successfully out of the box with default options. Thanks for a quick resolution, if only all projects were like yours =)

Modify Ticket

as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.