SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Las Vegas, NV
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with Installing Ruby on OS X

    My Environment:
    MacBook Pro (Intel) running Tiger (10.4.10).
    Default Ruby Version:
    [/usr/local/src]ruby -v
    ruby 1.8.2 (2004-12-25) [universal-darwin8.0]

    I'm using tcsh shell.

    The files:
    [/usr/local/src]ls
    readline-5.2/ ruby-1.8.6/

    --------

    The book says I need a more-recent version of Ruby. So I followed the procedures:

    1) My Path:
    [/usr/local/src]echo $PATH
    /sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local:/usr/local/bin:/usr/local/BerkeleyDB.4.5/bin:/usr/local/php5/bin:/usr/local/mysql/bin:/opt/local:/opt/local/bin:/Library/FrontBase/bin:/Library/Frameworks/Python.framework/Versions/Current/bin


    The important locals are /usr/local & /usr/local/bin.

    2) I need 'readline'. So I downloaded the latest (version 5.2) and following the installation instructions. This is where my problems start. I tried '>which readline' to see if OS X sees it. It doesn't.

    Installing readline failed;

    [/usr/local/src/readline-5.2]sudo ./configure --prefix=/usr/local
    checking build system type... i386-apple-darwin8.10.1
    checking host system type... i386-apple-darwin8.10.1

    Beginning configuration for readline-5.2 for i386-apple-darwin8.10.1

    checking whether make sets $(MAKE)... yes
    checking for gcc... /opt/local/ccache/bin/cc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether /opt/local/ccache/bin/cc accepts -g... yes
    checking for /opt/local/ccache/bin/cc option to accept ANSI C... none needed
    checking how to run the C preprocessor... /opt/local/ccache/bin/cc -E
    checking for egrep... grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking minix/config.h usability... no
    checking minix/config.h presence... no
    checking for minix/config.h... no
    checking whether /opt/local/ccache/bin/cc needs -traditional... no
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for ar... ar
    checking for ranlib... ranlib
    checking for an ANSI C-conforming const... yes
    checking for function prototypes... yes
    checking whether char is unsigned... no
    checking return type of signal handlers... void
    checking for size_t... yes
    checking for ssize_t... yes
    checking for ANSI C header files... (cached) yes
    checking whether stat file-mode macros are broken... no
    checking for dirent.h that defines DIR... yes
    checking for library containing opendir... none required
    checking for fcntl... yes
    checking for kill... yes
    checking for lstat... yes
    checking for memmove... yes
    checking for putenv... yes
    checking for select... yes
    checking for setenv... yes
    checking for setlocale... yes
    checking for strcasecmp... yes
    checking for strpbrk... yes
    checking for tcgetattr... yes
    checking for vsnprintf... yes
    checking for isascii... yes
    checking for isxdigit... yes
    checking for getpwent... yes
    checking for getpwnam... yes
    checking for getpwuid... yes
    checking for working strcoll... yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking for unistd.h... (cached) yes
    checking for stdlib.h... (cached) yes
    checking varargs.h usability... no
    checking varargs.h presence... no
    checking for varargs.h... no
    checking stdarg.h usability... yes
    checking stdarg.h presence... yes
    checking for stdarg.h... yes
    checking for string.h... (cached) yes
    checking for strings.h... (cached) yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking locale.h usability... yes
    checking locale.h presence... yes
    checking for locale.h... yes
    checking pwd.h usability... yes
    checking pwd.h presence... yes
    checking for pwd.h... yes
    checking for memory.h... (cached) yes
    checking termcap.h usability... yes
    checking termcap.h presence... yes
    checking for termcap.h... yes
    checking termios.h usability... yes
    checking termios.h presence... yes
    checking for termios.h... yes
    checking termio.h usability... no
    checking termio.h presence... no
    checking for termio.h... no
    checking sys/pte.h usability... no
    checking sys/pte.h presence... no
    checking for sys/pte.h... no
    checking sys/stream.h usability... no
    checking sys/stream.h presence... no
    checking for sys/stream.h... no
    checking sys/select.h usability... yes
    checking sys/select.h presence... yes
    checking for sys/select.h... yes
    checking sys/file.h usability... yes
    checking sys/file.h presence... yes
    checking for sys/file.h... yes
    checking for sys/ptem.h... no
    checking for type of signal functions... posix
    checking if signal handlers must be reinstalled when invoked... no
    checking for presence of POSIX-style sigsetjmp/siglongjmp... present
    checking for lstat... yes
    checking whether or not strcoll and strcmp differ... no
    checking whether the ctype macros accept non-ascii characters... yes
    checking whether getpw functions are declared in pwd.h... yes
    checking whether termios.h defines TIOCGWINSZ... yes
    checking whether signal handlers are of type void... yes
    checking for TIOCSTAT in sys/ioctl.h... yes
    checking for FIONREAD in sys/ioctl.h... yes
    checking for speed_t in sys/types.h... no
    checking for struct winsize in sys/ioctl.h and termios.h... sys/ioctl.h
    checking for struct dirent.d_ino... yes
    checking for struct dirent.d_fileno... yes
    checking for tgetent... no
    checking for tgetent in -ltermcap... yes
    checking which library has the termcap functions... using libtermcap
    checking wctype.h usability... yes
    checking wctype.h presence... yes
    checking for wctype.h... yes
    checking wchar.h usability... yes
    checking wchar.h presence... yes
    checking for wchar.h... yes
    checking langinfo.h usability... yes
    checking langinfo.h presence... yes
    checking for langinfo.h... yes
    checking for mbsrtowcs... yes
    checking for mbrlen... yes
    checking for wcrtomb... yes
    checking for wcscoll... yes
    checking for wcsdup... no
    checking for wcwidth... yes
    checking for wctype... yes
    checking whether mbrtowc and mbstate_t are properly declared... yes
    checking for iswlower... yes
    checking for iswupper... yes
    checking for towlower... yes
    checking for towupper... yes
    checking for iswctype... yes
    checking for nl_langinfo and CODESET... yes
    checking for wchar_t in wchar.h... yes
    checking for wctype_t in wctype.h... yes
    checking for wint_t in wctype.h... yes
    checking configuration for building shared libraries... supported
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating doc/Makefile
    config.status: creating examples/Makefile
    config.status: creating shlib/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing default commands

    [/usr/local/src/readline-5.2]sudo make
    test -d shlib || mkdir shlib
    ( cd shlib ; make all )
    make[1]: Nothing to be done for `all'.

    [/usr/local/src/readline-5.2]sudo make install
    /bin/sh ./support/mkinstalldirs /usr/local/include \
    /usr/local/include/readline /usr/local/lib \
    /usr/local/info /usr/local/man/man3
    for f in readline.h chardefs.h keymaps.h history.h tilde.h rlstdc.h rlconf.h rltypedefs.h; do \
    /usr/bin/install -c -m 644 ./$f /usr/local/include/readline ; \
    done
    ( if test -d doc ; then \
    cd doc && \
    make infodir=/usr/local/info DESTDIR= install; \
    fi )
    /bin/sh ../support/mkdirs /usr/local/info /usr/local/man/man3
    if test -n "" ; then \
    /bin/sh ../support/mkdirs ; \
    fi
    if test -f readline.info; then \
    /usr/bin/install -c -m 644 readline.info /usr/local/info/readline.info; \
    else \
    /usr/bin/install -c -m 644 ./readline.info /usr/local/info/readline.info; \
    fi
    if test -f rluserman.info; then \
    /usr/bin/install -c -m 644 rluserman.info /usr/local/info/rluserman.info; \
    else \
    /usr/bin/install -c -m 644 ./rluserman.info /usr/local/info/rluserman.info; \
    fi
    if test -f history.info; then \
    /usr/bin/install -c -m 644 history.info /usr/local/info/history.info; \
    else \
    /usr/bin/install -c -m 644 ./history.info /usr/local/info/history.info; \
    fi
    if /bin/sh -c 'install-info --version' >/dev/null 2>&1; then \
    install-info --dir-file=/usr/local/info/dir \
    /usr/local/info/readline.info ; \
    install-info --dir-file=/usr/local/info/dir \
    /usr/local/info/history.info ; \
    install-info --dir-file=/usr/local/info/dir \
    /usr/local/info/rluserman.info ; \
    else true; fi
    * Readline: (readline). The GNU readline library API.
    install-info(/usr/local/info/readline.info): no backup file /var/backups/infodir.bak available.
    install-info(/usr/local/info/readline.info): no default file /usr/share/base-files/info.dir available, giving up.
    * History: (history). The GNU history library API.
    install-info(/usr/local/info/history.info): no backup file /var/backups/infodir.bak available.
    install-info(/usr/local/info/history.info): no default file /usr/share/base-files/info.dir available, giving up.
    * RLuserman: (rluserman). The GNU readline library User's Manual.
    install-info(/usr/local/info/rluserman.info): no backup file /var/backups/infodir.bak available.
    install-info(/usr/local/info/rluserman.info): no default file /usr/share/base-files/info.dir available, giving up.
    make[1]: [install] Error 1 (ignored)
    /usr/bin/install -c -m 644 ./readline.3 /usr/local/man/man3/readline.3
    /usr/bin/install -c -m 644 ./history.3 /usr/local/man/man3/history.3
    if test -n "" ; then \
    if test -f readline.html; then \
    /usr/bin/install -c -m 644 readline.html /readline.html; \
    else \
    /usr/bin/install -c -m 644 ./readline.html /readline.html; \
    fi ; \
    if test -f history.html; then \
    /usr/bin/install -c -m 644 history.html /history.html; \
    else \
    /usr/bin/install -c -m 644 ./history.html /history.html; \
    fi ; \
    if test -f rluserman.html; then \
    /usr/bin/install -c -m 644 rluserman.html /rluserman.html; \
    else \
    /usr/bin/install -c -m 644 ./rluserman.html /rluserman.html; \
    fi ; \
    fi
    mv /usr/local/lib/libreadline.a /usr/local/lib/libreadline.old
    /usr/bin/install -c -m 644 libreadline.a /usr/local/lib/libreadline.a
    test -n "ranlib" && ranlib /usr/local/lib/libreadline.a
    mv /usr/local/lib/libhistory.a /usr/local/lib/libhistory.old
    /usr/bin/install -c -m 644 libhistory.a /usr/local/lib/libhistory.a
    test -n "ranlib" && ranlib /usr/local/lib/libhistory.a
    test -d shlib || mkdir shlib
    ( cd shlib ; make all )
    make[1]: Nothing to be done for `all'.
    ( cd shlib ; make DESTDIR= install )
    /bin/sh ../support/mkdirs /usr/local/lib
    /bin/sh ../support/shlib-install -O darwin8.10.1 -d /usr/local/lib -b /usr/local/bin -i "/usr/bin/install -c -m 644" libhistory.5.2.dylib
    /bin/sh ../support/shlib-install -O darwin8.10.1 -d /usr/local/lib -b /usr/local/bin -i "/usr/bin/install -c -m 644" libreadline.5.2.dylib
    install: you may need to run ldconfig


    I tried to run 'ldconfig':
    [/usr/local/src/readline-5.2]ldconfig
    tcsh: ldconfig: Command not found.


    So it appears that installing ReadLine is the first problem. Perhaps when this is solved, the actual Ruby installation shall be 'okay'.

    So...
    1) How do I test for readline?
    2) What am I missing here?
    3) Do I really need to run ldconv?
    4) Is all my problems due to running tcsh vs bash?

    Regards,

    Ric.

  2. #2
    SitePoint Addict jpease's Avatar
    Join Date
    Jul 2002
    Location
    In the network.
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've successfully installed using instructions from the HiveLogic site:

    http://hivelogic.com/narrative/artic...grel-mysql-osx

  3. #3
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Las Vegas, NV
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unable to install Ruby on Mac OS X.

    Quote Originally Posted by jpease View Post
    I've successfully installed using instructions from the HiveLogic site:

    http://hivelogic.com/narrative/artic...grel-mysql-osx

    That was my 1st attempt.
    Then I bought Patrick Lenz's book and tried again.
    Thats why some of the Make routines report that there's nothing to 'make'; been made before.

    It appears that either my Mac is missing some key library files or the PATH is bad.

    I've checked the PATH (ref to original post) and it appears okay.

    What I'm worried about is that there may be a number of dependent libraries that are either poorly installed or missing.

    In any case, after spending time attempting to install, nothing gained from it.

    One possible solution: find the critical library file and put a logical pointer in a directory where the PATH points to.


    ... can't think of any alternative.

    I've listed the entire installation result for someone to notice a missing step or flaw.

  4. #4
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Las Vegas, NV
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem installing 'readline' file, needed for Ruby/OS X.

    I tried MacPorts to import

    Quote Originally Posted by MacPorts
    ...
    ---> Verifying checksum(s) for readline-5
    ---> Extracting readline-5
    ---> Applying patches to readline-5
    ---> Configuring readline-5
    ---> Building readline-5 with target all
    ---> Staging readline-5 into destroot
    ---> Installing readline-5 5.0.005_0+darwin_8
    ---> Activating readline-5 5.0.005_0+darwin_8
    Error: Target com.apple.activate returned: Image error: /opt/local/lib/libhistory.5.0.dylib already exists and does not belong to a registered port. Unable to activate port readline-5.
    Error: Status 1 encountered during processing.
    So we have a clue:
    /opt/local/lib/libhistory.5.0.dylib already exists and does not belong to a registered port. Unable to activate port readline-5.

    Here's another clue.
    This is what I got when I tried to do a 'selfupdate' of MacPorts:
    Quote Originally Posted by MacPorts
    [/Users/Ric]sudo port selfupdate
    Password:
    Error: /opt/local/bin/port: selfupdate failed: Couldn't sync dports tree: sync failed doing rsync
    Now what do I do?


    Anyone has a remedy???

    Ric.
    Last edited by UncleRic; Jun 25, 2007 at 14:50. Reason: Added a clue

  5. #5
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It sounds like you missed one of the readline library steps in the tutorial linked above.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  6. #6
    SitePoint Member
    Join Date
    Jun 2007
    Location
    Las Vegas, NV
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Problem with Installing Ruby on OS X <-- MacPort problem

    It appears that I have a cascading problem that now focuses on MacPorts.
    I tried to install readline 5.2 and failed.
    So I tried MacPorts, assuming that it's intelligent enough to bring any dependent files that are required.

    Now I'm getting a rsync error (see earlier post).

    What should take a few minutes to install Ruby is taking me a week; slamming walls.

  7. #7
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know what issue you've run into, but I'd re-follow all the steps on the hivelogic site if I were you.

    Elaborate instructions, and easy to miss a step, but that's a fairly well-worn path.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •