have_library fails on SunOS 5.8 sun4u ??

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default have_library fails on SunOS 5.8 sun4u ??


    rubyists-

    i'm trying to compile the ruby-postgres package, and it seems that
    'have_library' is not working on SunOS 5.8 sun4u??

    for example:

    /tmp/vtrcs/ruby-postgres-0.7.1 > uname -srm
    SunOS 5.8 sun4u

    /tmp/vtrcs/ruby-postgres-0.7.1 > cat foo.c
    #include <sys/types.h>
    #include <sys/socket.h>
    int main(int argc, char **argv) { socket(0, 0, 0); return 0; }

    /tmp/vtrcs/ruby-postgres-0.7.1 > gcc foo.c -lsocket

    /tmp/vtrcs/ruby-postgres-0.7.1 > ruby extconf.rb --with-pgsql-dir=/usr/local/pgsql
    checking for cygwin32_socket() in -lwsock32... no
    checking for socket() in -lsocket... no
    checking for socket() in -lsys/socket... no
    checking for gethostbyname() in -linet... no
    checking for gethostbyname() in -lnsl... no
    checking for sys/un.h... yes
    checking for socket()... no
    checking for cygwin32_socket()... no


    unless i'm overlooking something totally obvious, it seems that if foo.c
    compiled using -lsocket, have_library 'socket', 'socket' should succeed and
    print 'yes'... in fact, it looks like *all* calls to have_library are
    failing, which seems unlikely... am i missing something here??

    perplexed.

    -a
    --
    ====================================
    | Ara Howard
    | NOAA Forecast Systems Laboratory
    | Information and Technology Services
    | Data Systems Group
    | R/FST 325 Broadway
    | Boulder, CO 80305-3328
    | Email: [email]ara.t.howard@noaa.gov[/email]
    | Phone: 303-497-7238
    | Fax: 303-497-7259
    | ~ > ruby -e 'p(%.\x2d\x29..intern)'
    ====================================
    ahoward Guest

  2. Similar Questions and Discussions

    1. #39167 [NEW]: oci8 compile with php on SunOS fails with undeclared symbol
      From: djdman2000 at hotmail dot com Operating system: SunOS 5.9 PHP version: 4.4.4 PHP Bug Type: Compile Failure Bug...
    2. SunOS 4.3 and Sparc20
      Hi, My system running SunOS4.3 on Sparc20. Every 1, 2 or 3 hours (randomly), the system's screen is blank, no output to screen. Then receiving...
    3. C++ API for SSL on SunOS 5.5
      josesony@rediffmail.com (Sony Jose) writes: Just to be a little pendantic here.. You are using an OS that existed before SSL did. But having...
    4. SunOS 4.1.4
      Please help!!!, I need SunOS 4.1.4 CD or I can down load from internet. It is a very old operating system, I could not get from sun microsystems....
    5. How to use gnuplot on SunOS 5.7 ?
      Greetings, I have asked our sysadmin to install gnuplot from sunfreeware.com on a workstation whose uname output is: SunOS hostid 5.7...
  3. #2

    Default Re: have_library fails on SunOS 5.8 sun4u ??

    >>>>> "a" == ahoward <ahoward@fsl.noaa.gov> writes:

    a> i'm trying to compile the ruby-postgres package, and it seems that
    a> 'have_library' is not working on SunOS 5.8 sun4u??

    The problem is not in have_library

    nasun% uname -srm
    SunOS 5.8 sun4u
    nasun%

    nasun% ruby extconf.rb --with-pgsql-dir=/usr/local/pgsql
    checking for cygwin32_socket() in -lwsock32... no
    checking for socket() in -lsocket... yes
    checking for gethostbyname() in -linet... no
    checking for gethostbyname() in -lnsl... yes
    checking for sys/un.h... yes
    checking for socket()... yes
    checking for hsterror()... no
    checking for gethostname()... yes
    checking for PQsetdbLogin() in -lpq... yes
    checking for PQsetClientEncoding()... yes
    checking for pg_encoding_to_char()... no
    checking for PQescapeString()... yes
    creating Makefile
    nasun%

    Look in the file mkmf.log to see the result of the command, and why it
    fail


    Guy Decoux

    ts Guest

  4. #3

    Default Re: have_library fails on SunOS 5.8 sun4u ??

    On Fri, 27 Jun 2003, ts wrote:
    > Look in the file mkmf.log to see the result of the command, and why it
    > fail
    thanks guy:

    gcc -o conftest -I/usr/local/lib/ruby/1.6/sparc-solaris2.8 -g -O2
    -I/usr/local/include -I/usr/local/pgsql /include -Wl,-E
    -L/usr/local/pgsql/lib conftest.c -lwsock32 -lc -ldl -lcrypt -lm
    /usr/ccs/bin/ld: illegal option -- E

    looks like rbconfig thinks the linker options need -E. anyone know a clean
    way around this?

    -a

    >
    >
    > Guy Decoux
    >
    >
    -a
    --
    ====================================
    | Ara Howard
    | NOAA Forecast Systems Laboratory
    | Information and Technology Services
    | Data Systems Group
    | R/FST 325 Broadway
    | Boulder, CO 80305-3328
    | Email: [email]ara.t.howard@noaa.gov[/email]
    | Phone: 303-497-7238
    | Fax: 303-497-7259
    | ~ > ruby -e 'p(%.\x2d\x29..intern)'
    ====================================
    ahoward Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139