Forum: Ruby Solaris Install: Non-standard location

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
36194a022cb2afb981bfdf720fc67d82?d=identicon&s=25 Eric Armstrong (Guest)
on 2006-05-15 23:58
(Received via mailing list)
(Resending after a bit more refactoring. Guidance
would be most appreciated.)

Were I able to install at the default location,
things would be golden. Unfortunately, that's
not an option.

My first attempt at installing failed horribly.
(Couldn't access GetoptLong, for instance, because
the site variables are pointing to the default location.)

I'm gearing up to try again.

There seem to be two ways to do it:

  * Do things manually
  * Specify command lone options when running configure

OPTION 1: Do things manually
Is this the right way to go?

The process seems to be
   a) Run configure to create config.h and the Makefile.
   b) Edit config.h to set the environment variables.
      (Yes? Not clear from the installation instructions)
   c) Build, specifying the destination options:
      % make install prefix=/foo

I did (a) and (c) last time, but not (b). The result was
a "successful" build. But running ruby with the debug
option showed that Ruby's internal variables matched
the values contained in config.h:

#define RUBY_LIB       "/usr/local/lib/ruby/1.8"
#define RUBY_SITE_LIB  "/usr/local/lib/ruby/site_ruby"
#define RUBY_SITE_LIB2 "/usr/local/lib/ruby/site_ruby/1.8"
#define RUBY_PLATFORM  "sparc-solaris2.9"


   * Should I change those from "/usr/local/lib" to my
     target destination before running make?

   * If I do that, is prefix=/myDestinationPath still
     needed when running make?

   * What's the difference between LIB, SITE_LIB, and
     SITE_LIB2 ?

OPTION 2: Specify command line options during configure
This seems like it should be the right way to go, but
there are /many/ options (below), and only one of them
looks to be at all relevant:

   --with-sitedir=DIR  site libraries in DIR
                       Default: PREFIX/lib/ruby/site_ruby

But I set PREFIX when I ran make last time. So it's
not clear that changing that one setting would do
much good.

I tried doing the build without the special instructions,
and ran into an error when the script tried to do this:

          mkdir -p -m 755 /usr/local/lib

That fails, here. But there is no option that looks useful.
They all default to PREFIX/... and I set that on makefile
command line.

Fine tuning of the installation directories:
   --bindir=DIR           user executables [EPREFIX/bin]
   --sbindir=DIR          system admin executables
   --libexecdir=DIR       program executables [EPREFIX/libexec]
   --datadir=DIR          read-only architecture-independent
   --sysconfdir=DIR       read-only single-machine data
   --sharedstatedir=DIR   modifiable
architecture-independent data
   --localstatedir=DIR    modifiable single-machine data
   --libdir=DIR           object code libraries [EPREFIX/lib]
   --includedir=DIR       C header files [PREFIX/include]
   --oldincludedir=DIR    C header files for non-gcc
   --infodir=DIR          info documentation [PREFIX/info]
   --mandir=DIR           man documentation [PREFIX/man]

Program names:
   --program-prefix=PREFIX     prepend PREFIX to installed
program names
   --program-suffix=SUFFIX     append SUFFIX to installed
program names
                               run sed PROGRAM on installed
program names

System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       cross-compile to build programs to run
   --target=TARGET   configure for building compilers for

Optional Features:
   --disable-FEATURE       do not include FEATURE
                           (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-frame-address  use GCC __builtin_frame_address().
   --disable-largefile     omit support for large files
   --enable-pthread        use pthread library.
   --enable-setreuid       use setreuid()/setregid()
according to need
                           even if obsolete.
   --disable-rpath         embed run path into extension
   --enable-shared         build a shared library for Ruby.
   --enable-install-doc    build and install rdoc indexes
during install

Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as
   --without-gcc           never use gcc
   --with-default-kcode=CODE specify default value for \$KCODE
   --with-dln-a-out        use dln_a_out if possible
   --with-static-linked-ext link external modules statically
   --with-sitedir=DIR      site libraries in DIR
   --with-search-path=DIR specify the additional search path
   --with-mantype=TYPE specify man page type; TYPE is one of
man and doc

Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have
libraries in a
               nonstandard directory <lib dir>
   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include
dir> if you have
               headers in a nonstandard directory <include dir>
   CPP         C preprocessor
36194a022cb2afb981bfdf720fc67d82?d=identicon&s=25 Eric Armstrong (Guest)
on 2006-05-16 00:02
(Received via mailing list)
Whoops. Forget to list messages in threaded
view, and didn't realize folks had already
responded. Kindly disregard the duplicate

(Where's that pullback button...)
This topic is locked and can not be replied to.