[Kamailio-Devel] [ openser-Bugs-2132173 ] error compiling db_ut on solaris 10

SourceForge.net noreply at sourceforge.net
Mon Nov 3 18:30:17 CET 2008


Bugs item #2132173, was opened at 2008-09-27 12:56
Message generated for change (Comment added) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2132173&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver 1.4.x
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Muhammad Akl (m-akl)
>Assigned to: Henning Westerholt (henningw)
Summary: error compiling db_ut  on solaris 10 

Initial Comment:
Vesion : 1.4.1 OS : solaris 10 

bug description :

when was trying to compile the new release of kamailio 1.4.1 i got the following error message : 

http://pastebin.com/m2b086ad6

The problem was happened due to a conflict for the function swab() , as it was defined in two header files which are stdlib.h and unistd.h , so i checked the stdlib.h file and found the following : 

/*
 * swab() has historically been in <stdlib.h> as delivered from AT&T
 * and continues to be visible in the default compilation environment.
 * As of Issue 4 of the X/Open Portability Guides, swab() was declared
 * in <unistd.h>. As a result, with respect to X/Open namespace the
 * swab() declaration in this header is only visible for the XPG3
 * environment.
 */

what i did to solve this problem is removing the following line from db/db_ut.c file :

#include <stdlib.h> 

regards 

Muhammad

----------------------------------------------------------------------

>Comment By: Henning Westerholt (henningw)
Date: 2008-11-03 17:30

Message:
fixed with commit 5159

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2008-10-15 14:45

Message:
Error msg, just to prevent that the pastebin stuff gets deleted:
Compiling db/db_ut.c
gcc  -g -O9 -funroll-loops  -Wcast-align  -Wall  -minline-all-stringops
-falign-
loops -mtune=pentium4     -DNAME='"kamailio"' -DVERSION='"1.4.1-notls"'
-DARCH='
"i386"' -DOS='"solaris"' -DCOMPILER='"gcc 3.4.3"' -D__CPU_i386
-D__OS_solaris -D
__SMP_no -DCFG_DIR='"/usr/local//etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM 
-DSHM_M
MAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES
-DSTATIST
ICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_
WAIT_LOOPS=1024  -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H
-DHAVE_SCHED_YIELD -
DHAVE_ALLOCA_H -DUSE_SIGACTION -D_POSIX_PTHREAD_SEMANTICS -DHAVE_DEVPOLL
-DHAVE_
SELECT -c db/db_ut.c -o db/db_ut.o
In file included from db/db_ut.c:40:
/usr/include/stdlib.h:144: error: conflicting types for 'swab'
/usr/include/unistd.h:496: error: previous declaration of 'swab' was here
/usr/include/stdlib.h:144: error: conflicting types for 'swab'
/usr/include/unistd.h:496: error: previous declaration of 'swab' was here
db/db_ut.c: In function `db_int2str':
db/db_ut.c:93: warning: implicit declaration of function `snprintf'
gmake: *** [db/db_ut.o] Error 1

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2008-10-15 14:40

Message:
Hi Muhammad,

unfortunally the functions from the <stdlib.h> include are needed from
this file, so this will not work. Its not possible to include this two
headers in solaris? Strange problem.

Henning

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2132173&group_id=139143



More information about the Devel mailing list