On Fri, 21 Oct 2005 tad.bochan / bnpparibas.com wrote:

> Hi ... need help ...
>
> Just had Ruby 1.8.3 installed on our HP-UX box, and it seems to be
> really misbehaving... I'm trying to promote Ruby here but this is
> giving it bad press.
>
> For example, the following code
>
> #!/usr/local/bin/ruby
> p ARGV
> ARGV.each do |fname |
>     puts "File: #{fname}"
>     loop do
>         break
>     end
> end
>
> gives .....
>
>> xdump param
> ["param"]
> File: param
> /home/fcux_dev/tadb/bin/xdump:6: [BUG] Bus Error
> ruby 1.8.3 (2005-09-21) [hppa2.0w-hpux11.11]
> Abort(coredump)
>>
> (The abort goes away if I remove the 'loop do ... end')
>
> And in fact, this error ([BUG] Bus Error - what is it ?) seems to pop up
> at the slightest provocation, although some relatively complex
> ruby code seems to run ok.
>
> I didn't do the installation myself, but I suspect that the HP-UX
> bundled C compiler was used to do the installation.
> Could that be the problem ?

i haven't compiled on hp-ux for quite a while - but my experience on that
platform and solaris are to __always__ compile using

   - gcc
   - glibc

to avoid issues with the builti-in (broken) c compilers.

we setup a

   /gnu/

partition where we could install all the gnu tools and then used those when
compiling via

   export LD_LIBRARY_PATH=/gnu/lib
   export LD_RUN_PATH=/gnu/lib
   export PATH=/gnu/bin

   export CC=/gnu/bin/gcc

   ./configure --prefix=/usr/local && make && sudo make install

hth.

-a
-- 
===============================================================================
| email :: ara [dot] t [dot] howard [at] noaa [dot] gov
| phone :: 303.497.6469
| anything that contradicts experience and logic should be abandoned.
| -- h.h. the 14th dalai lama
===============================================================================