Hello Guys, Following the inspiration and the push Lars provided for building OpenSSL. I must congratulate him for the perceverance on getting it working, but I disagree on the external dependency to ActiveState Perl or the huge Strawberry Perl (35MB). I first thought the OpenSSL were crazy using perl scripts instead of autoconf / automake scripts, and they have proven that they are :-D After circumvent the issues with symlinks in the packages and find the proper steps to build it, I managed to create a new recipe for it. Also, it is now a good series of rake tasks that avoid rebuilding or extraction if there are no change to the files or source package. This is part of the ''proper-openssl'' branch in GitHub. The main reason I didn''t merge it yet with master is that the generated library is a static one, and that adds 1MB more of memory usage just by require ''openssl'' Ruby C Extension. The dll commands are failing: dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lwsock32 -lgdi32 -lmsvcrt libeay32.exp:fake:(.edata+0x35c4): undefined reference to `pqueue_print'' collect2: ld returned 1 exit status Any suggestions are real welcome. Good night everybody. -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams
On Sat, 26 Jul 2008, Luis Lavena wrote:> After circumvent the issues with symlinks in the packages and find the > proper steps to build it, I managed to create a new recipe for it.I overcame my perl-phobia and decided to take a look at why the provided scripts failed, and ended up with just two issues: * CR/LF issues. The mk1mk.pl script reads from MINFO and gets the \r\n instead of just \n, so the regexps fail silently. * When mingw32-make is run with MSYS in the PATH, it defaults to calling sh.exe instead of cmd.exe (copy/cp issue). I worked around the above issues by tweaking mk1mf.pl (tweaking the regexp) and mingw32.bat (adding SHELL=cmd.exe when invoking mingw32-make). This seems to work, even with DLL. Other than those two changes, it builds cleanly in the standard way. I''ve pushed my changes to github: http://github.com/larsch/rubyinstaller/tree/proper-openssl-alt However, I noticed that openssl.so still gets statically linked. I''m not sure why this is. I''ll try and investigate. I seems to happen with my previous attempts with ActiveState and Strawberry too. -- Lars
On Mon, Aug 11, 2008 at 7:11 PM, Lars Christensen <larsch at belunktum.dk> wrote:> > On Sat, 26 Jul 2008, Luis Lavena wrote: > >> After circumvent the issues with symlinks in the packages and find the >> proper steps to build it, I managed to create a new recipe for it. > > I overcame my perl-phobia and decided to take a look at why the provided > scripts failed, and ended up with just two issues: >Welcome to the club!> * CR/LF issues. The mk1mk.pl script reads from MINFO and gets the \r\n > instead of just \n, so the regexps fail silently. > > * When mingw32-make is run with MSYS in the PATH, it defaults to calling > sh.exe instead of cmd.exe (copy/cp issue). > > I worked around the above issues by tweaking mk1mf.pl (tweaking the regexp) > and mingw32.bat (adding SHELL=cmd.exe when invoking mingw32-make). This > seems to work, even with DLL. Other than those two changes, it builds > cleanly in the standard way. > > I''ve pushed my changes to github: > > http://github.com/larsch/rubyinstaller/tree/proper-openssl-alt > > However, I noticed that openssl.so still gets statically linked. I''m not > sure why this is. I''ll try and investigate. I seems to happen with my > previous attempts with ActiveState and Strawberry too. >Did you had change to test the proper-openssl branch I created? http://github.com/luislavena/rubyinstaller/tree/proper-openssl I got the shared lib (dll) building properly, but I need to check your work too, so we can merge them into master and move forward soon. Dunno you guys, but I want to release a Runtime version soon (like in 2 weeks?) Regards and thank you for your hard work. -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams
On Tue, 12 Aug 2008, Luis Lavena wrote:>> However, I noticed that openssl.so still gets statically linked. I''m not >> sure why this is. I''ll try and investigate. I seems to happen with my >> previous attempts with ActiveState and Strawberry too. >> > > Did you had change to test the proper-openssl branch I created? > > http://github.com/luislavena/rubyinstaller/tree/proper-opensslYes indeed, and it worked very well. My reason for looking into this again was primarily to understand the build failures better, but also in hope of a minimal build method that is as close as possible to the officially supported method by the OpenSSL team. To be honest, I personally would prefer the ActiveState or Strawberry solution since it is the only official provided by the OpenSSL team, but I understand that the bloat is undisirable in rubyinstaller. I''m certainly not dimissing your approach, just looking for enlightenment and possible alternatives. I think that RubyInstaller should be as transparent as possible about what it does, so that it is (a) as close to official release & procedures as possible, and (b) whatever custom changes there are easily identifiable. The reason for this is an issue of trust. Its the same reason I would avoid the Shining Light builds [1]. Its a matter of trust. Breaches, and not least, human errors[2], do occur. [1] http://www.slproweb.com/products/Win32OpenSSL.html [2] http://www.metasploit.com/users/hdm/tools/debian-openssl/> I got the shared lib (dll) building properly, but I need to check your > work too, so we can merge them into master and move forward soon.Is this commit ece49e8a5131a03f7? (Just to understand)> Dunno you guys, but I want to release a Runtime version soon (like in 2 weeks?) > > Regards and thank you for your hard work.Same to you Luis! Rgds, Lars