Paul Hinker's Weblog
Tuesday Nov 18, 2008
Building Cryptopp version 5.5.2 on openSolaris using Studio 11.08 Express
Now that I've gotten an openSolaris VM running and installed the latest Sun Studio compilers and tools I'm back on the project of compiling some of the more popular open source packages using my set up.The Cryptopp library is a free C++ class library of cryptographic schemes. It contains a variety of algorithms. The source can be downloaded from www.cryptopp.com for a number of platforms.
According to the Platforms matrix on the Cryptopp page, the library has been built on Solaris using Sun Studio 11 and Sun Studio 12. The only notes is that you should use the command "gmake CXX=CC". Let's give that a try:
The first thing you notice is a raft of warnings where the compiler is complaining about the aligned attribute not being supported. I sent some e-mail to the C++ compiler guys and they informed me that there was an outstanding request for enhancement concerning the support of the aligned attribute. If you're like me and you don't like all the warnings, you can add the -w flag to the CXXFLAGS in the GNUmakefile. One other message that comes up during compilation is the report that, due to complexity, some of the modules are compiled with reduced optimization.
Another issue that might come up if you're running an openSolaris guest VM is that the C++ compiler is quite memory hungry. I configured my VM with 1.5 GB of memory but there's a lot of swapping going on during compiles.
After a fair amount of time, the compile finishes successfully. You can run the validation tests :
% cryptest v
This results in a successful test run with all the tests passing. You can run the benchmark suite:
% cryptest b 30 2 > cryptopp.html
It ran for a while and output an impressive array of data. Note that this is a straight build that was run in an openSolaris guest VM running on an older 2.0Ghz opteron cpu.
What this showed me was that the openSolaris folks' efforts to make porting and building open source apps to openSolaris is coming along nicely. This useful library builds and works right out of the box with no fuss.
Next up is Xerces-C. A C++ XML parsing library from the Apache project.
Posted at 05:35PM Nov 18, 2008 by hinkthink in General |

