如何在Ubuntu 18上构建libOpal

时间:2018-12-18 07:35:13

标签: opalvoip

甚至Ubuntu 18.04也仅提供3.10.10版本。真是可惜! 因此,我尝试从源代码构建libPt 2.16.2和libOpal 3.16.2。 libPt没问题,但libOpal构建失败。 为此,我阅读了此页面,该页面以3.4.2版作为参考! 也许是我收到以下错误的原因:

[CXX] src/codec/opalwavfile.cxx
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx: In instantiation of ‘static void PWAVFilePluginFactory<Factory, Instance>::Register(const typename Factory::Key_T&, const PWAVFilePluginValidFormat&) [with Factory = PFactory<PWAVFileFormat, unsigned int>; Instance = PWAVFileFormatPlugin; typename Factory::Key_T = unsigned int]’:
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:428:81:   required from here
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:413:29: error: no matching function for call to ‘PFactory<PWAVFileFormat, unsigned int>::Register(const Key_T&, PWAVFilePluginFactory<PFactory<PWAVFileFormat, unsigned int>, PWAVFileFormatPlugin>*&, bool)’
In file included from /usr/local/include/ptclib/pwavfile.h:46:0,
                 from /home/alainb/opal-3.16.2/include/codec/opalwavfile.h:40,
                 from /home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:35:
/usr/local/include/ptlib/pfactory.h:387:5: note: candidate: static bool PFactory<AbstractClass, KeyType>::Register(const Key_T&, PFactory<AbstractClass, KeyType>::WorkerBase_T*) [with AbstractClass = PWAVFileFormat; KeyType = unsigned int; PFactory<AbstractClass, KeyType>::Key_T = unsigned int; PFactory<AbstractClass, KeyType>::WorkerBase_T = PFactoryTemplate<PWAVFileFormat, const unsigned int&, unsigned int>::WorkerBase]
/usr/local/include/ptlib/pfactory.h:387:5: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/ptlib/pfactory.h:387:5: note: candidate: static bool PFactory<AbstractClass, KeyType>::Register(const Key_T&, PFactory<AbstractClass, KeyType>::Abstract_T*, bool) [with AbstractClass = PWAVFileFormat; KeyType = unsigned int; PFactory<AbstractClass, KeyType>::Key_T = unsigned int; PFactory<AbstractClass, KeyType>::Abstract_T = PWAVFileFormat]
/usr/local/include/ptlib/pfactory.h:387:5: note:   no known conversion for argument 2 from ‘PWAVFilePluginFactory<PFactory<PWAVFileFormat, unsigned int>, PWAVFileFormatPlugin>*’ to ‘PFactory<PWAVFileFormat, unsigned int>::Abstract_T* {aka PWAVFileFormat*}’
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx: In instantiation of ‘static void PWAVFilePluginFactory<Factory, Instance>::Register(const typename Factory::Key_T&, const PWAVFilePluginValidFormat&) [with Factory = PFactory<PWAVFileFormat, PCaselessString>; Instance = PWAVFileFormatPlugin; typename Factory::Key_T = PCaselessString]’:
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:429:85:   required from here
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:413:29: error: no matching function for call to ‘PFactory<PWAVFileFormat, PCaselessString>::Register(const Key_T&, PWAVFilePluginFactory<PFactory<PWAVFileFormat, PCaselessString>, PWAVFileFormatPlugin>*&, bool)’
In file included from /usr/local/include/ptclib/pwavfile.h:46:0,
                 from /home/alainb/opal-3.16.2/include/codec/opalwavfile.h:40,
                 from /home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:35:
