Page 1 of 1

H3232Plus vs. PTLib SVN trunk

Posted: Thu Sep 15, 2011 2:27 pm
by mazilo
I just updated and cross compiled (for OpenWRT platform) my local PTLib SVN trunk to r26432 from Opal VoIP. Now, the cross compilation of H323Plus for OpenWRT platform is broken as shown below. I believe this has something to do with the recent update on Opal PTLib with a support for RTTI and STL features as shown in here. Any idea how to fix this issue?

Code: Select all

mipsel-openwrt-linux-uclibc-g++ -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/share/ptlib/include  -DPTRACING=2 -D_REENTRANT     -fexceptions -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/usr/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/include  -Wall  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2  -fPIC -DPIC -DNDEBUG -Os  -I/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include -fno-strict-aliasing -felide-constructors -Wreorder -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/usr/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/include   -c h323.cxx -o /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/lib/obj/h323.o
In file included from /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/codecs.h:41:0,
                 from /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/h323caps.h:44,
                 from /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/h323con.h:44,
                 from h323.cxx:37:
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/mediafmt.h: In member function 'virtual void OpalMediaOptionValue<T>::ReadFrom(std::istream&)':
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/mediafmt.h:186:40: error: no matching function for call to 'std::basic_istream<char>::setf(const iostate&, const iostate&)'
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/mediafmt.h:186:40: note: candidates are:
/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.2/../../../../mipsel-openwrt-linux-uclibc/include/c++/4.6.2/bits/ios_base.h:580:5: note: std::ios_base::fmtflags std::ios_base::setf(std::ios_base::fmtflags)
/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.2/../../../../mipsel-openwrt-linux-uclibc/include/c++/4.6.2/bits/ios_base.h:580:5: note:   candidate expects 1 argument, 2 provided
/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.2/../../../../mipsel-openwrt-linux-uclibc/include/c++/4.6.2/bits/ios_base.h:597:5: note: std::ios_base::fmtflags std::ios_base::setf(std::ios_base::fmtflags, std::ios_base::fmtflags)
/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.2/../../../../mipsel-openwrt-linux-uclibc/include/c++/4.6.2/bits/ios_base.h:597:5: note:   no known conversion for argument 1 from 'const iostate {aka const std::_Ios_Iostate}' to 'std::ios_base::fmtflags {aka std::_Ios_Fmtflags}'
h323.cxx: In member function 'virtual PBoolean H323Connection::SendFastStartAcknowledge(H225_ArrayOf_PASN_OctetString&)':
h323.cxx:2671:37: warning: 'virtual PObject* PAbstractList::RemoveAt(PINDEX)' is deprecated (declared at /opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/lists.h:233) [-Wdeprecated-declarations]
h323.cxx: In member function 'virtual PBoolean H323Connection::HandleFastStartAcknowledge(const H225_ArrayOf_PASN_OctetString&)':
h323.cxx:2782:37: warning: 'virtual PObject* PAbstractList::RemoveAt(PINDEX)' is deprecated (declared at /opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/lists.h:233) [-Wdeprecated-declarations]
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/sound.h: At global scope:
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/sound.h:745:1: warning: 'PPlugin_PSoundChannel_WAVFile_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/videoio.h:1173:1: warning: 'PPlugin_PVideoInputDevice_FakeVideo_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/videoio.h:1176:1: warning: 'PPlugin_PVideoInputDevice_Application_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/videoio.h:1180:1: warning: 'PPlugin_PVideoInputDevice_FFMPEG_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/videoio.h:1184:1: warning: 'PPlugin_PVideoInputDevice_YUVFile_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/h460/h46018_h225.h:383:1: warning: 'PPlugin_PNatMethod_H46019_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptlib/pluginmgr.h:173:1: warning: 'PFactoryLoader::PluginLoaderStartup_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptclib/url.h:485:1: warning: 'PFactoryLoader::PURL_HttpLoader_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/ptclib/url.h:488:1: warning: 'PFactoryLoader::PURL_FtpLoader_loader' defined but not used [-Wunused-variable]
make[5]: *** [/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/lib/obj/h323.o] Error 1
make[5]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src'
make[4]: *** [optshared] Error 2
make[4]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src'
make[3]: *** [optshared] Error 2
make[3]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus'
make[2]: *** [/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/.built] Error 2
make[2]: Leaving directory `/opt/OpenWRT/feeds/packages/libs/h323plus'
make[1]: *** [package/feeds/local/h323plus/compile] Error 2
make[1]: Leaving directory `/opt/openwrt-svn-trunk'
make: *** [package/h323plus/compile] Error 2

Re: H3232Plus vs. PTLib SVN trunk

Posted: Thu Sep 15, 2011 10:59 pm
by shorne
It is not adviseable to compile the H323plus CVS against the PTLIB SVN trunk because it's a constantly moving target and things do break. H323plus is designed to compile against any PTLIB version so it's probably advisable to use the last stable PTLIB release.

The above error was caused by the removal of the __USE_STL__ directive from PTLIB. H323Plus CVS has been patched and should now compile.

Re: H3232Plus vs. PTLib SVN trunk

Posted: Fri Sep 16, 2011 2:53 am
by mazilo
Thank you for your quick response to patch the codes. However, it looks like the cross compilation is still broken on the same place as shown below.

Code: Select all

