Ruby 1.8.3 Build error on AIX 5.2 with gcc 3.4.4

Discussion in 'Ruby' started by Philippe Lucas, Jun 1, 2005.

  1. Hello,

    I've found errors on AIX 5.2 with gcc 3.4.4 :

    -A) Configuration errors :
    -1) Bind error in ext/bigdecimal because the file ruby.imp doesn't
    exist. In the main Makefile, $(RBCONFIG) target needs $(ARCHFILE). You can
    have the line :
    $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP) $(ARCHFILE)

    -B) Compiler errors :
    -1) ext/readline.c line 13 : <unistd.h> includes some 64 bits features
    if the configuration program set the macro __LARGE_FILES. So, if you don't
    use 64 bits file acces you have to add "#undef __LARGE_FILES" in line 13
    just before #include <unistd.h>

    -C) Linker errors :
    -1) Configuration program set LDFLAGS = ${CFLAGS} -brtl. This is an
    error. In gcc the correct parameter is -Wl,-brtl.

    -D) Warning messages :
    -1) On my system, configure:3866 produces the _ALL_SOURCE macro which is
    defined in <standards.h>:144 from <error.h>:37. So i can suppress it in the
    config.h but it is a uggly patch !!

    Philippe Lucas
     
    Philippe Lucas, Jun 1, 2005
    #1
    1. Advertising

  2. Philippe Lucas

    Guest

    Hi,

    At Thu, 2 Jun 2005 02:05:12 +0900,
    Philippe Lucas wrote in [ruby-talk:144239]:
    > I've found errors on AIX 5.2 with gcc 3.4.4 :
    >
    > -A) Configuration errors :
    > -1) Bind error in ext/bigdecimal because the file ruby.imp doesn't
    > exist. In the main Makefile, $(RBCONFIG) target needs $(ARCHFILE). You can
    > have the line :
    > $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP) $(ARCHFILE)


    Sorry, I removed $(ARCHFILE) from $(PREP) but forgot to let
    others depend on it.

    > -B) Compiler errors :
    > -1) ext/readline.c line 13 : <unistd.h> includes some 64 bits features
    > if the configuration program set the macro __LARGE_FILES. So, if you don't
    > use 64 bits file acces you have to add "#undef __LARGE_FILES" in line 13
    > just before #include <unistd.h>


    Can't readline compile with 64 bits file access?

    > -C) Linker errors :
    > -1) Configuration program set LDFLAGS = ${CFLAGS} -brtl. This is an
    > error. In gcc the correct parameter is -Wl,-brtl.


    I see.

    > -D) Warning messages :
    > -1) On my system, configure:3866 produces the _ALL_SOURCE macro which is
    > defined in <standards.h>:144 from <error.h>:37. So i can suppress it in the
    > config.h but it is a uggly patch !!


    autoconf seems to add it automatically on AIX. I'm not sure
    why it conflicts. How does standards.h define it?

    Does this patch work?


    Index: common.mk
    ===================================================================
    RCS file: /cvs/ruby/src/ruby/common.mk,v
    retrieving revision 1.15
    diff -U2 -p -r1.15 common.mk
    --- common.mk 20 Apr 2005 14:22:57 -0000 1.15
    +++ common.mk 2 Jun 2005 23:48:32 -0000
    @@ -63,5 +63,5 @@ SCRIPT_ARGS = --dest-dir="$(DESTDIR)"
    EXTMK_ARGS = $(SCRIPT_ARGS) --extout="$(EXTOUT)" --extension $(EXTS) --extstatic $(EXTSTATIC) --

    -all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY)
    +all: $(MKFILES) $(PREP) $(RBCONFIG) $(LIBRUBY) $(ARCHFILE)
    @$(MINIRUBY) $(srcdir)/ext/extmk.rb $(EXTMK_ARGS)
    prog: $(PROGRAM) $(WPROGRAM)
    Index: configure.in
    ===================================================================
    RCS file: /cvs/ruby/src/ruby/configure.in,v
    retrieving revision 1.277
    diff -U2 -p -r1.277 configure.in
    --- configure.in 15 May 2005 09:56:49 -0000 1.277
    +++ configure.in 2 Jun 2005 23:38:46 -0000
    @@ -227,4 +227,22 @@ AC_CHECK_SIZEOF(double, 8)
    AC_CHECK_SIZEOF(time_t, 0)

    +AC_DEFUN(RUBY_TRY_CFLAGS,
    +[{
    +cflags_ok=
    +if test "${CFLAGS+set}"; then
    + save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS [$1]"
    +else
    + unset save_CFLAGS; CFLAGS="[$1]"
    +fi
    +AC_TRY_COMPILE([], [], [cflags_ok=yes], [cflags_ok=no])
    +if test "${save_CFLAGS+set}"; then
    + CFLAGS="$save_CFLAGS"
    + unset save_CFLAGS
    +else
    + unset CFLAGS
    +fi
    +test $cflags_ok = yes
    +}])
    +
    for id in pid_t gid_t uid_t; do
    AC_CHECK_TYPE($id, [typ=$id], [typ=int])
    @@ -936,6 +954,11 @@ if test "$with_dln_a_out" != yes; then
    aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
    XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
    - DLDFLAGS='-brtl -eInit_$(TARGET) -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 '"$DLDFLAGS"
    - LDFLAGS="-brtl $LDFLAGS"
    + DLDFLAGS='-eInit_$(TARGET) -bI:$(topdir)/ruby.imp -bM:SRE -T512 -H512 '"$DLDFLAGS"
    + flag=-brtl
    + test "$GCC" = yes && flag=-Wl,$flag
    + if RUBY_TRY_CFLAGS(-brtl); then
    + DLDFLAGS="-brtl $DLDFLAGS"
    + LDFLAGS="-brtl $LDFLAGS"
    + fi
    : ${ARCHFILE="ruby.imp"}
    TRY_LINK='$(CC) $(LDFLAGS) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS) $(CFLAGS)'


    --
    Nobu Nakada
     
    , Jun 3, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ClownPleco

    putenv for AIX and ifdef for AIX

    ClownPleco, Aug 22, 2007, in forum: C Programming
    Replies:
    5
    Views:
    1,177
    Thomas Dickey
    Aug 24, 2007
  2. Philippe Lucas
    Replies:
    4
    Views:
    233
    KUBO Takehiro
    Jun 29, 2005
  3. Replies:
    5
    Views:
    219
    Philippe Lucas
    Jul 8, 2005
  4. Manas Dadarkar

    Ruby 1.8.4 build failure on AIX 5.3

    Manas Dadarkar, Feb 4, 2007, in forum: Ruby
    Replies:
    0
    Views:
    133
    Manas Dadarkar
    Feb 4, 2007
  5. Victor Reyes
    Replies:
    3
    Views:
    154
    Gerardo Santana Gómez Garrido
    May 3, 2008
Loading...

Share This Page