/usr/local/include/ptlib/pfactory.h:387:5: note: candidate: static bool PFactory<AbstractClass, KeyType>::Register(const Key_T&, PFactory<AbstractClass, KeyType>::WorkerBase_T*) [with AbstractClass = PWAVFileFormat; KeyType = PCaselessString; PFactory<AbstractClass, KeyType>::Key_T = PCaselessString; PFactory<AbstractClass, KeyType>::WorkerBase_T = PFactoryTemplate<PWAVFileFormat, const PCaselessString&, PCaselessString>::WorkerBase]
/usr/local/include/ptlib/pfactory.h:387:5: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/ptlib/pfactory.h:387:5: note: candidate: static bool PFactory<AbstractClass, KeyType>::Register(const Key_T&, PFactory<AbstractClass, KeyType>::Abstract_T*, bool) [with AbstractClass = PWAVFileFormat; KeyType = PCaselessString; PFactory<AbstractClass, KeyType>::Key_T = PCaselessString; PFactory<AbstractClass, KeyType>::Abstract_T = PWAVFileFormat]
/usr/local/include/ptlib/pfactory.h:387:5: note:   no known conversion for argument 2 from ‘PWAVFilePluginFactory<PFactory<PWAVFileFormat, PCaselessString>, PWAVFileFormatPlugin>*’ to ‘PFactory<PWAVFileFormat, PCaselessString>::Abstract_T* {aka PWAVFileFormat*}’
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx: In instantiation of ‘static void PWAVFilePluginFactory<Factory, Instance>::Register(const typename Factory::Key_T&, const PWAVFilePluginValidFormat&) [with Factory = PFactory<PWAVFileConverter, unsigned int>; Instance = PWAVFileConverterPlugin; typename Factory::Key_T = unsigned int]’:
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:432:81:   required from here
/home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:413:29: error: no matching function for call to ‘PFactory<PWAVFileConverter, unsigned int>::Register(const Key_T&, PWAVFilePluginFactory<PFactory<PWAVFileConverter, unsigned int>, PWAVFileConverterPlugin>*&, bool)’
In file included from /usr/local/include/ptclib/pwavfile.h:46:0,
                 from /home/alainb/opal-3.16.2/include/codec/opalwavfile.h:40,
                 from /home/alainb/opal-3.16.2/src/codec/opalwavfile.cxx:35:
/usr/local/include/ptlib/pfactory.h:387:5: note: candidate: static bool PFactory<AbstractClass, KeyType>::Register(const Key_T&, PFactory<AbstractClass, KeyType>::WorkerBase_T*) [with AbstractClass = PWAVFileConverter; KeyType = unsigned int; PFactory<AbstractClass, KeyType>::Key_T = unsigned int; PFactory<AbstractClass, KeyType>::WorkerBase_T = PFactoryTemplate<PWAVFileConverter, const unsigned int&, unsigned int>::WorkerBase]
/usr/local/include/ptlib/pfactory.h:387:5: note:   candidate expects 2 arguments, 3 provided
/usr/local/include/ptlib/pfactory.h:387:5: note: candidate: static bool PFactory<AbstractClass, KeyType>::Register(const Key_T&, PFactory<AbstractClass, KeyType>::Abstract_T*, bool) [with AbstractClass = PWAVFileConverter; KeyType = unsigned int; PFactory<AbstractClass, KeyType>::Key_T = unsigned int; PFactory<AbstractClass, KeyType>::Abstract_T = PWAVFileConverter]
/usr/local/include/ptlib/pfactory.h:387:5: note:   no known conversion for argument 2 from ‘PWAVFilePluginFactory<PFactory<PWAVFileConverter, unsigned int>, PWAVFileConverterPlugin>*’ to ‘PFactory<PWAVFileConverter, unsigned int>::Abstract_T* {aka PWAVFileConverter*}’
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’
cc1plus: warning: unrecognized command line option ‘-Wno-unused-private-field’
/usr/local/share/ptlib/make/post.mak:138: recipe for target '/home/alainb/opal-3.16.2/lib_linux_x86_64/obj/opalwavfile.o' failed
make[2]: *** [/home/alainb/opal-3.16.2/lib_linux_x86_64/obj/opalwavfile.o] Error 1
/usr/local/share/ptlib/make/post.mak:115: recipe for target 'optshared' failed
make[1]: *** [optshared] Error 2
make[1] : on quitte le répertoire « /home/alainb/opal-3.16.2 »
/usr/local/share/ptlib/make/autoconf.mak:171: recipe for target 'build_top_level' failed
make: *** [build_top_level] Error 2

0 个答案:

没有答案