error: cannot convert 'const EVP_MD* {aka const env_md_st*}'

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

error: cannot convert 'const EVP_MD* {aka const env_md_st*}'

Post by mazilo »

Today, after updated to the latest H323Plus from the CVS trunk, I encountered error messages as shown below when cross compiled for ARM platform.

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_cvs/include -fno-strict-aliasing -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 /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx -o /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/lib/obj/h235con.o
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx: In function 'void tls1_P_hash(const EVP_MD*, const unsigned char*, int, unsigned char*, int, unsigned char*, int)':
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx:66:12: warning: variable 'n' set but not used [-Wunused-but-set-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx: In function 'int tls_change_cipher_state(SSL*, int)':
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx:166:16: error: cannot convert 'const EVP_MD* {aka const env_md_st*}' to 'EVP_MD_CTX* {aka env_md_ctx_st*}' in assignment
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx:200:17: error: cannot convert 'const EVP_MD* {aka const env_md_st*}' to 'EVP_MD_CTX* {aka env_md_ctx_st*}' in assignment
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx:138:29: warning: unused variable 'empty' [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx: In member function 'unsigned char* H235Session::RawWrite(unsigned char*, int&)':
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx:656:42: error: cannot convert 'EVP_MD_CTX* {aka env_md_ctx_st*}' to 'const EVP_MD* {aka const env_md_st*}' for argument '1' to 'int EVP_MD_size(const EVP_MD*)'
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/include/ptlib/sound.h: At global scope:
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/include/ptlib/sound.h:761:1: warning: 'PPlugin_PSoundChannel_WAVFile_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/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-arm_v5te_uClibc-0.9.32_eabi/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-arm_v5te_uClibc-0.9.32_eabi/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-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/include/h235auth.h:457:1: warning: 'PPlugin_H235Authenticator_Std1_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/include/h235/h2356.h:131:1: warning: 'PPlugin_H235Authenticator_Std6_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/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-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/lib/obj/h235con.o] Error 1
make[5]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/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_cvs/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_cvs'
make[2]: *** [/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/.built] Error 2
make[2]: Leaving directory `/opt/OpenWRT/feeds/packages/libs/h323plus_cvs'
make[1]: *** [package/feeds/local/h323plus_cvs/compile] Error 2
make[1]: Leaving directory `/opt/openwrt-svn-trunk'
make: *** [package/h323plus_cvs/compile] Error 2

User avatar
willamowius
Posts: 42
Joined: Tue Sep 01, 2009 7:25 am
Contact:

Re: error: cannot convert 'const EVP_MD* {aka const env_md_s

Post by willamowius »

I had the same problem with Simon's latest H.235 code on Linux. I've checked in a compile fix. Please update and let us know how it works for you.
Jan Willamowius
Founder of the GNU Gatekeeper Project
https://www.gnugk.org
https://www.willamowius.com (H.323 support)

shorne
Posts: 45
Joined: Thu Aug 27, 2009 4:17 am

Re: error: cannot convert 'const EVP_MD* {aka const env_md_s

Post by shorne »

The error was due to a change in the SSL_st struct between OpenSSL 0.9.x and 1.x. I have checked in compiler directives to check OpenSSL versions.

mazilo
Posts: 45
Joined: Thu Sep 15, 2011 2:12 pm

Re: error: cannot convert 'const EVP_MD* {aka const env_md_s

Post by mazilo »

shorne wrote:The error was due to a change in the SSL_st struct between OpenSSL 0.9.x and 1.x. I have checked in compiler directives to check OpenSSL versions.
Thanks. Yes, my build is against openssl-1.0.0g library. Anyway, I just updated to include your latest changes and the cross compilation still gives (I believe the same) 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_cvs/include -fno-strict-aliasing -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 /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx -o /opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/lib/obj/h235con.o
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx: In function 'void tls1_P_hash(const EVP_MD*, const unsigned char*, int, unsigned char*, int, unsigned char*, int)':
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx:67:15: warning: variable 'n' set but not used [-Wunused-but-set-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx: In function 'int tls_change_cipher_state(SSL*, int)':
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx:159:18: error: cannot convert 'const EVP_MD* {aka const env_md_st*}' to 'EVP_MD_CTX* {aka env_md_ctx_st*}' in assignment
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/src/h235/h235con.cxx:228:20: error: cannot convert 'EVP_MD_CTX* {aka env_md_ctx_st*}' to 'const EVP_MD* {aka const env_md_st*}' for argument '1' to 'int EVP_MD_size(const EVP_MD*)'
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/include/ptlib/sound.h: At global scope:
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/ptlib2_svn/include/ptlib/sound.h:761:1: warning: 'PPlugin_PSoundChannel_WAVFile_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/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-arm_v5te_uClibc-0.9.32_eabi/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-arm_v5te_uClibc-0.9.32_eabi/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-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/include/h235auth.h:457:1: warning: 'PPlugin_H235Authenticator_Std1_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/include/h235/h2356.h:131:1: warning: 'PPlugin_H235Authenticator_Std6_loader' defined but not used [-Wunused-variable]
/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/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-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/lib/obj/h235con.o] Error 1
make[5]: Leaving directory `/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/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_cvs/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_cvs'
make[2]: *** [/opt/openwrt-svn-trunk/build_dir/target-arm_v5te_uClibc-0.9.32_eabi/h323plus_cvs/.built] Error 2
make[2]: Leaving directory `/opt/OpenWRT/feeds/packages/libs/h323plus_cvs'
make[1]: *** [package/feeds/local/h323plus_cvs/compile] Error 2
make[1]: Leaving directory `/opt/openwrt-svn-trunk'
make: *** [package/h323plus_cvs/compile] Error 2

mazilo
Posts: 45
Joined: Thu Sep 15, 2011 2:12 pm

Re: error: cannot convert 'const EVP_MD* {aka const env_md_s

Post by mazilo »

I just di another update and now the cross compilation for ARM platform is OK. Thank you,

Post Reply