Page 1 of 1

Cross compilation error after CVS update

Posted: Thu Sep 22, 2011 4:03 pm
by mazilo
Today, I updated to the latest using cvs up. to my local H323Plus SVN tree. When I tried to cross compile for OpenWRT, the compilation spitted out the following error messages:

Code: Select all

arm-openwrt-linux-uclibcgnueabi-g++ -I/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/include  -DPTRACING=2 -D_REENTRANT  -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/usr/include       -fexceptions -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/usr/include -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.6-linaro_uClibc-0.9.32_eabi/usr/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.6-linaro_uClibc-0.9.32_eabi/include  -Wall  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2  -fPIC -DPIC -DNDEBUG -Os  -I/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include -fno-strict-aliasing -Wno-unused-variable -Wno-deprecated-declarations -felide-constructors -Wreorder -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/usr/include -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.6-linaro_uClibc-0.9.32_eabi/usr/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.6-linaro_uClibc-0.9.32_eabi/include   -c h323.cxx -o /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/lib/obj/h323.o
In file included from /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include/h323con.h:54:0,
                 from h323.cxx:37:
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include/h235auth.h: In member function 'virtual bool H235PluginServiceDescriptor<className>::GetDeviceCapabilities(const PString&, void*) const':
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include/h235auth.h:474:58: error: 'Capabilities' is not a member of 'H235Authenticator'
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include/h235auth.h:474:91: error: expected primary-expression before ')' token
make[5]: *** [/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/lib/obj/h323.o] Error 1
make[5]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/src'
make[4]: *** [optshared] Error 2
make[4]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/src'
make[3]: *** [optshared] Error 2
make[3]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus'
make[2]: *** [/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/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
I also had to patch src/Makefile as shown below. Otherwise, gcc-4.6.x will spit out lots of warnings.

Code: Select all

--- a/src/Makefile
+++ b/src/Makefile
@@ -34,7 +34,7 @@ LIBRARY_MAKEFILE:=1
 include $(OPENH323DIR)/openh323u.mak
 
 # turn off strict-aliasing optimization, because it breaks the PDynaLink code
-STDCCFLAGS += -fno-strict-aliasing
+STDCCFLAGS += -fno-strict-aliasing -Wno-unused-variable -Wno-deprecated-declarations
 
 OH323_OBJDIR = $(OH323_LIBDIR)/$(PT_OBJBASE)
 ifdef NOTRACE

Re: Cross compilation error after CVS update

Posted: Thu Sep 22, 2011 11:13 pm
by shorne
make sure you CVS UP the entire tree (header files are in /include directory).

Also make sure you point to the correct header files (if you have multiple copies)
export OPENH323DIR= ~/XXXX

Re: Cross compilation error after CVS update

Posted: Fri Sep 23, 2011 3:31 am
by mazilo
shorne wrote:make sure you CVS UP the entire tree (header files are in /include directory).
Here is how I usually perform a CVS UP to my local H323Plus tree:
  1. Change to the root directory of H323Plus.
  2. Execute cvs up . to update to the current source
Also make sure you point to the correct header files (if you have multiple copies)
export OPENH323DIR= ~/XXXX
I only use a single OpenH323 and that is H323. So, mine will look like below. Regardless I have exported OPENH323DIR or not, the cross compilation still produces the same error messages. If I fall back to older version (before today's update), the cross compilation is OK to produce the library package.

Code: Select all

export OPENH323DIR=<H323Plus root directory>

Re: Cross compilation error after CVS update

Posted: Fri Sep 23, 2011 3:58 am
by shorne
I have just done a CVS UP and complete rebuild and everything looks fine.

Make sure you have this revision
http://h323plus.cvs.sourceforge.net/vie ... 1.7&r2=1.8

Re: Cross compilation error after CVS update

Posted: Fri Sep 23, 2011 2:51 pm
by mazilo
shorne wrote:I have just done a CVS UP and complete rebuild and everything looks fine.
I just did the above too, but the cross compilation for OpenWRT still fails with error messages as shown below:

Code: Select all

arm-openwrt-linux-uclibcgnueabi-g++ -I/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/include  -DPTRACING=2 -D_REENTRANT  -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/usr/include       -fexceptions -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/usr/include -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.6-linaro_uClibc-0.9.32_eabi/usr/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.6-linaro_uClibc-0.9.32_eabi/include  -Wall  -Wformat -Wformat-security -D_FORTIFY_SOURCE=2  -fPIC -DPIC -DNDEBUG -Os  -I/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include -fno-strict-aliasing -Wno-deprecated-declarations -Wno-unused-variable -felide-constructors -Wreorder -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/usr/include -I/opt/openwrt-svn-trunk/staging_dir/target-arm_v5te_uClibc-0.9.32_eabi/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.6-linaro_uClibc-0.9.32_eabi/usr/include -I/opt/openwrt-svn-trunk/staging_dir/toolchain-arm_v5te_gcc-4.6-linaro_uClibc-0.9.32_eabi/include   -c h323.cxx -o /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/lib/obj/h323.o
In file included from /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include/h323con.h:54:0,
                 from h323.cxx:37:
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include/h235auth.h: In member function 'virtual bool H235PluginServiceDescriptor<className>::GetDeviceCapabilities(const PString&, void*) const':
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include/h235auth.h:474:58: error: 'Capabilities' is not a member of 'H235Authenticator'
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/include/h235auth.h:474:91: error: expected primary-expression before ')' token
make[5]: *** [/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/lib/obj/h323.o] Error 1
make[5]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/src'
make[4]: *** [optshared] Error 2
make[4]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus/src'
make[3]: *** [optshared] Error 2
make[3]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus'
make[2]: *** [/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/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
However, if I explicitly added --enable-h235 switch to configure, the above error messages went away and now it is cleanly cross compiled.

Now that the problem is resolved through the --enable-h235 switch, it got me to think perhaps all those --disable-XXXXXX switches need be revised.

Re: Cross compilation error after CVS update

Posted: Fri Sep 23, 2011 5:35 pm
by willamowius
There was an #ifdef missing. I've fixed it in the CVS and now you can compile without support for H.235.6 again.

Regards,
Jan

Re: Cross compilation error after CVS update

Posted: Sat Sep 24, 2011 3:23 am
by mazilo
willamowius wrote:There was an #ifdef missing. I've fixed it in the CVS and now you can compile without support for H.235.6 again.
Thanks. It works. However, this means without --enable-h235 switch, the compilation will not include package H235 from src/h235 sub directory, right?

Re: Cross compilation error after CVS update

Posted: Sat Sep 24, 2011 4:40 am
by shorne
Thanks. It works. However, this means without --enable-h235 switch, the compilation will not include package H235 from src/h235 sub directory, right?
That is correct.

Re: Cross compilation error after CVS update

Posted: Sat Sep 24, 2011 12:11 pm
by mazilo
shorne wrote:
Thanks. It works. However, this means without --enable-h235 switch, the compilation will not include package H235 from src/h235 sub directory, right?
That is correct.
OK and thank you.

One more question. So, all those --disable-XXXXX switches really mean the XXXXX features are disabled by default and one needs to use --enable-XXXXX switch in calling configure to build the H323 library with the XXXXX feature. For instance, I need to add --enable-video switch in calling configure to build my H323 library with a support for video functions.Of course, some of the features require external libraries that need be present to compile the features.