Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby on HP-UX

Reply
Thread Tools

Ruby on HP-UX

 
 
Tim Nordloh
Guest
Posts: n/a
 
      03-22-2006
------=_Part_2827_19261585.1143049403032
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Ok, I hand-modified it and ended up with this....
gcc -g -O2 -DRUBY_EXPORT -DYYMAXDEPTH=3D300 -Wl,-E -L.
main.oext/extinit.o ext/bigdecimal/bigdecimal.a \
> ext/curses/curses.a ext/dbm/dbm.a ext/digest/md5/md5.a

ext/digest/rmd160/rmd160.a ext/digest/sha1/sha1.a \
> ext/digest/sha2/sha2.a ext/iconv/iconv.a ext/openssl/openssl.a

ext/zlib/zlib.a -lruby-static -ldld -lcrypt \
> -lm -lcur_colr -ltermcap -lssl -lcrypto -liconv -lnsl -lz -o ruby


which seemed to run successfully.

So, I went through and removed all references to the
"/usr/local/include/openssl/lib" from all MakeFiles. I still got an error,
so I ended up removing the "EXTLDFLAGS" entry (which contained the extra -E
which was causing the compile failure. I was then able to successfully run
the 'gmake' routine, as well as 'gmake all'.

Thanks, this is the closest I've managed to get, but all that work

"gmake install-all" appeared to successfully run, but I continue to get the
same error when I attempt to run ri:
root@atcito01 [/home/tnordloh/ruby/ruby-1.8.4]
# ri File
/usr/local/lib/ruby/1.8/yaml.rb:87: uninitialized constant
YAML::Syck::Resolver (NameError)
from /usr/local/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:1
from /usr/local/lib/ruby/1.8/rdoc/ri/ri_reader.rb:1
from /usr/local/lib/ruby/1.8/rdoc/ri/ri_driver.rb:5
from /usr/local/bin/ri:43

So what is the problem?

On 3/22/06, Mauricio Fernandez <(E-Mail Removed)> wrote:
>
> On Thu, Mar 23, 2006 at 12:07:30AM +0900, Tim Nordloh wrote:
> > These first couple of lines look like a malformed gcc command to

> me. Anyone
> > have an idea of what the line should read?
> >
> > gcc -g -O2 -DRUBY_EXPORT -DYYMAXDEPTH=3D300 -Wl,-E -L.
> > -L"/usr/local/include/openssl/lib" -E main.o ext/extinit.o

> =3D=3D=3D=3D
> Could you try without this?
>
> > ext/bigdecimal/bigdecimal.a ext/curses/curses.a ext/dbm/dbm.a
> > ext/digest/md5/md5.a ext/digest/rmd160/rmd160.a ext/digest/sha1/sha1.a
> > ext/digest/sha2/sha2.a ext/iconv/iconv.a ext/openssl/openssl.a
> > ext/zlib/zlib.a -lruby-static -ldld -lcrypt -lm -lcur_colr -ltermcap

> -lssl
> > -lcrypto -liconv -lnsl -lz -o ruby

>
> BTW, you might have to add digest (which digest/md5 and friends depend on=

)
> and syck (in order to get ri to work) to the extension list.
>
> --
> Mauricio Fernandez - http://eigenclass.org - singular Ruby
>
>


------=_Part_2827_19261585.1143049403032--


 
Reply With Quote
 
 
 
 
MenTaLguY
Guest
Posts: n/a
 
      03-22-2006
I really think this approach of removing things until it compiles is a mi=
stake; if you did eventually get something that built, you'd just end up =
with a build of Ruby that most likely won't run any useful Ruby scripts.

Your main issue is one of how the libraries Ruby depends on were built or=
installed -- you definitely do want to build them yourself, if you're cu=
rrently trying to use prepackaged versions. Part of the what's going on =
is missing header files, but I have no idea what else is going on. If yo=
u build the libraries yourself with the default options (to the degree po=
ssible), they're a known quantity.

I actually created a /usr/local/ruby where I installed fresh builds of al=
l the required libraries. Note that doing so will required compiling eve=
rything with e.g. -Wl,+b -Wl,/usr/local/ruby/lib though...

Also, see my notes in the earlier post:
http://groups.google.com/group/comp..../thread/fdb97=
e11bcf2be54/d1dc4df9c0a875b8#d1dc4df9c0a875b8

I have to ask, though -- do you really need to do this on _HP-UX_?

For me, it was almost more pain than it was worth -- not because of adjus=
tments required to Ruby itself, but because of quirks of the platform and=
the gymnastics required to build the libraries Ruby depends on in just t=
he right way to make the dynamic linker happy.

-mental




 
Reply With Quote
 
 
 
 
Tim Nordloh
Guest
Posts: n/a
 
      03-22-2006
------=_Part_6261_9099241.1143063959861
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Well, my basic Ruby scripts run ok for my basic needs, and no -- I don't
'need' to run Ruby on HP-UX. I'm the System Admin: I'll just label it as a
'non HP-UX compliant product' and tell any developer that wants to use it t=
o
use Perl for their interpreted language needs

I'll just wait until some bright-eyed kid gets a version on the HP Software
porting archive.

Thanks all, for the attempts....


On 3/22/06, MenTaLguY <(E-Mail Removed)> wrote:
>
> I really think this approach of removing things until it compiles is a
> mistake; if you did eventually get something that built, you'd just end u=

p
> with a build of Ruby that most likely won't run any useful Ruby scripts.
>
> Your main issue is one of how the libraries Ruby depends on were built or
> installed -- you definitely do want to build them yourself, if you're
> currently trying to use prepackaged versions. Part of the what's going o=

n
> is missing header files, but I have no idea what else is going on. If yo=

u
> build the libraries yourself with the default options (to the degree
> possible), they're a known quantity.
>
> I actually created a /usr/local/ruby where I installed fresh builds of al=

l
> the required libraries. Note that doing so will required compiling
> everything with e.g. -Wl,+b -Wl,/usr/local/ruby/lib though...
>
> Also, see my notes in the earlier post:
>
> http://groups.google.com/group/comp....thread/fdb97e=

11bcf2be54/d1dc4df9c0a875b8#d1dc4df9c0a875b8
>
> I have to ask, though -- do you really need to do this on _HP-UX_?
>
> For me, it was almost more pain than it was worth -- not because of
> adjustments required to Ruby itself, but because of quirks of the platfor=

m
> and the gymnastics required to build the libraries Ruby depends on in jus=

t
> the right way to make the dynamic linker happy.
>
> -mental
>
>
>
>


------=_Part_6261_9099241.1143063959861--


 
Reply With Quote
 
MenTaLguY
Guest
Posts: n/a
 
      03-22-2006
On Thu, 23 Mar 2006 06:46:28 +0900, "Tim Nordloh" <(E-Mail Removed)> wr=
ote:
> I'll just wait until some bright-eyed kid gets a version on the HP
> Software porting archive.


I guess that really means getting correctly built versions of all the rel=
event libraries on the porting archive first.

Once that were done, building Ruby proper is trivial aside from the usual=
HP-UX porting tricks like short-circuiting the autoconf test to ignore H=
P-UX's incompletely implemented getaddrinfo().

Does anyone else on the list care enough for me to pursue this?

-mental



 
Reply With Quote
 
Benjohn Barnes
Guest
Posts: n/a
 
      03-22-2006

On 22 Mar 2006, at 22:34, MenTaLguY wrote:

> On Thu, 23 Mar 2006 06:46:28 +0900, "Tim Nordloh"
> <(E-Mail Removed)> wrote:
>> I'll just wait until some bright-eyed kid gets a version on the HP
>> Software porting archive.

>
> I guess that really means getting correctly built versions of all
> the relevent libraries on the porting archive first.
>
> Once that were done, building Ruby proper is trivial aside from the
> usual HP-UX porting tricks like short-circuiting the autoconf test
> to ignore HP-UX's incompletely implemented getaddrinfo().
>
> Does anyone else on the list care enough for me to pursue this?


I desperately need a version of Ruby that works on HPUX, and I've
really got very little idea of how to go about getting it to work :
( - I'm from the happy world of opening my iBook, and "oooh, it's pre-
installed!", all this needing to download things, tinker with them,
and build them, is totally alien!

If you can get it to work, and you live in London, I'm happy to
pay in beer


 
Reply With Quote
 
Tim Nordloh
Guest
Posts: n/a
 
      03-23-2006
------=_Part_8483_15826766.1143079471534
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

MenTaLGuY,
I'd love to get Ruby working on HP-UX, but more importantly I would like to
generate a series of steps that can be easily duplicated to install Ruby on
HP-UX anywhere. Of course, this is mostly to benefit me, so it's very easy
to convince me to stop bugging the entire Ruby community about it . As I
mentioned in my original post, the directions out there right now are just
too high-level for me.

I'm willing to help out in whatever way possible in getting a procedure set
up.

If this helps, In the final analysis, I was getting the same failure on all
libraries except one. I couldn't link 'crypto' on most, and 'iconv' on the
odd one. I was able to verify this by purging references to 'crypto' in th=
e
makefiles, at which point everything except iconv successfully linked. Giv=
e
me a hint as to what library I need for this. I actually see crypto.h in
the /usr/local/etc/openssl directory, is there another version I need?

For some reason I still get SYCK errors at this point which, I assume,
means that one of the libraries needs something I messed up by removing
crypto linking and not dynamically linking iconv.

If you have something else for me to try, I'll be glad to.

------=_Part_8483_15826766.1143079471534--


 
Reply With Quote
 
James Edward Gray II
Guest
Posts: n/a
 
      03-23-2006
On Mar 22, 2006, at 8:05 PM, Tim Nordloh wrote:

> I'd love to get Ruby working on HP-UX, but more importantly I would
> like to
> generate a series of steps that can be easily duplicated to install
> Ruby on
> HP-UX anywhere.


What I believe MenTaLguY was trying to say is that you would need to
sit down and do a bunch of compiling to get it going.

Those C extensions link against other libraries on the system. For
some reason, this isn't working out for your build process. It could
be because you don't have the needed library installed, or just that
your package-manager installs aren't recognized, possibly because of
missing header files.

By pulling those libraries down yourself and building them from
source, you can probably get around at least a large portion of
this. However, that's not likely to boil down to a simple series of
steps.

James Edward Gray II



 
Reply With Quote
 
Tim Nordloh
Guest
Posts: n/a
 
      03-23-2006
------=_Part_9135_10616429.1143083590929
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

At this point, I'm not asking for a lot, just a hint would help, such as,
what library is crypto in (openssl I guess???? I'm attempting to compile
that now, so hopefully my guess is right), and what library is iconv in?
And which one is likely the hangup for YAML+SYCK?

I'm trying my best to not waste anyone's time, and for every response I've
spent at least an hour checking, rechecking deleting and reinstalling from
scratch (honing the mysterious procedure), and I have made several
discoveries on the way. I thank everyone for advice so far and understand
if you all want to give up. After all, I'm not exactly paying anyone for
their time. That's kind of why I keep talking about creating a lower-level
procedure for an HP-UX install, so that the Ruby community will at least be
able to gain some benefit at the end of this thread.


On 3/22/06, James Edward Gray II <(E-Mail Removed)> wrote:
>
> On Mar 22, 2006, at 8:05 PM, Tim Nordloh wrote:
>
> > I'd love to get Ruby working on HP-UX, but more importantly I would
> > like to
> > generate a series of steps that can be easily duplicated to install
> > Ruby on
> > HP-UX anywhere.

>
> What I believe MenTaLguY was trying to say is that you would need to
> sit down and do a bunch of compiling to get it going.
>
> Those C extensions link against other libraries on the system. For
> some reason, this isn't working out for your build process. It could
> be because you don't have the needed library installed, or just that
> your package-manager installs aren't recognized, possibly because of
> missing header files.
>
> By pulling those libraries down yourself and building them from
> source, you can probably get around at least a large portion of
> this. However, that's not likely to boil down to a simple series of
> steps.
>
> James Edward Gray II
>
>
>


------=_Part_9135_10616429.1143083590929--


 
Reply With Quote
 
MenTaLguY
Guest
Posts: n/a
 
      03-23-2006
libcrypto is provided by openssl, yes

iconv _should_ be provided by your OS's libc, but as I recall HP-UX's is
present but broken (HP has a distressing habit of implementing things
just enough to pass a naive configure test). You can get a portable
iconv replacement for Ruby to use here:

http://www.gnu.org/software/libiconv/

If I remember correctly, the list of essential libraries is something
like (in no particular order):

- zlib
- libgdbm
- libiconv
- ncurses
- readline
- openssl

I think there's one more I'm forgetting, but I can't find my notes just
now. It'll be pretty obvious if you're still missing one, though.

Make sure that these are all available as either shared libraries, or
(failing that) that they were at least built as position-independent
code. Otherwise the HP-UX dynamic linker will choke at runtime because
it can't relocate the static objects HP's linker blindly imports into
shared libraries.

See my old post that I linked to for more details and other tweaks that
need to be made to specific libraries for HP-UX.

-mental



 
Reply With Quote
 
Tim Nordloh
Guest
Posts: n/a
 
      03-23-2006
------=_Part_9928_979708.1143088563998
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I'll work on at least openssl, since it is the squeaky wheel at the moment.
I'm having issues with it's makefile at the moment. Incidentally, why are
you refering to libcrypto, when the error is related to crypto? Is crypto
somehow contained in the libcrypto file? I ask because I have a '
libcrypto.sl' file on my system, but no 'crypto.sl', so I sense the
difference may be important to me in some way. I'll paste the error below,
so you don't have to refer back to my original message to the forum...

gmake[1]: Entering directory `/home/tnordloh/ruby/ruby-1.8.4/ext/digest/md5=
'
ld -b -E -L"../../.." -o ../../../.ext/hppa2.0w-hpux11.11/digest/md5.sl
md5init.o md5ossl.o -lcrypto -ldld -lcrypt -lm -lc
*ld: Can't find library: "crypto"*
gmake[1]: *** [../../../.ext/hppa2.0w-hpux11.11/digest/md5.sl] Error 1
gmake[1]: Leaving directory `/home/tnordloh/ruby/ruby-1.8.4/ext/digest/md5'
gmake: *** [all] Error 1


I did read your original message, and I apologize for not understanding it.
It's too high-level for me. For example, when you talk about "disable ipv6
and wide-getaddrinfo so it uses Ruby's built-in getaddrinfo() instead" I as=
k
the question "how?" I don't believe I have IPv6 enabled, so maybe I'm good
on this step.


On 3/22/06, MenTaLguY <(E-Mail Removed)> wrote:
>
> libcrypto is provided by openssl, yes
>
> iconv _should_ be provided by your OS's libc, but as I recall HP-UX's is
> present but broken (HP has a distressing habit of implementing things
> just enough to pass a naive configure test). You can get a portable
> iconv replacement for Ruby to use here:
>
> http://www.gnu.org/software/libiconv/
>
> If I remember correctly, the list of essential libraries is something
> like (in no particular order):
>
> - zlib
> - libgdbm
> - libiconv
> - ncurses
> - readline
> - openssl
>
> I think there's one more I'm forgetting, but I can't find my notes just
> now. It'll be pretty obvious if you're still missing one, though.
>
> Make sure that these are all available as either shared libraries


how do I make sure of this?
or
(failing that) that they were at least built as position-independent
code. Otherwise the HP-UX dynamic linker will choke at runtime because
it can't relocate the static objects HP's linker blindly imports into
shared libraries.

See my old post that I linked to for more details and other tweaks that
need to be made to specific libraries for HP-UX.

-mental

------=_Part_9928_979708.1143088563998--


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby extension (C++) on OS X [ruby 1.8.2] and Google-Sketchup [ruby 1.8.5] Nicholas Ruby 3 01-28-2007 01:48 AM
The Ruby Edge - Digg for Ruby and Ruby On Rails roschler Ruby 0 10-15-2006 11:35 PM
ruby-talk, comp.lang.ruby, ruby-talk-google Phrogz Ruby 4 09-06-2006 06:43 PM
#!/usr/bin/ruby , #!/usr/bin/ruby -w , #!/usr/bin/ruby -T?, #!/usr/bin/ruby -T1... anne001 Ruby 1 04-23-2006 03:02 PM
[ANN] ruby-freedb, ruby-serialport, ruby-mp3info moved to Rubyforge guillaume.pierronnet@ratp.fr Ruby 0 08-31-2003 11:57 PM



Advertisments