mipsel-openwrt-linux-uclibc-g++ -I/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include  -DPTRACING=2 -D_REENTRANT  -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include       -fexceptions -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/usr/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/include  -Wall  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2  -fPIC -DPIC -DNDEBUG -Os  -I/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include -fno-strict-aliasing -felide-constructors -Wreorder -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/usr/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/include   -c h323.cxx -o /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/lib/obj/h323.o
In file included from /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/codecs.h:349:0,
                 from /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/h323caps.h:316,
                 from /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/h323con.h:44,
                 from h323.cxx:37:
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/mediafmt.h: In member function 'virtual void OpalMediaOptionValue<T>::ReadFrom(std::istream&)':
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/mediafmt.h:316:40: error: no matching function for call to 'std::basic_istream<char>::setf(const iostate&, const iostate&)'
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/mediafmt.h:316:40: note: candidates are:
/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.2/../../../../mipsel-openwrt-linux-uclibc/include/c++/4.6.2/bits/ios_base.h:580:5: note: std::ios_base::fmtflags std::ios_base::setf(std::ios_base::fmtflags)
/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.2/../../../../mipsel-openwrt-linux-uclibc/include/c++/4.6.2/bits/ios_base.h:580:5: note:   candidate expects 1 argument, 2 provided
/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.2/../../../../mipsel-openwrt-linux-uclibc/include/c++/4.6.2/bits/ios_base.h:597:5: note: std::ios_base::fmtflags std::ios_base::setf(std::ios_base::fmtflags, std::ios_base::fmtflags)
/opt/openwrt-svn-trunk/staging_dir/toolchain-mipsel_gcc-4.6-linaro_uClibc-0.9.32/lib/gcc/mipsel-openwrt-linux-uclibc/4.6.2/../../../../mipsel-openwrt-linux-uclibc/include/c++/4.6.2/bits/ios_base.h:597:5: note:   no known conversion for argument 1 from 'const iostate {aka const std::_Ios_Iostate}' to 'std::ios_base::fmtflags {aka std::_Ios_Fmtflags}'
h323.cxx: In member function 'virtual PBoolean H323Connection::SendFastStartAcknowledge(H225_ArrayOf_PASN_OctetString&)':
h323.cxx:2670:37: warning: 'virtual PObject* PAbstractList::RemoveAt(PINDEX)' is deprecated (declared at /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/lists.h:233) [-Wdeprecated-declarations]
h323.cxx: In member function 'virtual PBoolean H323Connection::HandleFastStartAcknowledge(const H225_ArrayOf_PASN_OctetString&)':
h323.cxx:2781:37: warning: 'virtual PObject* PAbstractList::RemoveAt(PINDEX)' is deprecated (declared at /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/lists.h:233) [-Wdeprecated-declarations]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/sound.h: At global scope:
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/sound.h:745:1: warning: 'PPlugin_PSoundChannel_WAVFile_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/videoio.h:1173:1: warning: 'PPlugin_PVideoInputDevice_FakeVideo_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/videoio.h:1176:1: warning: 'PPlugin_PVideoInputDevice_Application_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/videoio.h:1180:1: warning: 'PPlugin_PVideoInputDevice_FFMPEG_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/videoio.h:1184:1: warning: 'PPlugin_PVideoInputDevice_YUVFile_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/include/h460/h46018_h225.h:361:1: warning: 'PPlugin_PNatMethod_H46019_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/pluginmgr.h:173:1: warning: 'PFactoryLoader::PluginLoaderStartup_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptclib/url.h:485:1: warning: 'PFactoryLoader::PURL_HttpLoader_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptclib/url.h:488:1: warning: 'PFactoryLoader::PURL_FtpLoader_loader' defined but not used [-Wunused-variable]
make[5]: *** [/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/lib/obj/h323.o] Error 1
make[5]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src'
make[4]: *** [optshared] Error 2
make[4]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src'
make[3]: *** [optshared] Error 2
make[3]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus'
make[2]: *** [/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/.built] Error 2
make[2]: Leaving directory `/opt/OpenWRT/feeds/packages/libs/h323plus'
make[1]: *** [package/feeds/local/h323plus/compile] Error 2
make[1]: Leaving directory `/opt/openwrt-svn-trunk'
make: *** [package/h323plus/compile] Error 2
It looks like the added inline function to the include/mediafmt.h file (as shown below) did not fix the error shown above.

Code: Select all

#ifndef __USE_STL__
__inline istream & operator>>(istream & strm, bool& b)
{
   int i;strm >> i;b = i; return strm;
}
#endif

Re: H3232Plus vs. PTLib SVN trunk

Posted: Fri Sep 16, 2011 6:26 am
by shorne
Looking at the error and line number it looks like you have not done a CVS UP. The line number of mediafmt.h is consistent with the v1.23 release and not the current CVS.

Re: H3232Plus vs. PTLib SVN trunk

Posted: Fri Sep 16, 2011 12:40 pm
by mazilo
OK. I deleted the local h323plus tarball file and did a compilation from scratch again. This time, the cross compilation process will automatically checkout a fresh copy of h323 source from CVS trunk based on instructions seen in here and saves them as a tarball file. Now, the cross compilation ended sans any problem and produced both the static/shared H323 libraries.

BTW, if you don't mind I ask this stupid question. Just for future update, how do I manually update my local H323Plus source? IIRC, last time when I did a cvs up . (while inside the h323plus root directory), apparently the process didn't seem to retrieve/update with the new include/mediafmt.h and src/mediafmt.cxx files.

Thank you for all your help.

Re: H3232Plus vs. PTLib SVN trunk

Posted: Fri Sep 16, 2011 3:49 pm
by shorne
checking out using the sourceforge CVS anonymous instructions and doing a cvs up command should work fine. It does for me. Quick test is to check out and delete a file and see if the cvs up redownloads the file.

Re: H3232Plus vs. PTLib SVN trunk

Posted: Fri Sep 16, 2011 8:12 pm
by mazilo
shorne wrote:Quick test is to check out and delete a file and see if the cvs up redownloads the file.
Thank you and that trick works!