From: MenTaLguY Date: 2006-03-24T02:03:08+09:00 Subject: Re: Ruby on HP-UX On Thu, 23 Mar 2006 13:36:34 +0900, "Tim Nordloh" wrote: > 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? Yes. The way libraries work on unix, if you specify -lcrypto, the linker looks for a libcrypto.sl or a libcrypto.a. Incidentally, since you may not be aware -- in general HP-UX's tools don't know to look in /usr/local by default. If you've got required libraries, you'll need to have the following environment variables set at build-time: export CPPFLAGS="-I/usr/local/include" export LDFLAGS="-L/usr/local/lib -Wl,+b -Wl,/usr/local/lib" This holds for building software on HP-UX in general. The -I/usr/local/include is so that it can find the header files at compile time, the -L/usr/local/lib is so it can find the library files at link time, and the -Wl,+b -Wl,/usr/local/lib is so that the linked program can find the libraries again at runtime. This last one is sort of a peculiarity of HP-UX. Unfortuantely openssl's build system is weird, so I can't promise that it respects those environment variables. It's been a while since I've done it myself. You might have to do some makefile hacking after running ./Configure. > For example, when you talk about "disable ipv6 and wide-getaddrinfo so it uses Ruby's > built-in getaddrinfo() instead" I ask the question "how?" I don't believe I have IPv6 > enabled, so maybe I'm good on this step. Those refer to commandline options to pass when running Ruby's configure script: --disable-ipv6 --disable-wide-getaddrinfo Those _should_ get passed down to ext/socket/extconf.rb; if it turns out that name resolution still doesn't work from Ruby, you may have to rerun ext/socket/extconf.rb explicitly with those options, run make, and replace the broken installed socket.sl manually. [ For what it's worth, on most platforms Ruby's build system can detect the absence of a working getaddrinfo() automatically, but HP-UX's getaddrinfo() implements just enough to fool the tests into thinking it's usable. ] > how do I make sure of this? [that shared libraries get built] This will vary from library to library; the desired end result is that you have an .sl version of the library installed. For libraries with a standard autoconf-based build system, that usually means passing --enable-shared as an argument to ./configure. To achieve this for openssl, however, this means configuring the library with something like: ./Configure hpux-parisc shared (hopefully I'm remembering the platform string correctly) -mental