I would like to build new version of Open Pegasus Client (2.14.1). Unfortunately I'm facing with some build issues. Does anybody know some workaround for these issues?
My environment is:
- OS: Windows 8.1 Enterprise
- Make version: GNU Make 3.81
- Pegasus sources version: 2.14.1
- OpenSSL version: 1.0.2a
My scenario is quite easy:
- I have downloaded source code of Open Pegasus 2.14.1
- I have downloaded the OpenSSL binaries (actual version v1.0.2a).
After extraction of Pegasus source code I set my environment with these settings:
call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat" set PEGASUS_ROOT=D:/Dev/pegasus-2.14.1/pegasus set PEGASUS_HOME=%PEGASUS_ROOT% set PEGASUS_PLATFORM=WIN32_IX86_MSVC set path=%path%;%PEGASUS_HOME%\bin set OPENSSL_HOME=D:/Dev/OpenSSL-Win32 set PEGASUS_HAS_SSL=true
Next step was building of mu.exe tool. So, I have executed "make buildmu" => successfully build and copied to "/bin" folder. I would like to build Pegasus so: "make build" => after some time I got this error:
Message.cpp(433) : error C2065: 'magic' : undeclared identifier
I tried to fix this problem. I found that magic constant is defined in \pegasus-2.14.1\pegasus\src\Pegasus\Common\Linkable.h file so I had two options: a) Switch build configuration to DEBUG (set PEGASUS_DEBUG=true) b) Remove DEBUG condition from lines 62 in Linkable.h file Then, I tried to build Pegasus again, unfortunately I got this error:
error LNK2005: _OPENSSL_Applink already defined in SSLContext.obj
At this point I have no clue how to fix this problem. I just tried to remove these lines:
# ifdef PEGASUS_OS_TYPE_WINDOWS
# include<openssl/applink.c>
# endif
from SSLContextRep.h file. After this modification I was able to get Pegasus clients binaries. But these binaries work just without SSL, when I want to use SSL communication I always got error: " Pegasus Exception: 'Cannot connect to 10.199.1.139:5989. Connection failed.'.", so I assume that is because my code modification in SSLContextRep.h.
Outputs from Pegasus Tracer:
SSL: Not connected 1 error:140740BF:SSL routines:SSL23_CLIENT_HELLO:no protocols available SSL: Deleted SSL socket
Does anybody know what can be wrong? Does somebody own some (better) environment configuration steps for Windows to build OpenPegasus?
Many thanks in advance for any kind of help.
Edit:
I need to be able work without certificates. Because I'm using SSL communication with various Storage Arrays and I don't have their certificates. Therefore I'm using this constructor of SSLContext:
SSLContext sslContext(String::EMPTY, NULL, String::EMPTY);
this approach works for me fine in the OpenPegasus 2.13 version.
I got response from Open Pegasus dev team. They created bug for the issue with "magic" constant. Also they recommending in my case to use sslBackwardCompatibility = true configuration for the build.
This setting helped me partially. For some Storage Arrays the SSL communication started work. But for some it still reporting "Cannot connect" exception.
Only workaround what I found is to replace code of _makeSSLContext() method with code from OpenPegasus 2.13 version. After this modification I'm able to use SSL communication with all my Storage Arrays + all features from new Pegasus version.