Error in cross compiling h235auth.cxx

Discussion related to implementation and use of the H.323 Plus H.323 stack at https://www.h323plus.org.
Post Reply
mazilo
Posts: 45
Joined: Thu Sep 15, 2011 2:12 pm

Error in cross compiling h235auth.cxx

Post by mazilo »

I just did a cvs up . today. When I tried to cross compile h323plus, it spitted out the following error messages ('H2351_Authenticator' was not declared in this scope) on h325auth.cxx file:

Code: Select all

=================== Plugin configuration ======================
 prefix                           : /usr
 exec_prefix                      : /usr
 libdir                           : ${exec_prefix}/lib
 Audio Codec plugin install dir   : ${libdir}/opal-1.23.1/codecs/audio
 Video Codec plugin install prefix: ${libdir}/opal-1.23.1/codecs/video
 LID plugin install prefix        : ${libdir}/opal-1.23.1/lid
 FAX plugin install prefix        : ${libdir}/opal-1.23.1/fax

                              GSM :  yes (internal)
                          gsm-amr :  yes
                             iLBC :  yes (internal)
                            Speex :  yes (internal, version 1.1.11.1)
                            LPC10 :  yes
                            G.726 :  yes
                        IMA_ADPCM :  yes
                              SBC :  no

                           H.261  :  yes
                           H.263  :  no (ffmpeg version)
                     H.263/H.263+ :  no
                           H.264  :  no
                          THEORA  :  no
                    MPEG4 Part 2  :  no
                            CELT  :  no

                     SpanDSP FAX  :  no

                            CAPI  :  no
           Quicknet xJACK support :  yes
         Voicetronics VPB support :  yes

                         OS Type  :  linux-gnu
                    Machine Type  :  mipsel

 If all settings are OK, type make and make install 
========================================================
configure: WARNING: unrecognized options: --disable-nls, --disable-ipv6, --enable-capi, --enable-celt, --enable-default-to-full-capabilties, --enable-h264, --enable-ixj, --enable-libavcodec, --enable-libavcodec-stackalign-hack, --enable-localgsm, --enable-localilbc, --enable-localspeex, --enable-sbc, --enable-spandsp, --enable-theora, --enable-vpb, --enable-x264, --enable-x264-link-static
touch /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/.configured_
make -j1 -C /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus DESTDIR="/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/ipkg-install" optshared
make[3]: Entering directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus'
make DEBUG= P_SHAREDLIB=1 default_target
make[4]: Entering directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus'
make[4]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus'
make -C src optshared
make[4]: Entering directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src'
make DEBUG= P_SHAREDLIB=1 default_target
make[5]: Entering directory `/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src'
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     -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 h235auth.cxx -o /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/lib/obj/h235auth.o
h235auth.cxx:1084:44: error: 'H2351_Authenticator' was not declared in this scope
h235auth.cxx:1084:63: error: template argument 1 is invalid
h235auth.cxx:1084:91: error: invalid type in declaration before '(' token
h235auth.cxx:1084:113: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
/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:1176: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:1179: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:1183: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:1187:1: warning: 'PPlugin_PVideoInputDevice_YUVFile_loader' defined but not used [-Wunused-variable]
h235auth.cxx:1084:65: warning: 'factoryH2351_Authenticator' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptlib/pluginmgr.h:175:1: warning: 'PFactoryLoader::PluginLoaderStartup_loader' defined but not used [-Wunused-variable]
make[5]: *** [/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/lib/obj/h235auth.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
shorne
Posts: 45
Joined: Thu Aug 27, 2009 4:17 am

Re: Error in cross compiling h235auth.cxx

Post by shorne »

You are compiling without OpenSSL?
A fix has been checked into the CVS.
mazilo
Posts: 45
Joined: Thu Sep 15, 2011 2:12 pm

Re: Error in cross compiling h235auth.cxx

Post by mazilo »

shorne wrote:You are compiling without OpenSSL?
I have openssl library installed for cross compiling h323plus.
A fix has been checked into the CVS.
Just did an update and now cross compilation of h235auth.cxx is OK.

Now, the cross compilation breaks on h323plus/src/h460/h46018_h225.cxx file 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     -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 /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src/h460/h46018_h225.cxx -o /opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/lib/obj/h46018_h225.o
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src/h460/h46018_h225.cxx: In member function 'PBoolean H46019UDPSocket::WriteSocket(const void*, PINDEX, const PIPSocket::Address&, WORD)':
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src/h460/h46018_h225.cxx:1246:13: error: 'm_remAddr' was not declared in this scope
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/src/h460/h46018_h225.cxx:1248:14: error: 'm_remPort' was not declared in this scope
/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:1176: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:1179: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:1183: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:1187: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:415: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:175: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]
/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/ptlib2_svn/include/ptclib/pnat.h:627:1: warning: 'PFactoryLoader::PSTUNClient_loader' defined but not used [-Wunused-variable]
make[5]: *** [/opt/openwrt-svn-trunk/build_dir/target-mipsel_uClibc-0.9.32/h323plus/lib/obj/h46018_h225.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
shorne
Posts: 45
Joined: Thu Aug 27, 2009 4:17 am

Re: Error in cross compiling h235auth.cxx

Post by shorne »

For some reason OpenSSL is not being detected.
Patch applied.
mazilo
Posts: 45
Joined: Thu Sep 15, 2011 2:12 pm

Re: Error in cross compiling h235auth.cxx

Post by mazilo »

shorne wrote:For some reason OpenSSL is not being detected.
This also puzzles me. As you can see, the h235auth.cxx file has #include <openssl/sha.h> and my cross compilation environment has /opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include/openssl/sha.h file. The cross compilation process does include -I/opt/openwrt-svn-trunk/staging_dir/target-mipsel_uClibc-0.9.32/usr/include when cross compiling the h235auth.cxx file (as shown in my original post). If what you said is true that the cross compilation process could not detect OpenSSL, then the cross compiled library isn't built with SSL stack. Is there a way to check this?
Patch applied.
Yes and now h323plus cross compiles OK. Thank you.
shorne
Posts: 45
Joined: Thu Aug 27, 2009 4:17 am

Re: Error in cross compiling h235auth.cxx

Post by shorne »

To detect whether OpenSSL is detected check the output for configure on ptlib. It should say OpenSSL enabled or disabled.
mazilo
Posts: 45
Joined: Thu Sep 15, 2011 2:12 pm

Re: Error in cross compiling h235auth.cxx

Post by mazilo »

shorne wrote:To detect whether OpenSSL is detected check the output for configure on ptlib. It should say OpenSSL enabled or disabled.
Did you mean as shown below?
OpenH323 version is 1.23.1
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 /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/version.h usability... yes
checking /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/version.h presence... yes
checking for /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/version.h... yes
PTLib prefix set to.... /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn
checking Checking PTLib version 2.11.0... ok
configure: Enabling T.38
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating openh323u.mak
config.status: creating Makefile
config.status: creating include/openh323buildopts.h
Post Reply