Getting errors when building the FEZ Hydra PK

Hi all,

I am using VS 2013 with GCC yagarto 4.7.2 toolchain.
The fez-hydra pk is on the git, apparently the entire pk is there not just the diff.

I could build the top level build.dirproj successfully.
But building the Solutions\FEZ_Hydra\TinyCLR.proj gave me the following errors (around the open ssl stuff).

If anyone has built the recent hydra pk successfully, please let me know.
Thanks

The build error follows:

OpenSSL_PKCS11_signature.cpp:(.text._ZN24PKCS11_Signature_OpenSSL11VerifyFinalEP25_Cryptoki_Session_ContextPhm+0x5c): undefined reference to EVP_VerifyFinal' C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\lib\tmp_tinyclr.lib(OpenSSL_PKCS11_Token.obj): In functionPKCS11_Token_OpenSSL::Initialize()’:
OpenSSL_PKCS11_Token.cpp:(.text._ZN20PKCS11_Token_OpenSSL10InitializeEv+0x14): undefined reference to OPENSSL_add_all_algorithms_noconf' C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\lib\tmp_tinyclr.lib(OpenSSL_PKCS11_Token.obj): In functionPKCS11_Token_OpenSSL::Uninitialize()’:
OpenSSL_PKCS11_Token.cpp:(.text._ZN20PKCS11_Token_OpenSSL12UninitializeEv+0x20): undefined reference to EVP_cleanup' C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\lib\tmp_tinyclr.lib(ssl_err.obj): In functionERR_load_SSL_strings’:
ssl_err.cpp:(.text.ERR_load_SSL_strings+0x3c): undefined reference to ERR_func_error_string' ssl_err.cpp:(.text.ERR_load_SSL_strings+0x40): undefined reference toERR_load_strings’
C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\lib\tmp_tinyclr.lib(legacy_support.obj): In function Crypto_Encrypt': legacy_support.cpp:(.text.Crypto_Encrypt+0xac): undefined reference toEVP_aes_256_cbc’
legacy_support.cpp:(.text.Crypto_Encrypt+0xb0): undefined reference to EVP_EncryptInit' legacy_support.cpp:(.text.Crypto_Encrypt+0xb4): undefined reference toEVP_EncryptUpdate’
legacy_support.cpp:(.text.Crypto_Encrypt+0xb8): undefined reference to EVP_EncryptFinal' C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\lib\InteropAssembliesTable.lib(CLR_RT_InteropAssembliesTable.obj):(.data+0x50): undefined reference tog_CLR_AssemblyNative_GHI_Networking’
C:\dev\netmf\ghi\fez-hydra\tools\targets\Microsoft.SPOT.System.GCC.targets(325,5): error MSB3073: The command ““c:\dev\yagarto-20121222\bin…\arm-none-eabi\bin\ld.exe” -static --gc-sections --no-warn-mismatch --library-path=C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\lib --library-path=C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib -u ARM_Vectors -u _start --Map C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\bin\tinyclr.map --output=C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\bin\tinyclr.axf --script=C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\bin\tinyclr_scatterfile.ldf C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\obj\Solutions\FEZ_Hydra\TinyCLR\tinyclr_dat.obj C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\obj\Solutions\FEZ_Hydra\TinyCLR\allocator.obj C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\obj\Solutions\FEZ_Hydra\TinyCLR\tinyclr.obj -( C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SecurityPkcs11.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Core.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Hardware.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\InterruptHandler.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\HeapPersistence.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\IOPort.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Serialization.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Stream.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Debugger.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Debugger_full.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Diagnostics.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Graphics_Bmp.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Graphics.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Graphics_Gif.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Graphics_Jpeg.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\CorLib.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Serialization.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Graphics.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Hardware.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Touch.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Hardware_SerialPort.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Hardware_Usb.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_IO.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Net.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Messaging.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\CLRStartup.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\CRC.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\WireProtocol.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Hardware_OneWire.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SecurityPkcs11.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Update.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Messaging_stub.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Hardware_PWM.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\I2C.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\System_Xml.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\Xml.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_TimeService.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\SPOT_Net_Security.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\ANY_MEDIA\release\lib\RPC_stub.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\lib\tmp_tinyclr.lib C:\dev\netmf\ghi\fez-hydra\BuildOutput\ARM\GCC4.7\le\FLASH\release\FEZ_Hydra\lib\InteropAssembliesTable.lib -) -( “c:\dev\yagarto-20121222\arm-none-eabi\lib\libm.a” “c:\dev\yagarto-20121222\arm-none-eabi\lib\libc.a” “c:\dev\yagarto-20121222\lib\gcc\arm-none-eabi\4.7.2\libgcc.a” -) -( -)” exited with code 1. [C:\dev\netmf\ghi\fez-hydra\Solutions\FEZ_Hydra\TinyCLR\TinyCLR.proj]
Done executing task “Exec” – FAILED.
Done building target “BuildAXF” in project “TinyCLR.proj” – FAILED.
Done executing task “CallTarget” – FAILED.
Done building target “CoreSystemBuild” in project “TinyCLR.proj” – FAILED.

Looks like you are missing crypto library

(Look at the top of the text dump)

Are referring to the MicroFrameworkPK_v4_3_CryptoPack from Microsoft ?
The fez-hydra PK already comes with Crypto\LIB* stuff.
Should I install the MS’s CryptoPack over the same location in fez-hydra ?

thanks

@ puresoul - Yes you need to install the crypto pack from MS site.

@ Architect -

I did install the CryptoPackage over the Hydra’s Crypto\LIB dir.
However this did not solve the problem. Still getting the same error.

Has the Hydra PK been tested to build fine with GCC toolchain ?
Are additional changes in the configs/settings required for gcc to build hydra ?

@ puresoul - The errors you are seeing are some of the ones I mentioned in https://www.ghielectronics.com/community/forum/topic?id=18456&page=1#msg183440 that we need to address.

I do not think it is an issue with the crypto libraries being missing because we can build the same source with our compiler successfully even though it fails on GCC.

Even if you take out SSL, there were other errors that need to be addressed. Including the final firmware being too large when compiled with GCC.