Wednesday, August 20, 2014

Ruby installation issue with openssl

So i was trying to install ruby 1.87 and the compilation broke due to openssl issue. The error was something like this.

ossl_pkey_ec.c: In function ‘ossl_ec_group_initialize’:
ossl_pkey_ec.c:761: warning: assignment makes pointer from integer without a cast
ossl_pkey_ec.c:815: error: ‘EC_GROUP_new_curve_GF2m’ undeclared (first use in this function)
ossl_pkey_ec.c:815: error: (Each undeclared identifier is reported only once
ossl_pkey_ec.c:815: error: for each function it appears in.)
make[1]: *** [ossl_pkey_ec.o] Error 1
make[1]: Leaving directory `/usr/local/src/ruby-enterprise-1.8.7-2012.02/source/ext/openssl'
make: *** [all] Error 1
So applied this patch to the openssl file in the extracted ruby source and finally the compilation was successfull. You will need to specify the location of the ossl_pkey.ec.c file in the below file or you can mention it while patching.




--- ruby-1.8.7-p374/ext/openssl/ossl_pkey_ec.c  2010-06-21 04:18:59.000000000 -0500
+++ /root/ruby-1.8.7-p374/ext/openssl/ossl_pkey_ec.c    2013-12-10 13:30:18.919963527 -0600
@@ -757,8 +757,10 @@
                 method = EC_GFp_mont_method();
             } else if (id == s_GFp_nist) {
                 method = EC_GFp_nist_method();
+               #if !defined(OPENSSL_NO_EC2M)
             } else if (id == s_GF2m_simple) {
                 method = EC_GF2m_simple_method();
+               #endif
             }

             if (method) {
@@ -811,8 +813,10 @@

             if (id == s_GFp) {
                 new_curve = EC_GROUP_new_curve_GFp;
+               #if !defined(OPENSSL_NO_EC2M)
             } else if (id == s_GF2m) {
                 new_curve = EC_GROUP_new_curve_GF2m;
+               #endif
             } else {
                 rb_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m");
             }

Change your location to the ruby source directory and save the contents to a file named patch.txt. then issue the following command to patch.

#patch < patch.txt

Hope this helps :)

Wednesday, August 6, 2014

For those who have Issues running Microsoft Office 2007 on Wine.

So I had to remove my windows altogether and run linux. I choose the latest stable release of Mint 17, i need to have ms office installed and figured out the wine package should handle this fine. however it was not smooth as i thought.

Installation was fine. But the excel and power point was not opening and had trouble. So here is something that I did made it work for me.

1. Open the wine configuration ( gui --> Configure Wine ) and select the windows version to be "windows xp"


2. Check the libraries tab next, you will need to add  a new override for the library, choose "riched 20" and click add. Then you need to edit this newly added override and change the load order to "native ( windows )" 

 
 Apply the wine configuration and then try launching the powerpoint or excel, it should work :)