Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Building Ruby on AIX -- again

Reply
Thread Tools

Building Ruby on AIX -- again

 
 
Matt Lawrence
Guest
Posts: n/a
 
      06-25-2004
I finally have a stable system to use to try to build Ruby. Here's the
info:

>oslevel

5.2.0.0

>gcc --version

gcc (GCC) 3.3.3
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

And here's the error I'm getting:

/usr/src/ruby-1.8.1>make
gcc -g -O2 -I. -I. -c array.c
In file included from ruby.h:671,
from array.c:15:
missing.h:81: error: conflicting types for `memmove'
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.3/include/string.h:118:
error: previous declaration of `memmove'
missing.h:95: error: conflicting types for `strcasecmp'
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.3/include/string.h:237:
error: previous declaration of `strcasecmp'
missing.h:99: error: conflicting types for `strncasecmp'
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.3/include/string.h:238:
error: previous declaration of `strncasecmp'
missing.h:112: warning: `struct tm' declared inside parameter list
missing.h:112: warning: its scope is only this definition or declaration,
which is probably not what you want
missing.h:116: warning: conflicting types for built-in function `strstr'
missing.h:126: error: conflicting types for `strtoul'
/usr/local/lib/gcc-lib/powerpc-ibm-aix5.1.0.0/3.3.3/include/stdlib.h:183:
error: previous declaration of `strtoul'
make: 1254-004 The error code from the last command is 1.

Any ideas?

-- Matt
Weinberg's Law: If builders built buildings the way that programmers wrote
programs, the first woodpecker that came along would destroy civilization.



 
Reply With Quote
 
 
 
 
nobu.nokada@softhome.net
Guest
Posts: n/a
 
      06-25-2004
Hi,

At Fri, 25 Jun 2004 09:47:04 +0900,
Matt Lawrence wrote in [ruby-talk:104501]:
> I finally have a stable system to use to try to build Ruby. Here's the
> info:
>
> >oslevel

> 5.2.0.0
>
> >gcc --version

> gcc (GCC) 3.3.3
> Copyright (C) 2003 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.


What version of ruby?

> And here's the error I'm getting:


Seems configure script failed to detect functions. Can you
show us the config.log?

--
Nobu Nakada


 
Reply With Quote
 
 
 
 
Matt Lawrence
Guest
Posts: n/a
 
      06-25-2004
On Fri, 25 Jun 2004 http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> What version of ruby?


1.8.1

> > And here's the error I'm getting:

>
> Seems configure script failed to detect functions. Can you
> show us the config.log?


It's really long. After going through the log, it looks like configure is
trying to link against libm, which doesn't exist. My guess is that
configure needs to be told what the correct library is.

I'm way outside my expertise right now, I have no clue how the configure
process actually works.

-- Matt
Weinberg's Law: If builders built buildings the way that programmers wrote
programs, the first woodpecker that came along would destroy civilization.



 
Reply With Quote
 
nobu.nokada@softhome.net
Guest
Posts: n/a
 
      06-25-2004
Hi,

At Fri, 25 Jun 2004 12:15:08 +0900,
Matt Lawrence wrote in [ruby-talk:104511]:
> > What version of ruby?

>
> 1.8.1


2003-12-25, official release?

> It's really long. After going through the log, it looks like configure is
> trying to link against libm, which doesn't exist. My guess is that
> configure needs to be told what the correct library is.


libm really doesn't exist? Then where are math functions?

--
Nobu Nakada


 
Reply With Quote
 
Matt Lawrence
Guest
Posts: n/a
 
      06-25-2004
On Fri, 25 Jun 2004 (E-Mail Removed) wrote:

> > It's really long. After going through the log, it looks like configure is
> > trying to link against libm, which doesn't exist. My guess is that
> > configure needs to be told what the correct library is.

>
> libm really doesn't exist? Then where are math functions?


Ok, I'm an idiot. I needed to install the bos.adt.* packages. Hopefully
somebody else will find this message in the archives and avoid looking
like a fool.

Now I'm down to this error:

