Compilation problems on Solaris
Reported by: |
Dagobert Michelsen <dam@…> |
Owned by: |
|
Priority:
|
normal
|
Milestone:
|
|
Component:
|
BitlBee
|
Version:
|
1.2.7
|
Keywords:
|
|
Cc:
|
|
IRC client+version:
|
Client-independent
|
Operating System:
|
Other
|
OS version/distro:
|
Solaris 9 Sparc/x86
|
|
|
Hi,
I have compiled bitlbee stable/release 1.2.8 (not listed on version popup so I selected 1.2.7 there) on Solaris 9 Sparc and x86 and encountered some portability issues:
- The Makefile unconditionally add
-Wall
which is not supported by Sun Studio compiler
- In
conf.c
and unix.c
the function setenv
is used where Solaris only has putenv
- The header
stdint.h
is used where Solaris only has inttypes.h
- In some function the idiom
return myfunc(args);
is used although the function is declared to return void. This is an error when compiling with Sun Studio.
- The ternary-operator is used with the idiom
myvalue ? : "something"
leaving the second part empty instead of myvalue ? myvalue : "something"
. This is also not allowed in Sun Studio
- The explicit definition of
_XOPEN_SOURCE
in protocols/twitter/twitter_lib.c
confuses the include order and must not be defined in this context on Solaris.
I have patches attached to this bug that make bitlbee compilable on Solaris, however, some of them have are hacked together and a clean solution would be favorable.
Additionally, we offer access to the OpenCSW buildfarm to upstream projects for regular testing on Solaris. Feel free to contact me for an account:
http://www.opencsw.org/extend-it/signup/to-upstream-maintainers/
Thanks for the patches! Note that 1.2.8 is old code and what is currently in bzr is a fairly major rewrite. Most of the patches applied, but you may find new issues in head. Feel free to submit more patches to fix those. I'll try to remember the ?: issue myself.
-Wall is now set in the configure script if $CC contains gcc.
BTW, this part was dangerous:
Please be careful when making changes like this, since it can introduec hard to find bugs.