I think i solved it , i took te following part out of the rtpp_util.h

#if !defined(HAVE_ERR_H)
#define err(exitcode, format, args...) \
  errx(exitcode, format ": %s", ## args, strerror(errno))
#define errx(exitcode, format, args...) \
  { warnx(format, ## args); exit(exitcode); }
#define warn(format, args...) \
  warnx(format ": %s", ## args, strerror(errno))
#define warnx(format, args...) \
  fprintf(stderr, format "\n", ## args)
#endif

And placed it in the following files:

main.c
makeann.c
rtpp_network.c

Now the make commands work. 

I'm not a programmer but rtpp_util.h seems to be definded
in the above files but why it doesn't work i don't know. I'm not really a 
programmer.

Kind regards,
Oliver.




From: oliver_b...@hotmail.com
To: users@rtpproxy.org
Date: Fri, 21 Oct 2011 14:34:40 +0200
Subject: [RTPproxy Users] Problems compiling rtpproxy on Sun Solaris 10








Hello All,

Perhaps someone can help me out, I tried to compile the rtpproxy 1.2.1 on sun 
solaris 10 but i got stuck.

the fault:

main.c: In function 'setbindhost':
main.c:91: warning: implicit declaration of function 'errx'
main.c: In function 'init_config':
main.c:149: warning: implicit declaration of function 'err'
main.c:241: warning: implicit declaration of function 'warnx'


So i thought to be clever and get the RTPPROXY from GIT. but stil receiving the 
same error.
(slightly different)

I'm using GCC , GNU gmake and the solaris linker. 

Configure seems to go well:

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

$ ./configure --prefix=/opt/contrib/opensip/run/RTPPROXY

checking for a BSD-compatible install... /opt/contrib/opensip/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether /opt/contrib/home/compile/LIBRARIES/bin/gmake sets $(MAKE)... 
yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for gcc... /opt/contrib/home/compile/GCC/gcc/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /opt/contrib/home/compile/GCC/gcc/bin/gcc accepts -g... yes
checking for /opt/contrib/home/compile/GCC/gcc/bin/gcc option to accept ISO 
C89... none needed
checking for style of include used by 
/opt/contrib/home/compile/LIBRARIES/bin/gmake... GNU
checking dependency style of /opt/contrib/home/compile/GCC/gcc/bin/gcc... gcc3
checking how to run the C preprocessor... 
/opt/contrib/home/compile/GCC/gcc/bin/gcc -E
checking for grep that handles long lines and -e... /usr/xpg4/bin/grep
checking for egrep... /usr/xpg4/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gsm.h usability... no
checking gsm.h presence... no
checking for gsm.h... no
checking g729_encoder.h usability... no
checking g729_encoder.h presence... no
checking for g729_encoder.h... no
checking for ANSI C header files... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for struct sockaddr_un.sun_len... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking return type of signal handlers... void
checking for atexit... yes
checking for gettimeofday... yes
checking for memset... yes
checking for mkdir... yes
checking for socket... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

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

--------------------------------------------------------
$ gmake

/opt/contrib/home/compile/LIBRARIES/bin/gmake  all-am
gmake[1]: Entering directory 
`/opt/contrib/home/compile/PACKAGES/OPENSIP/RTPPROXY/rtpproxy'
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o 
main.c
main.c: In function 'init_config':
main.c:132: warning: implicit declaration of function 'err'
main.c:177: warning: implicit declaration of function 'errx'
main.c:220: warning: implicit declaration of function 'warnx'
mv -f .deps/main.Tpo .deps/main.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtp_server.o -MD -MP -MF .deps/rtp_server.Tpo -c 
-o rtp_server.o rtp_server.c
mv -f .deps/rtp_server.Tpo .deps/rtp_server.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_record.o -MD -MP -MF .deps/rtpp_record.Tpo 
-c -o rtpp_record.o rtpp_record.c
rtpp_record.c: In function 'rwrite':
rtpp_record.c:336: warning: pointer targets in assignment differ in signedness
mv -f .deps/rtpp_record.Tpo .deps/rtpp_record.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_util.o -MD -MP -MF .deps/rtpp_util.Tpo -c -o 
rtpp_util.o rtpp_util.c
mv -f .deps/rtpp_util.Tpo .deps/rtpp_util.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtp.o -MD -MP -MF .deps/rtp.Tpo -c -o rtp.o rtp.c
mv -f .deps/rtp.Tpo .deps/rtp.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtp_resizer.o -MD -MP -MF .deps/rtp_resizer.Tpo 
-c -o rtp_resizer.o rtp_resizer.c
mv -f .deps/rtp_resizer.Tpo .deps/rtp_resizer.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_session.o -MD -MP -MF .deps/rtpp_session.Tpo 
-c -o rtpp_session.o rtpp_session.c
mv -f .deps/rtpp_session.Tpo .deps/rtpp_session.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_command.o -MD -MP -MF .deps/rtpp_command.Tpo 
-c -o rtpp_command.o rtpp_command.c
mv -f .deps/rtpp_command.Tpo .deps/rtpp_command.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_log.o -MD -MP -MF .deps/rtpp_log.Tpo -c -o 
rtpp_log.o rtpp_log.c
mv -f .deps/rtpp_log.Tpo .deps/rtpp_log.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_network.o -MD -MP -MF .deps/rtpp_network.Tpo 
-c -o rtpp_network.o rtpp_network.c
rtpp_network.c: In function 'setbindhost':
rtpp_network.c:294: warning: implicit declaration of function 'warnx'
mv -f .deps/rtpp_network.Tpo .deps/rtpp_network.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_syslog_async.o -MD -MP -MF 
.deps/rtpp_syslog_async.Tpo -c -o rtpp_syslog_async.o rtpp_syslog_async.c
mv -f .deps/rtpp_syslog_async.Tpo .deps/rtpp_syslog_async.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_notify.o -MD -MP -MF .deps/rtpp_notify.Tpo 
-c -o rtpp_notify.o rtpp_notify.c
mv -f .deps/rtpp_notify.Tpo .deps/rtpp_notify.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -DHAVE_CONFIG_H -I.   
-I/opt/contrib/opensip/run/OPENSIP/libs/common/include -std=gnu99 -Wall 
-Wno-uninitialized -g -O2 -MT rtpp_command_async.o -MD -MP -MF 
.deps/rtpp_command_async.Tpo -c -o rtpp_command_async.o rtpp_command_async.c
mv -f .deps/rtpp_command_async.Tpo .deps/rtpp_command_async.Po
/opt/contrib/home/compile/GCC/gcc/bin/gcc -std=gnu99 -Wall -Wno-uninitialized 
-g -O2  -lsocket -lnsl -lxnet -lrt -lpthread -o rtpproxy main.o rtp_server.o 
rtpp_record.o rtpp_util.o rtp.o rtp_resizer.o rtpp_session.o rtpp_command.o 
rtpp_log.o rtpp_network.o rtpp_syslog_async.o rtpp_notify.o 
rtpp_command_async.o -lm -lpthread
Undefined                       first referenced
 symbol                             in file
err                                 main.o
errx                                main.o
warnx                               main.o
ld: fatal: Symbol referencing errors. No output written to rtpproxy
collect2: ld returned 1 exit status
gmake[1]: *** [rtpproxy] Error 1
gmake[1]: Leaving directory 
`/opt/contrib/home/compile/PACKAGES/OPENSIP/RTPPROXY/rtpproxy'
gmake: *** [all] Error 2
--------------------------------------------------------

Also did a lot of googling and found some recommendations but none of them 
worked.

Some other info:

GNU Make 3.82
Built for sparc-sun-solaris2.10

sparc-sun-solaris2.10-gcc (GCC) 4.3.3 (20091210) (gccfss)
Copyright (C) 2008 Free Software Foundation, Inc.

Hope someone knows the answer. 

Kind regards,
Oliver.





                                          

_______________________________________________
Users mailing list
Users@rtpproxy.org
http://lists.rtpproxy.org/mailman/listinfo/users                                
          
_______________________________________________
Users mailing list
Users@rtpproxy.org
http://lists.rtpproxy.org/mailman/listinfo/users

Reply via email to