Hi all, Not sure if anyone out there would be using HP-UX on PA-RISC but just in case we''ve run into a real brick wall on this one. We are apparently encountering exactly the same issue as this person did - http://www.ruby-forum.com/topic/191987 We can get around the issue using the same workaround mentioned in the above thread but it''s not really a maintainable solution. Does anyone have any further ideas of what could be stopping us from compiling? We''re trying to compile ruby 1.8.7p352 on HP-UX 11.11 PA-RISC. Best regards, Alex Harvey -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/_gb66_Nv3ukJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Michael Stahnke
2012-Nov-05 05:27 UTC
Re: [Puppet Users] compiling ruby on HP-UX / PA-RISC
On Sun, Nov 4, 2012 at 8:50 PM, Alex Harvey <alexharv074@gmail.com> wrote:> Hi all, > > Not sure if anyone out there would be using HP-UX on PA-RISC but just in > case we''ve run into a real brick wall on this one. > > We are apparently encountering exactly the same issue as this person did - > http://www.ruby-forum.com/topic/191987 > > We can get around the issue using the same workaround mentioned in the above > thread but it''s not really a maintainable solution. > > Does anyone have any further ideas of what could be stopping us from > compiling? > > We''re trying to compile ruby 1.8.7p352 on HP-UX 11.11 PA-RISC. > > Best regards, > Alex Harvey1. You may need to file a bug with ruby-lang.org 2. Would static linking help at all with being maintainable?> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/_gb66_Nv3ukJ. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Monday, November 5, 2012 4:27:54 PM UTC+11, Michael Stanhke wrote:> > > 1. You may need to file a bug with ruby-lang.org > 2. Would static linking help at all with being maintainable? > > Thanks Michael. Actually static linking should be fine - I didn''t thinkof it. I also raised a bug as you suggested, https://bugs.ruby-lang.org/issues/7279. I''ll see how it goes. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/bIVrG6etHBMJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
It turns out static linking didn''t work either but for the benefit of people reading this in the archives I found a workaround - There is some documentation of HP-UX PA-RISC compiler here http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=4727276391695110VgnVCM100000275d6e10RCRD (There''s probably a better one somewhere but that''s the one I used.) The +b option is used by the linker to embed a library path list in the executable for use at run time. However, if passing these options via CC or GCC then the option should be -Wl,+b. The mkmf.log file showed, however, that an unknown option +b was being passed directly to gcc. I found this was coming from configuration in /usr/local/lib/ruby/1.8/hppa2.0w-hpux11.11/rbconfig.rb. After running configure I made the following change in config.status - mv config.status config.status.orig sed -e ''s/^.*RPATHFLAG.*$/S["RPATHFLAG"]=" -Wl,+b%1$-s"/'' config.status.orig >config.status chmod +x config.status ./config.status This resulted in /usr/local/lib/ruby/1.8/hppa2.0w-hpux11.11/rbconfig.rb having # grep RPATHFLAG /usr/local/lib/ruby/1.8/hppa2.0w-hpux11.11/rbconfig.rb CONFIG["RPATHFLAG"] = " -Wl,+b%1$-s" which is what I wanted. However, the make step still didn''t run properly because -Wl,+b was now passed to ld, which is also wrong. Thus after the make step finished I made another change - cd ext/zlib mv Makefile Makefile.orig sed -e ''s#^LIBPATH.*$#LIBPATH = -L. -L$(topdir) -L/usr/local/lib +b/usr/local/lib#'' Makefile.orig >Makefile make That works fine. Then cd ../.. && make install and the zlib extension was installed. I also updated the redmine ticket https://bugs.ruby-lang.org/issues/7279 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ShJkD1LgbvYJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.