I'm trying to install ptlib on my Ubuntu. My Ubuntu version:
me@me-MS-7693:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
The installed compilers:
me@me-MS-7693:~$ dpkg --list | grep compiler
ii g++ 4:5.3.1-1ubuntu1 amd64 GNU C++ compiler
ii g++-5 5.4.0-6ubuntu1~16.04.2 amd64 GNU C++ compiler
ii gcc 4:5.3.1-1ubuntu1 amd64 GNU C compiler
ii gcc-5 5.4.0-6ubuntu1~16.04.2 amd64 GNU C compiler
ii hardening-includes 2.7ubuntu2 all Makefile for enabling compiler flags for security hardening
ii libllvm3.8:amd64 1:3.8-2ubuntu4 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm3.8:i386 1:3.8-2ubuntu4 i386 Modular compiler and toolchain technologies, runtime library
ii libxkbcommon0:amd64 0.5.0-1ubuntu2 amd64 library interface to the XKB compiler - shared library
Well, the problem is that I always receive a bunch of errors, as below:
./configure
me@me-MS-7693:~/Downloads/SetupFiles/ptlib-2.10.11$ ./configure
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gcc... 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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: PTLib version is 2.10.11
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for swab... yes
configure: OSTYPE set to linux
configure: OSRELEASE set to "4.4.0-34-generic"
configure: MACHTYPE set to x86_64
configure: gcc version is 5.4.0
checking checking if pragma implementation should be used... no
checking checking if precompiled headers available... no
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /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 whether byte ordering is bigendian... no
configure: Default extension for C++ files is cpp
checking if compiler accepts -felide-constructors... yes
checking if linker accepts -Wreorder... yes
checking if debug build accepts -g3 -ggdb -O0... yes
checking if compiler uses RTTI by default... yes
checking size of int... 4
checking for long double with more range or precision than double... yes
checking for flex... /usr/bin/flex
checking for ar... ar
checking for bison... /usr/bin/bison
checking if readdir_r has 2 parms... no
checking if readdir_r has 3 parms... yes
configure: PTRACE and all trace logging included
configure: Using ANSI C++ bool for PBoolean: (PFalse=false PTrue=true)
checking for recvmsg... yes
checking for IPV6_ADD_MEMBERSHIP... yes
checking for NetLink support... yes
checking if using STL streams... yes
checking if atomic integer available... yes
checking if __exchange_and_add is in __gnu_cxx namespace... yes
checking if Unix semaphores are available... yes
checking for pthread_create in -lpthread... yes
checking for clock_gettime in -lrt... yes
checking if pthread_mutex_timedlock is available... yes
checking for sem_timedwait in -lpthread... yes
checking if sem_timedwait is compilable... yes
checking if recursive mutexes are available... PTHREAD_MUTEX_RECURSIVE_NP
checking if setpgrp takes no parameters... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking for regcomp... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking if dlopen is available... yes
checking for dlopen in -ldl... yes
checking enable plugin support... yes
checking where plugins are being installed... /usr/local/lib/ptlib-2.10.11
checking enable samples build... no
checking how to run the C preprocessor... gcc -E
checking for res_ninit... no
checking for res_ninit in -lresolv... yes
checking for sasl_version in -lsasl2... yes
checking for sasl_client_out in -lsasl... no
checking if <sasl.h> works... no
checking if <sasl/sasl.h> works... yes
configure: SUN mlib disabled
checking ldap.h usability... yes
checking ldap.h presence... yes
checking for ldap.h... yes
checking for ldap_open in -lldap... yes
checking for OPENSSL... yes
checking openssl/aes.h usability... yes
checking openssl/aes.h presence... yes
checking for openssl/aes.h... yes
checking for const arg to d2i_AutoPrivateKey... yes
checking for d2i_DHparams_bio variants... new
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for XML_ParserCreate in -lexpat... yes
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
configure: IPV6 disabled
checking for inet_ntop... yes
checking enable config file support... yes
checking enable URL support... yes
checking enable HTTP support... yes
checking enable HTTP forms support... yes
checking enable HTTP server support... yes
checking enable Jabber support... yes
checking enable VXML support... yes
checking enable XMLRPC support... yes
checking enable SOAP support... yes
checking enable Text-To-Speech server support... yes
checking enable ASN decoding/encoding support... yes
checking enable STUN support... yes
checking enable pipechannel support... yes
checking enable DTMF protocol support... yes
checking enable SOCKS protocol support... yes
checking enable FTP protocol support... yes
checking enable SNMP protocol support... yes
checking enable TELNET protocol support... yes
checking enable remote connection support... yes
checking enable serial port support... yes
checking enable POP3/SMTP support... yes
checking enable audio support... yes
checking enable WAVFILE support... yes
checking enable QOS support... yes
checking enable video device support... yes
checking enable video file support... yes
checking enable FFMpeg video file support... yes
checking enable application sharing support... no
checking enable shared memory video devices... yes
checking for SDL... yes
checking enable video for windows capture... no
checking sql.h usability... yes
checking sql.h presence... yes
checking for sql.h... yes
checking for SQLAllocStmt in -lodbc... yes
configure: ODBC support enabled
checking enable C++ exceptions... no
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating make/ptbuildopts.mak
config.status: creating make/ptlib-config
config.status: creating Makefile
config.status: creating ptlib_cfg.dxy
config.status: creating ptlib.pc
config.status: creating include/ptbuildopts.h
config.status: include/ptbuildopts.h is unchanged
=== configuring in plugins (/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11/plugins)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=.
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /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 alsa/asoundlib.h usability... yes
checking alsa/asoundlib.h presence... yes
checking for alsa/asoundlib.h... yes
checking for ALSA sound support... yes
checking pulse/simple.h usability... yes
checking pulse/simple.h presence... yes
checking for pulse/simple.h... yes
checking for Pulse sound support... yes
checking for linux/videodev2.h... yes
checking for V4L2 video support... yes
checking libv4l2.h usability... no
checking libv4l2.h presence... no
checking for libv4l2.h... no
checking for libv4l2 support... no
checking machine/ioctl_meteor.h usability... no
checking machine/ioctl_meteor.h presence... no
checking for machine/ioctl_meteor.h... no
checking i386/ioctl_meteor.h usability... no
checking i386/ioctl_meteor.h presence... no
checking for i386/ioctl_meteor.h... no
checking dev/ic/bt8xx.h usability... no
checking dev/ic/bt8xx.h presence... no
checking for dev/ic/bt8xx.h... no
checking for BSD video support... no
checking libdc1394/dc1394_control.h usability... no
checking libdc1394/dc1394_control.h presence... no
checking for libdc1394/dc1394_control.h... no
checking libraw1394/raw1394.h usability... no
checking libraw1394/raw1394.h presence... no
checking for libraw1394/raw1394.h... no
checking for IEEE1394/DC video support... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating vidinput_v4l2/Makefile
config.status: creating vidinput_dc/Makefile
make
me@me-MS-7693:~/Downloads/SetupFiles/ptlib-2.10.11$ make
make DEBUG= P_SHAREDLIB=1 default_target
make[1]: Entering directory '/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11'
make[1]: Leaving directory '/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11'
make[1]: Entering directory '/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11/src'
make DEBUG= P_SHAREDLIB=1 default_target
make[2]: Entering directory '/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11/src'
[CC] ptlib/common/getdate.tab.c
ptlib/common/getdate.y:112:18: error: conflicting types for ‘PTime_yyparse’
#define yyparse PTime_yyparse
^
ptlib/common/getdate.tab.c:273:5: note: in expansion of macro ‘yyparse’
int yyparse (void);
^
ptlib/common/getdate.y:112:18: note: previous declaration of ‘PTime_yyparse’ was here
#define yyparse PTime_yyparse
^
ptlib/common/getdate.y:120:12: note: in expansion of macro ‘yyparse’
static int yyparse(void *);
^
ptlib/common/getdate.y: In function ‘PTime_yyparse’:
ptlib/common/getdate.y:105:38: error: ‘parseParam’ undeclared (first use in this function)
#define VARIABLE ((struct Variables*)parseParam)
^
ptlib/common/getdate.y:158:6: note: in expansion of macro ‘VARIABLE’
VARIABLE->yyHaveTime++;
^
ptlib/common/getdate.y:105:38: note: each undeclared identifier is reported only once for each function it appears in
#define VARIABLE ((struct Variables*)parseParam)
^
ptlib/common/getdate.y:158:6: note: in expansion of macro ‘VARIABLE’
VARIABLE->yyHaveTime++;
^
ptlib/common/getdate.y: In function ‘PTimeParse’:
ptlib/common/getdate.y:112:18: error: too many arguments to function ‘PTime_yyparse’
#define yyparse PTime_yyparse
^
ptlib/common/getdate.y:981:5: note: in expansion of macro ‘yyparse’
yyparse(&var);
^
ptlib/common/getdate.y:112:18: note: declared here
#define yyparse PTime_yyparse
^
ptlib/common/getdate.tab.c:1161:1: note: in expansion of macro ‘yyparse’
yyparse (void)
^
Makefile:463: recipe for target '/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11/lib_linux_x86_64/obj/getdate.tab.o' failed
make[2]: *** [/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11/lib_linux_x86_64/obj/getdate.tab.o] Error 1
make[2]: Leaving directory '/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11/src'
../make/common.mak:292: recipe for target 'optshared' failed
make[1]: *** [optshared] Error 2
make[1]: Leaving directory '/home/ghasemi/Downloads/SetupFiles/ptlib-2.10.11/src'
Makefile:91: recipe for target 'optshared' failed
make: *** [optshared] Error 2
What's wrong? What shall I do? I need this package installed for the openh323
installation!
Download and apply patch and restart the compilation - it should help with "yyparse" errors.
http://www.linuxfromscratch.org/blfs/view/8.0/general/ptlib.html
Required patch: http://www.linuxfromscratch.org/patches/blfs/8.0/ptlib-2.10.11-bison_fixes-2.patch