compiling iconv
gcc -g -O2 -I. -I/usr/src/ruby-1.8.1 -I/usr/src/ruby-1.8.1
-I/usr/src/ruby-1.8.1/ext/iconv -DHAVE_ICONV_H -DICONV_INPTR_CAST="(char
**)" -I/usr/include -c iconv.c
/usr/ccs/bin/ld -brtl -eInit_iconv
-bI:/usr/src/ruby-1.8.1/ruby.imp -bM:SRE -T512 -H512 -lc
-L"/usr/src/ruby-1.8.1" -L"/usr/local/lib" -o iconv.so iconv.o -ldl
-lcrypt -lm -lc
ld: 0711-317 ERROR: Undefined symbol: .iconv_open
ld: 0711-317 ERROR: Undefined symbol: .iconv_close
ld: 0711-317 ERROR: Undefined symbol: .iconv
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
make: 1254-004 The error code from the last command is 8.

-- Matt
Weinberg's Law: If builders built buildings the way that programmers wrote
programs, the first woodpecker that came along would destroy civilization.



 
Reply With Quote
 
nobu.nokada@softhome.net
Guest
Posts: n/a
 
      06-25-2004
Hi,

At Fri, 25 Jun 2004 13:06:57 +0900,
Matt Lawrence wrote in [ruby-talk:104513]:
> compiling iconv
> gcc -g -O2 -I. -I/usr/src/ruby-1.8.1 -I/usr/src/ruby-1.8.1
> -I/usr/src/ruby-1.8.1/ext/iconv -DHAVE_ICONV_H -DICONV_INPTR_CAST="(char
> **)" -I/usr/include -c iconv.c
> /usr/ccs/bin/ld -brtl -eInit_iconv
> -bI:/usr/src/ruby-1.8.1/ruby.imp -bM:SRE -T512 -H512 -lc
> -L"/usr/src/ruby-1.8.1" -L"/usr/local/lib" -o iconv.so iconv.o -ldl
> -lcrypt -lm -lc
> ld: 0711-317 ERROR: Undefined symbol: .iconv_open
> ld: 0711-317 ERROR: Undefined symbol: .iconv_close
> ld: 0711-317 ERROR: Undefined symbol: .iconv
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> make: 1254-004 The error code from the last command is 8.


Seems like iconv library doesn't get installed. Show the
mkmf.log.

--
Nobu Nakada


 
Reply With Quote
 
Matt Lawrence
Guest
Posts: n/a
 
      06-25-2004
On Fri, 25 Jun 2004, Matt Lawrence wrote:

> Now I'm down to this error:
>
> compiling iconv
> gcc -g -O2 -I. -I/usr/src/ruby-1.8.1 -I/usr/src/ruby-1.8.1
> -I/usr/src/ruby-1.8.1/ext/iconv -DHAVE_ICONV_H -DICONV_INPTR_CAST="(char
> **)" -I/usr/include -c iconv.c
> /usr/ccs/bin/ld -brtl -eInit_iconv
> -bI:/usr/src/ruby-1.8.1/ruby.imp -bM:SRE -T512 -H512 -lc
> -L"/usr/src/ruby-1.8.1" -L"/usr/local/lib" -o iconv.so iconv.o -ldl
> -lcrypt -lm -lc
> ld: 0711-317 ERROR: Undefined symbol: .iconv_open
> ld: 0711-317 ERROR: Undefined symbol: .iconv_close
> ld: 0711-317 ERROR: Undefined symbol: .iconv
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> make: 1254-004 The error code from the last command is 8.


And the fix is shown in
http://blade.nagaokaut.ac.jp/cgi-bin...uby-talk/88697

Add -liconv to DLDFLAGS in ext/iconv/Makefile.

Any ideas on how to get configure to do the right thing for this one?

-- Matt
Weinberg's Law: If builders built buildings the way that programmers wrote
programs, the first woodpecker that came along would destroy civilization.



 
Reply With Quote
 
Matt Lawrence
Guest
Posts: n/a
 
      06-25-2004
I'm making progress. Now socket isn't being built. Here's an excerpt
from ext/socket/mkmf.log:

