Forum: Ruby Two build issues with 1.8.4..

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Stephen W. (Guest)
on 2006-03-21 21:04
(Received via mailing list)
In attempting to build a completely static ruby, I've discovered a few
issues.

The setup..
===========
I've built static versions of readline, zlib, iconv, dbm, and openssl.
My intention is to build a completely static ruby, including all
possible extensions.


Issue #1
========

Problem
-------
If you build openssl with zlib support, then Ruby's ext/openssl
extension will not build.  This is because the extconf.rb needs to
include "-lz".  Note, if your libssl.a is build *without* zlib, Ruby
does attempt to build ext/openssl.  This only happens when you build
libssl.a *with* zlib support.

Resolution
----------
In the openssl extension, I suggest adding a test to see if "-lz" (zlib)
exists.  If it does, then include "-lz" on all of the subsequent openssl
specific tests.  I don't exactly know how to do this due to
unfamiliarity with Ruby's extension build system.


Issue #2
========

Problem
-------
When using a static openssl library (libssl.a), and all static
extensions (--with-static-linked-ext), the openssl digest functions
(SHA) conflict with the same named symbols in ext/digest.  I imagine
this works fine under the *non-static* case because the symbols are
resolved at runtime; however, in the *static* case, the symbols must be
unique at link time -- and they are not.

Resolution
----------
I don't know about this one either - because Ruby's build system is
already somewhat of a magical mystery to me.  However, it seems that we
need a mechanism to automagically choose which lib to link.  In the case
of a static libssl.a, the ext/digest functions should be considered
"weak".


Closing Notes
=============
If *anyone* knows *anything* about this, or has had similar experience,
please let me know.  Furthermore, if there's a more appropriate place to
send this kind of thing than ruby-talk, let me know that too.


Thanks,
Steve
unknown (Guest)
on 2006-03-22 09:03
(Received via mailing list)
Hi,

At Wed, 22 Mar 2006 04:04:12 +0900,
Stephen W. wrote in [ruby-talk:185160]:
> I've built static versions of readline, zlib, iconv, dbm, and openssl.
> My intention is to build a completely static ruby, including all
> possible extensions.

Can you show the mkmf.log.  It is important for build issues.
Stephen W. (Guest)
on 2006-03-22 21:16
(Received via mailing list)
WARNING: This e-mail has been altered by MIMEDefang.  Following this
paragraph are indications of the actual changes made.  For more
information about your site's MIMEDefang policy, contact
SCEA PD Postmaster <removed_email_address@domain.invalid>.  For more information 
about
MIMEDefang, see:

            http://www.roaringpenguin.com/mimedefang/enduser.php3

An attachment named go.sh was removed from this document as it
constituted a security hazard.  If you require this document, please
contact
the sender and arrange an alternate means of receiving it.
Logan C. (Guest)
on 2006-03-23 08:15
(Received via mailing list)
On Mar 21, 2006, at 2:04 PM, Stephen W. wrote:

> Issue #1
> Resolution
> Problem
> I don't know about this one either - because Ruby's build system is
> appropriate place to send this kind of thing than ruby-talk, let me
> know that too.
>
>
> Thanks,
> Steve
>
>


Have you looked at AllInOneRuby? It may have solved some of your
problems already. Technically its _not_ a static build of ruby though.

http://www.erikveen.dds.nl/allinoneruby/index.html
Stephen W. (Guest)
on 2006-03-23 17:13
(Received via mailing list)
On Mar 22, 2006, at 10:15 PM, Logan C. wrote:

> Have you looked at AllInOneRuby? It may have solved some of your
> problems already. Technically its _not_ a static build of ruby though.

Thanks for the reply; however, I need an entirely static Ruby.

--Steve
This topic is locked and can not be replied to.