"gcc -o conftest -I/usr/local/lib/ruby/1.8/powerpc-aix5.2.0.0
-I/usr/local/lib/r
uby/1.8/powerpc-aix5.2.0.0 -I/usr/include -g -O2 conftest.c
-L"/usr/local/lib"
-brtl -eInit_$(TARGET) -bI:/usr/src/ruby-1.8.1/ext/socket/ruby.imp
-bM:SRE -T
512 -H512 -lc -liconv -lruby-static -lnsl -ldl -lcrypt -lm -lc"
sh: TARGET: not found.
gcc: `-b' must come at the start of the command line

I'm not sure how these commands are being built, so I don't know how to
move the -b option. Help?

-- Matt
Weinberg's Law: If builders built buildings the way that programmers wrote
programs, the first woodpecker that came along would destroy civilization.



 
Reply With Quote
 
nobu.nokada@softhome.net
Guest
Posts: n/a
 
      06-25-2004
Hi,

At Fri, 25 Jun 2004 13:29:58 +0900,
Matt Lawrence wrote in [ruby-talk:104516]:
> Add -liconv to DLDFLAGS in ext/iconv/Makefile.


It's the wrong workaround.

> Any ideas on how to get configure to do the right thing for this one?


Show the ext/iconv/mkmf.log. Otherwise I have no clue to solve
it.

--
Nobu Nakada


 
Reply With Quote
 
Matt Lawrence
Guest
Posts: n/a
 
      06-25-2004
On Fri, 25 Jun 2004 (E-Mail Removed) wrote:

> Show the ext/iconv/mkmf.log. Otherwise I have no clue to solve


]/usr/src/ruby-1.8.1/ext/iconv>cat mkmf.log
have_header: checking for iconv.h... -------------------- yes

"gcc -E -I/usr/src/ruby-1.8.1 -I/usr/src/ruby-1.8.1 -g -O2 conftest.c -o
conftest.i"
checked program was:
/* begin */
#include <iconv.h>
/* end */

--------------------

"gcc -c -I/usr/src/ruby-1.8.1 -I/usr/src/ruby-1.8.1 -g -O2 -Werror
conftest.c"
checked program was:
/* begin */
/* end */

checking for iconv() 2nd argument is const... -------------------- no

"gcc -c -I/usr/src/ruby-1.8.1 -I/usr/src/ruby-1.8.1 -g -O2 -Werror
conftest.c"
checked program was:
/* begin */

#include <iconv.h>
size_t
test(iconv_t cd, char **inptr, size_t *inlen, char **outptr, size_t
*outlen)
{
return iconv(cd, inptr, inlen, outptr, outlen);
}
/* end */

--------------------

have_library: checking for main() in -liconv... -------------------- no

"gcc -o conftest -I/usr/src/ruby-1.8.1 -I/usr/src/ruby-1.8.1 -g -O2
conftest.c -L"/usr/src/ruby-1.8.1" -L"/usr/local/lib" -brtl
-eInit_$(TARGET) -bI:/usr/src/ruby-1.8.1/ruby.imp -bM:SRE -T512 -H512 -lc
-lruby-static -liconv -ldl -lcrypt -lm -lc"
sh: TARGET: not found.
gcc: `-b' must come at the start of the command line
checked program was:
/* begin */

/*top*/
int main() { return 0; }
int t() { main(); return 0; }
/* end */

"gcc -o conftest -I/usr/src/ruby-1.8.1 -I/usr/src/ruby-1.8.1 -g -O2
conftest.c -L"/usr/src/ruby-1.8.1" -L"/usr/local/lib" -brtl
-eInit_$(TARGET) -bI:/usr/src/ruby-1.8.1/ruby.imp -bM:SRE -T512 -H512 -lc
-lruby-static -liconv -ldl -lcrypt -lm -lc"
sh: TARGET: not found.
gcc: `-b' must come at the start of the command line
checked program was:
/* begin */


/*top*/
int main() { return 0; }
int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */

--------------------



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Building Ruby 1.8.6 on AIX 5.3L miniruby segfault Vincent Legoll Ruby 2 03-03-2008 02:03 PM
putenv for AIX and ifdef for AIX ClownPleco C Programming 5 08-24-2007 02:15 PM
Ruby on AIX. Again. Matt Lawrence Ruby 0 10-28-2006 05:07 AM
Looking for AIX 5.2 binaries, IS anyone running Ruby on AIX 5.2 ?? bww00amdahl@yahoo.com Ruby 5 07-08-2005 11:54 AM
Undefined Symbols when building xerces on AIX 5.1 32 bit machine Stu XML 1 11-06-2003 02:42 PM



Advertisments