Fwd: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 wit

Redminee$B4IM}MQ%W%m%8%’%/%H$KJs9p$5$l$F$7$^$C$?$N$GE>Aw$7$^$9!#e(B

---------- e$BE>Aw%a%C%;!<%8e(B ----------
From: Joel S. [email protected]
e$BF|IUe(B: 2009/08/09 7:55
e$B7oL>e(B: [redmine4ruby-lang:253] [Bug #1914] ruby-1.9.1-p243 failed
to
build from source on aix 5.3 with gcc 4.2.0
To: [email protected]

Bug #1914: ruby-1.9.1-p243 failed to build from source on aix 5.3 with
gcc 4.2.0
http://redmine.ruby-lang.org/issues/show/1914

e$B5/I<<Te(B: Joel S.
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal

Hello all,

I very fall in love of ruby programming language when I discover it
some years ago (iirc it was release 1.6) and when in a few days, even
thought I am not a programmer, I was able to rewrite in ruby a ksh
script of mine about 10 time faster ;<)

Today I would like to use it on the platform Aix which I am now in
charge to manage as system engineer.

I reach to compile release 1.8.7-p160 and later but without kernel
pthread support, also would I like to test 1.9 if it better support
those native pthread.

Unfortunately, it failed to build with this first issue:
/opt/freeware/bin/gcc -fno-strict-aliasing -gxcoff -fsigned-char
-D_LINUX_SOURCE_COMPAT -D_REENTRANT -O2 -g -Wall -Wno-parentheses
-I. -I.ext/include/powerpc-aix5
.3.0.0 -I./include -I. -DRUBY_EXPORT -D_LINUX_SOURCE_COMPAT -o
dmyext.o -c dmyext.c
/opt/freeware/bin/gcc -fno-strict-aliasing -gxcoff -fsigned-char
-D_LINUX_SOURCE_COMPAT -D_REENTRANT -O2 -g -Wall -Wno-parentheses
-I. -I.ext/include/powerpc-aix5
.3.0.0 -I./include -I. -DRUBY_EXPORT -D_LINUX_SOURCE_COMPAT -o
encoding.o -c encoding.c
make: Circular prelude.c <- .rbconfig.time dependency dropped.
make: Circular prelude.c <- miniruby dependency dropped.
./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb -I.
-rrbconfig ./tool/compile_prelude.rb ./prelude.rb ./enc/prelude.rb .
/gem_prelude.rb prelude.c
make: ./miniruby: Command not found
make: *** [prelude.c] Error 127

With Google I read this thread:
http://www.ruby-forum.com/topic/135197
well the patch aix.diff it contains and apply:

diff -Naur ruby-1.9.1-p243.orig/common.mk ruby-1.9.1-p243/common.mk
— ruby-1.9.1-p243.orig/common.mk 2009-05-04 12:31:23.000000000
+0000
+++ ruby-1.9.1-p243/common.mk 2009-08-07 13:04:27.000000000 +0000
@@ -160,8 +160,8 @@
@$(RM) [email protected]
$(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
$(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)[email protected] $(LDFLAGS) $(XLDF
LAGS)

-ruby.imp: $(OBJS)

  •   @$(NM) -Pgp $(OBJS) | awk 'BEGIN{print "#!"};
    

$$2~/^[BD]$$/{print $$1}’ | sort -u -o [email protected]
+ruby.imp: $(COMMONOBJS)

  •   @$(NM) -Pgp $(COMMONOBJS) | awk 'BEGIN{print "#!"};
    

$$2~/^[BD]$$/{print $$1}’ | sort -u -o [email protected]

install: install-nodoc $(RDOCTARGET)
install-all: install-nodoc install-doc

which help me to go a bit ahead but finaly failed as follow:

make[1]: Entering directory
`/lppdir/stage/ruby1.9/ruby-1.9.1-p243/ext/dl’
/opt/freeware/bin/gcc -I. -I…/…/.ext/include/powerpc-aix5.3.0.0
-I…/…/./include -I…/…/./ext/dl -DRUBY_EXTCONF_H=“extconf.h”
-D_LINUX_SOURCE_COMPAT -D_LARGE_FILES=1 -fno-strict-aliasing -gxcoff
-fsigned-char -D_LINUX_SOURCE_COMPAT -D_REENTRANT -O2 -g -Wa
ll -Wno-parentheses -fno-defer-pop -fno-omit-frame-pointer -o
cfunc.o -c cfunc.c
generating callback.h
/lppdir/stage/ruby1.9/ruby-1.9.1-p243/.ext/powerpc-aix5.3.0.0/enc/encdb.so:
[BUG] Segmentation fault
ruby 1.9.1p243 (2009-07-16 revision 24175) [powerpc-aix5.3.0.0]

– control frame ----------
c:0003 p:-134605378 s:0006 b:0006 l:000005 d:000005 TOP
c:0002 p:-134599490 s:0004 b:0004 l:000003 d:000003 TOP
c:0001 p:0000 s:0002 b:0002 l:00265c d:00265c TOP

– Ruby level backtrace
information-----------------------------------------

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

make[1]: *** [callback.h] IOT/Abort trap (core dumped)
make[1]: Leaving directory
`/lppdir/stage/ruby1.9/ruby-1.9.1-p243/ext/dl’
make: *** [mkmain.sh] Error 1

Well I also read this thread related also related to 1.9 but with xlC
compiler:
http://www.ruby-forum.com/topic/180444

but as I am not a programmer, I am not familiar with any gdb or dbx
and I doesn’t understand how Graham reach to compile ruby1.9.

That said, I noticed another error in the make step:
/opt/freeware/bin/gcc -shared -Wl,-G -Wl,-bnoentry -Wl,-bE:ruby.imp
-Wl,-brtl -Wl,-blibpath:/opt/mce-pware/lib:/usr/lib:/lib dln.
o encoding.o prelude.o array.o bi
gnum.o class.o compar.o complex.o dir.o enum.o enumerator.o error.o
eval.o load.o proc.o file.o gc.o hash.o inits.o io.o marshal.o
math.o numeric.o object.o pack.o
parse.o process.o random.o range.o rational.o re.o regcomp.o regenc.o
regerror.o regexec.o regparse.o regsyntax.o ruby.o safe.o sig
nal.o sprintf.o st.o strftime.o s
tring.o struct.o time.o transcode.o util.o variable.o version.o
compile.o debug.o iseq.o vm.o vm_dump.o thread.o cont.o ascii.o us_
ascii.o unicode.o utf_8.o newline
.o flock.o strlcpy.o strlcat.o dmyext.o -lm -lc -o libruby.so.1.9.1
/usr/bin/w64: Not a recognized flag: L
Usage: /usr/bin/w64 [ -hlsuwX ] [ user ]
make: [libruby.so.1.9.1] Error 1 (ignored)

I was worry why ‘w’ was used here and see that it comes from Makefile:
Makefile
$(LIBRUBY_SO):
@-$(PRE_LIBRUBY_UPDATE)
$(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS)
$(OUTFLAG)[email protected]
-$(OBJCOPY) -w -L ‘Init_*’ [email protected]
@-$(MINIRUBY) -e ‘ARGV.each{|link| File.delete link if
File.exist? link;
File.symlink
“$(LIBRUBY_SO)”, link}’
$(LIBRUBY_ALIASES) || true

but I didn’t install binutils (I read somewhere it wasn’t recommended)
so:

SET_LC_MESSAGES = env LC_MESSAGES=C
OBJDUMP =
OBJCOPY =
VCS = echo cannot
VCSUP = $(VCS)

But this error is ‘ignored’ so may be not related to the previous
“[BUG] Segmentation fault” above, though?

That said, all comments, advise will be welcome.

Thanks in advance,
J.


http://redmine.ruby-lang.org


archive-> http://qwik.jp/redmine4ruby-lang/145.html
ML-> [email protected]

金本と申します。

2009/8/9 Yugui [email protected]:

Redmineç®¡ç†ç”¨ãƒ—ãƒ­ã‚¸ã‚§ã‚¯ãƒˆã«å ±å‘Šã•ã‚Œã¦ã—ã¾ã£ãŸã®ã§è»¢é€ã—ã¾ã™ã€‚

AIXでruby 1.9 を使う時の話がいくつかあがっているのですが、
ã¨ã‚Šã‚ãˆãšæœ€åˆã«è¦‹ã¤ã‘ãŸã“ã‚Œã«èª¿ã¹ãŸã“ã¨ã‚’å ±å‘Šã•ã›ã¦ã„ãŸã ãã¾ã™ã€‚

rubyのコードの中で、dln.cにAIX固有のコードがあります。
おそらくですが、昔のAIXでdlopenがうまく動かなかったか、なかったときのものと思います。
1.9では#1914,#2063,#2064ã®ã‚ˆã†ãªã“ã¨ãŒãŠãã‚‹ä¸€å› ã«ãªã£ã¦ã„ã¾ã™ã€‚

というところで提案なのですが、このAIX固有のコードではなく、ほかのPlatformのように
dlopenを使うように変更するというのはいかがでしょうか??
最近のAIX(とりあえず5.2と5.3)では添付のパッチでmake testはパスしました。

ほかにも課題はたくさんあるのですが、このパッチで上述の三つの問題は、
とりあえず手元では解決します。

nmでエクスポートする関数を列挙したファイルをつくってリンク時に使用することを止めて、
-bexpallというオプションを代わりに利用したりしてあります。#1914や#2064に対応できます。
ほかのPlatformへの影響はないように気をつけたつもりです。
1.9.1p243とtrunkへのパッチです。

ただ、要するに昔のAIX用のコードがなくなることがどう古いAIXに影響するか
わかりません。コードを生かせるようにしようと思ったのですが、
å¤ã„æƒ…å ±ãŒæ‰‹ã«å…¥ã‚‰ãªã‹ã£ãŸã®ã¨ã€æ‰‹ã«å…¥ã£ã¦ã‚‚è©¦ã™ç’°å¢ƒãŒãªã„ã®ã§ã€
あきらめてしまいました。

いかがでしょうか?

[email protected]$G$9!#e(B

At Wed, 9 Sep 2009 02:48:23 +0900,
Yutaka K. wrote in [ruby-dev:39264]:

rubye$B$N%3!<%I$NCf$G!“e(Bdln.ce$B$Ke(BAIXe$B8GM-$N%3!<%I$,$”$j$^$9!#e(B
e$B$$=$i$/$G$9$,!"@N$Ne(BAIXe$B$Ge(Bdlopene$B$,$&$^$/F0$+$J$+$C$?$+!"$J$+$C$?$H$-$N$b$N$H;W$$$^$9!#e(B
1.9e$B$G$Oe(B#1914,#2063,#2064e$B$N$h$&$J$3$H$,$
$-$k0l0x$K$J$C$F$$$^$9!#e(B

e$B$$$D$+$ie(Bdlopene$B$,DI2C$5$l$?$+$o$+$j$^$;$s$+!#e(B

nme$B$G%(%/%9%]!<%H$9$k4X?t$rNs5s$7$?%U%!%$%k$r$D$/$C$F%j%s%/;~$K;HMQ$9$k$3$H$r;_$a$F!“e(B
-bexpalle$B$H$$$&%*%W%7%g%s$rBe$o$j$KMxMQ$7$?$j$7$F$”$j$^$9!#e(B#1914e$B$de(B#2064e$B$KBP1~$G$-$^$9!#e(B
e$B$[$+$Ne(BPlatforme$B$X$N1F6A$O$J$$$h$&$K5$$r$D$1$?$D$b$j$G$9!#e(B

Init_e$B$J$I$r$O$8$a$H$7$F!“8x3+$9$kI,MW$N$J$$4X?t$O$G$-$l$Pe(Bexport
e$B$7$J$$$h$&$K$7$?$$$H;W$C$F$$$^$9!#e(BYuguie$B$5$s$K$b!“e([email protected]<(e(B
e$B$5$l$F$$$J$$4X?t$O8x3+e(BAPIe$B$H8+$J$9$h!”$H6<$+$5$l$F$$$k$N$G!#e(B
objcopye$B$,$J$/$F$b:Q$`$h$&$K!”%j%s%+%*%W%7%g%s$G$G$-$k$N$G$"$l$Pe(B
MS-Windows(e$B4^e(Bcygwin)e$B$de(BDarwine$B$N$h$&$K$=$3$G=hM}$7$?$$$N$G$9$,!#e(B

金本と申します。

ご返答ありがとうございます。

金本さんはコミット権欲しいですか?
いただけるならとてもうれしいです。
ãŸã ã€ä¸­ç”°ã•ã‚“ã«å¾¡æŒ‡æ‘˜é ‚ã„ãŸã‚ˆã†ã«ã€ã‚ã‹ã£ã¦ã„ãªã„ã“ã¨ãŒã‚ã‚‹ã®ã§ã€
ã‚‚ã—é ‚ã‘ã¦ã‚‚åŸºæœ¬çš„ã«MLで問い合わせをした上で、
了解を得られたらコミットの作業はこちらでするというふうに
ã•ã›ã¦é ‚ããŸã„ã¨æ€ã„ã¾ã™ã€‚
そんなことでいいでしょうか?

いつからdlopenãŒè¿½åŠ ã•ã‚ŒãŸã‹ã‚ã‹ã‚Šã¾ã›ã‚“ã‹ã€‚
AIXのV4のどこかで入ったようです。
4.3.3を昔触ったときに動いていたプログラムで使われていたと思います。
ruby-devの過去のメールを見ると、どうも4.1ã¨ã‹ã‚‚ã£ã¨å¤ã„é ƒã®ã‚ˆã†ãªæ°—ãŒã—ã¾ã™ã€‚

Init_などをはじめとして、公開する必要のない関数はできればexport
しないようにしたいと思っています。Yuguiさんにも、internalと明示
されていない関数は公開APIと見なすよ、と脅かされているので。
objcopyがなくても済むように、リンカオプションでできるのであれば
MS-Windows(含cygwin)やDarwinのようにそこで処理したいのですが。
添付のパッチでは、expallをやめて、nmの出力からInit_つきのものを
抜いたファイルを作ってエクスポートするようにしてみたのですが、
いかがでしょうか?
ついでに今回はエクスポートなので、.expに変えてみました。

よろしくお願いいたします。

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:39276] Re: Fwd: [redmine4ruby-lang:253] [Bug
#1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc
4.2.0”
on Wed, 9 Sep 2009 23:20:59 +0900, Yutaka K.
[email protected] writes:

|>e$B6bK$5$s$O%3%%C%H8"M$7$$$G$9$+!)e(B
|[email protected]$1$k$J$i$H$F$b$&$l$7$$$G$9!#e(B
|[email protected]!“CfED$5$s$K8f;XE&D:$$$?$h$&$K!”$o$+$C$F$$$J$$$3$H$,$"$k$N$G!"e(B
|e$B$b$7D:$1$F$b4pK\E*$Ke(BMLe$B$GLd$$9g$o$;$r$7$?>e$G!"e(B
|e$BN;[email protected]$i$l$?$i%3%_%C%H$N:n6H$O$3$A$i$G$9$k$H$$$&$U$&$Ke(B
|e$B$5$;$FD:$-$?$$$H;W$$$^$9!#e(B
|e$B$=$s$J$3$H$G$$$$$G$7$g$&$+!)e(B

e$B$b$A$m$s!#$=$NJ}$,$"$j$,$?$$$G$9!#e(B

[email protected] e$B$Ke(B

  • e$B4uK>$9$k%f!<%6L>e(B([email protected] e$B$Ne(B xxxe$BItJ,e(B)
  • e$B$=$N%"%I%l%9$+$iE>Aw$9$k%"%I%l%9e(B(From:e$B$H0[$J$k>l9ge(B)
  • SSH2e$B$N8x3+80e(B

e$B$re(BGPGe$B$G=pL>$7$FAw$C$F$/[email protected]$5$$!#$d$dLLE]$G$9$,$h$m$7$/$*4j$$e(B
e$B$7$^$9!#e(B

|e$BE:IU$N%Q%C%A$G$O!"e(Bexpalle$B$r$d$a$F!"e(Bnme$B$N=PNO$+$ie(BInit_e$B$D$-$N$b$N$re(B
|e$BH4$$$?%U%!%$%k$r:n$C$F%(%/%9%]!<%H$9$k$h$&$K$7$F$$?$N$G$9$,!"e(B
|e$B$$$+$,$G$7$g$&$+!)e(B
|e$B$D$$$G$K:#2s$O%(%/%9%]!<%H$J$N$G!"e(B.expe$B$KJQ$($F$
$^$7$?!#e(B
|
|e$B$h$m$7$/$*4j$$$$$?$7$^$9!#e(B

e$B$I$&$7$^$7$g$&$+$M!#;d$G$3$l$r%3%%C%H$7$F$b$+$^$$$^$;$s$,!"e(B
e$B%3%
%C%H8"$NOC$,?J$$=$&$J$N$G!"$4<+J,$G%3%%C%[email protected]$/e(B
e$BJ}$,$h$$$+$b$7$l$^$;$s$M!#e(B

[email protected]$G$9!#e(B

e$B$^$:!"$3$Ne(Bdlopene$B$N7o$H<!$N%7%s%%k$NOC$O$o$1$k$Y$-$G$O$J$$$+$H!#e(B

At Wed, 9 Sep 2009 23:20:59 +0900,
Yutaka K. wrote in [ruby-dev:39276]:

e$B$$$D$+$ie(Bdlopene$B$,DI2C$5$l$?$+$o$+$j$^$;$s$+!#e(B
AIXe$B$Ne(BV4e$B$N$I$3$+$GF~$C$?$h$&$G$9!#e(B
[email protected]?($C$?$H$-$KF0$$$F$$$?%W%m%0%i%`$G;H$o$l$F$$$?$H;W$$$^$9!#e(B
ruby-deve$B$N2a5n$N%a!<%k$r8+$k$H!"$I$&$be(B4.1e$B$H$+$b$C$H8E$$:"$N$h$&$J5$$,$7$^$9!#e(B

http://en.wikipedia.org/wiki/IBM_AIX#Versions
e$B$r8+$k$H!"e(B4.1e$B$Oe(B
1994e$BG/$G$9$M!#e(B

e$B$=$l$H!"e(B[ruby-talk:331649]e$B$N$h$&$J$3$H$be(Bdlopene$B$r;H$&$h$&$K$9$l$Pe(B
e$BITMW$J$N$G$7$g$&$+!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:39264] Re: Fwd: [redmine4ruby-lang:253] [Bug
#1914] ruby-1.9.1-p243 failed to build from source on aix 5.3 with gcc
4.2.0”
on Wed, 9 Sep 2009 02:48:23 +0900, Yutaka K.
[email protected] writes:

|AIXe$B$Ge(Bruby 1.9 e$B$r;H$&;~$NOC$,$$$/$D$+$"$,$C$F$$$k$N$G$9$,!“e(B
|e$B$H$j$”$($::G=i$K8+$D$1$?$3$l$KD4$Y$?$3$H$rJs9p$5$;[email protected]$-$^$9!#e(B
|
|rubye$B$N%3!<%I$NCf$G!“e(Bdln.ce$B$Ke(BAIXe$B8GM-$N%3!<%I$,$”$j$^$9!#e(B
|e$B$$=$i$/$G$9$,!"@N$Ne(BAIXe$B$Ge(Bdlopene$B$,$&$^$/F0$+$J$+$C$?$+!"$J$+$C$?$H$-$N$b$N$H;W$$$^$9!#e(B
|1.9e$B$G$Oe(B#1914,#2063,#2064e$B$N$h$&$J$3$H$,$
$-$k0l0x$K$J$C$F$$$^$9!#e(B
|
|e$B$H$$$&$H$3$m$GDs0F$J$N$G$9$,!"$3$Ne(BAIXe$B8GM-$N%3!<%I$G$O$J$/!"$[$+$Ne(BPlatforme$B$N$h$&$Ke(B
|dlopene$B$r;H$&$h$&$KJQ99$9$k$H$$$&$N$O$$$+$,$G$7$g$&$+!)!)e(B
|e$B:G6a$Ne(BAIXe$B!J$H$j$"$($:e(B5.2e$B$He(B5.3e$B!K$G$OE:IU$N%Q%C%A$Ge(Bmake teste$B$O%Q%9$7$^$7$?!#e(B
|
|e$B$[$+$K$b2]Bj$O$?$/$5$s$"$k$N$G$9$,!"$3$N%Q%C%A$G>e=R$N;0$D$NLdBj$O!“e(B
|e$B$H$j$”$($:<j85$G$O2r7h$7$^$9!#e(B

e$B$b$&!"8E$$e(BAIXe$B$KBP1~$9$kI,MW$O$J$$$s$G$O$J$$$G$7$g$&$+!#e(B
e$B$3$A$i$Ge(Btrunke$B$K%3%_%C%H$7$F$*$-$^$9!#e(B

e$B6bK$5$s$O%3%%C%H8"M$7$$$G$9$+!)e(B

[email protected]$G$9!#e(B

At Wed, 9 Sep 2009 23:20:59 +0900,
Yutaka K. wrote in [ruby-dev:39276]:

Init_e$B$J$I$r$O$8$a$H$7$F!“8x3+$9$kI,MW$N$J$$4X?t$O$G$-$l$Pe(Bexport
e$B$7$J$$$h$&$K$7$?$$$H;W$C$F$$$^$9!#e(BYuguie$B$5$s$K$b!“e([email protected]<(e(B
e$B$5$l$F$$$J$$4X?t$O8x3+e(BAPIe$B$H8+$J$9$h!”$H6<$+$5$l$F$$$k$N$G!#e(B
objcopye$B$,$J$/$F$b:Q$`$h$&$K!”%j%s%+%*%W%7%g%s$G$G$-$k$N$G$"$l$Pe(B
MS-Windows(e$B4^e(Bcygwin)e$B$de(BDarwine$B$N$h$&$K$=$3$G=hM}$7$?$$$N$G$9$,!#e(B
e$BE:IU$N%Q%C%A$G$O!"e(Bexpalle$B$r$d$a$F!"e(Bnme$B$N=PNO$+$ie(BInit_e$B$D$-$N$b$N$re(B
e$BH4$$$?%U%!%$%k$r:n$C$F%(%/%9%]!<%H$9$k$h$&$K$7$F$$?$N$G$9$,!"e(B
e$B$$$+$,$G$7$g$&$+!)e(B
e$B$D$$$G$K:#2s$O%(%/%9%]!<%H$J$N$G!"e(B.expe$B$KJQ$($F$
$^$7$?!#e(B

[email protected]$H!"e(BLIBRUBY_DLDFLAGSe$B$K$Oe(B-bexpalle$B$,$D$$$Fe(B-bE:${ARCHFILE}e$B$,e(B
e$B4^$^$l$J$/$J$k$h$&$K8+$($^$9!#e(B

gcce$B$J$ie(B-gxcoffe$B$r;XDj$7$F$$$^$9$,!“e(Bman
gcce$B$G$O$J$s$H$J$/$I$3$Ge(B
e$B$be(B-ggdbe$B$r;XDj$7$F$*$1$P$h$5$=$&$J5$$b$7$J$/$b$”$j$^$;$s!#e(B

e$B$A$J$_$K!“e(B-bEe$B$K;XDj$9$k%7%s%%k$C$F!”%G!<%[email protected]$1$8$c$J$/$F%F%-%9e(B
e$B%H$K$D$$$F$bM-8z$J$s$G$7$g$&$+!#:#$N$H$3$m%F%-%9%H%7%s%%k$OF~$le(B
e$B$F$$$J$$$O$:$J$N$G!"$b$7$+$7$?$ie(B_Init_e$B$D$-$rF~$l$F$bF~$l$J$/$F$be(B
e$B%"%/%;%9$G$-$F$7$^$&$H$+!#e(B

Index: configure.in

— configure.in (revision 24823)
+++ configure.in (working copy)
@@ -240,11 +240,17 @@ AC_PROG_CC
AC_PROG_CXX
AC_PROG_GCC_TRADITIONAL
-test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}
if test “$GCC” = yes; then
linker_flag=-Wl,
: ${optflags=-O3}

  • case “$target_os” in
  •  when(aix*)
    
  • : ${debugflags=-gxcoff};;
  •  when(linux*|cygwin*|mingw*|darwin*)
    
  • : ${debugflags=-ggdb};;
  • esac
    else
    linker_flag=
    fi
    +test $ac_cv_prog_cc_g = yes && : ${debugflags=-g}

RUBY_PROG_GNU_LD
@@ -1606,4 +1612,7 @@ when(linux* | gnu* | kbsd-gnu | bsdi*
LDFLAGS="$LDFLAGS -rdynamic"
fi;;
+when(aix*)

  • LDFLAGS="$LDFLAGS ${linker_flag}-bmaxdata:0x80000000"
  • ;;
    esac
    LIBEXT=a
    @@ -1746,7 +1755,7 @@ if test “$with_dln_a_out” != yes; then
    LDSHARED="$LDSHARED ${linker_flag}-G"
    DLDFLAGS=’-eInit_$(TARGET)’
  •  XLDFLAGS="${linker_flag}-bE:ruby.imp ${linker_flag}-brtl"
    
  •  XLDFLAGS="${linker_flag}"'-bE:$(ARCHFILE)'" ${linker_flag}-brtl"
     XLDFLAGS="$XLDFLAGS 
    

${linker_flag}-blibpath:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"

  •  : ${ARCHFILE="ruby.imp"}
    
  •  : ${ARCHFILE="ruby.exp"}
                       TRY_LINK='$(CC) $(LDFLAGS) -oconftest 
    

$(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)’
TRY_LINK="$TRY_LINK"’ $(CFLAGS) $(src)
$(LIBPATH) $(LOCAL_LIBS) $(LIBS)’
Index: common.mk

— common.mk (revision 24823)
+++ common.mk (working copy)
@@ -170,6 +170,8 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DL
$(PURIFY) $(CC) $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
$(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)[email protected] $(LDFLAGS) $(XLDFLAGS)

-ruby.imp: $(EXPORTOBJS)

  • @$(NM) -Pgp $(EXPORTOBJS) | awk ‘BEGIN{print “#!”};
    $$2~/^[BD]$$/{print $$1}’ | sort -u -o [email protected]
    +ruby.exp: $(EXPORTOBJS)
  • @$(NM) -Pgp $(EXPORTOBJS) | \
  • awk ‘BEGIN{print “#!”}; $$2~/^[B-DST]$$/&&$$1!~/^Init/{print $$1}’
    | \
  • sort -u -o [email protected]

install: install-nodoc $(RDOCTARGET)

金本です。

2009/9/10 Nobuyoshi N. [email protected]:

なかだです。
これだと、LIBRUBY_DLDFLAGSには-bexpallがついて-bE:${ARCHFILE}が
含まれなくなるように見えます。
すみません。見落としていました。
添付のパッチでは削ってあります。

gccなら-gxcoffを指定していますが、man gccではなんとなくどこで
も-ggdbを指定しておけばよさそうな気もしなくもありません。
なぜかdbxã—ã‹é ­ã«ãªã‹ã£ãŸã®ã§ã€ãŸã‚ã—ã«gdbをコンパイルしてみたのですが、
コンパイルが失敗しました。
-ggdbでコンパイルしてdbxã‹ã‚‰èª­ã‚“ã§ã¿ãŸã®ã§ã™ãŒã€ãœã‚“ãœã‚“æƒ…å ±å–ã‚Œã¾ã›ã‚“ã§ã—ãŸã€‚

ちなみに、-bEに指定するシンボルって、データだけじゃなくてテキス
トについても有効なんでしょうか。今のところテキストシンボルは入れ
ていないはずなので、もしかしたら_Init_つきを入れても入れなくても
アクセスできてしまうとか。
簡単なプログラム書いて試したのですが、オプションによって
ãã†ãªã‚‹å ´åˆãŒã‚ã‚‹ã‚ˆã†ã§ã™ã€‚
すくなくともldの-Gというオプションつきでライブラリを作るとエクスポートしていない関数とは
リンクできませんでした。

1.9.1p243は単にコンパイルしても
make: Circular .rbconfig.time <- miniruby dependency dropped.
make: ./miniruby: Command not found
make: *** [.rbconfig.time] Error 127
がでてしまって#2064のところまでいかないので、何かいじったあとの
現象のようです。
このあと別便(多少大きいので私信で)でnmの出力を参考のために送らせていただきます。
あたまに.がついたものを抜かないとワーニングがでまくってしまいます。
いただいたパッチを少し変更してとりあえずコンパイルが終了したものを送ります。
シンボルのタイプはここに列挙されてあります。
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds4/nm.htm

e$B%A%1%C%He(B #1914 e$B$,99?7$5$l$^$7$?!#e(B (by Joel S.)

Hello all,

Sorry but I couldn’t test all stuff published on this forum
http://www.ruby-forum.com/topic/193040#841466 just because am I out of
office for some holiday ;<)

That said, I couldn’t read comments because my FireFox just shows me
garbage (I do have missed some language support, though) even though I
don’t read Japanese at all (very sorry).

Any way, I guess to have understand that making some ‘.exp’ file is
requested even thought I reach to build ruby without this file?

If I well understand this topic, I read this interesting thread imho:
http://gcc.gnu.org/ml/gcc-help/2003-07/msg00082.html
where the mentioned script:
nm -BCpg *.o | awk ‘{ if ((($2 == “T”) || ($2 == “D”) || ($2 == “B”)) &&
(substr($3,1,1) != “.”)) { print $3 } }’ | sort -u > icu.exp

seems to do the same job as the ‘CreateExportList’ of xlc (the native
AIX C compiler).

Otoh as much as I can read there are a lot of different way to create
this ‘.exp’ file and python project have this “Modules/makexp_aix”
script in its src tree for this purpose.

Thanks a lot, I will try to comeback asap with test of different
suggested patches.

J.

http://redmine.ruby-lang.org/issues/show/1914

e$B%A%1%C%He(B #1914 e$B$,99?7$5$l$^$7$?!#e(B (by Yutaka K.)

e$B%9%F!<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B

Some issues reported here is fixed by r24482 and r25124.
At least, building ruby(trunk) is finished successfully in my env(AIX
5.3).

By the way, for this ‘w’ problem:

I was worry why ‘w’ was used here and see that it comes from Makefile:
please install coreutils to avoid this problem at this point.
ftp://ftp.software.ibm.com:/aix/freeSoftware/aixtoolbox/RPMS/ppc/coreutils
AIX’s install command does not have -d option, and that caused this
message.

If crash issue still persists, please reopen this ticket with:

  1. configure options
  2. gcc version
  3. oslevel -s

Thanks and best regards,
Yutaka K.


http://redmine.ruby-lang.org/issues/show/1914

e$B6bK$H?=$7$^$9!#e(B
e$BJVEz$,CY$/$J$C$F$I$&$b$9$_$^$;$s!#e(B

e$B$^$:!"$3$Ne(Bdlopene$B$N7o$H<!$N%7%s%%k$NOC$O$o$1$k$Y$-$G$O$J$$$+$H!#e(B
e$B$O$$!#$$C$7$c$k$H$$j$G$9!#e(B
[email protected]|Aw$C$?%Q%C%A$K$bK\Bj$H30$l$kItJ,e(B(-gxcoffe$B$H$+!K$,F~$C$F$$$Fe(B
e$B$4LLE]$r$*$+$1$7$F$I$&$b$9$_$^$;$s$G$7$?!#e(B

http://en.wikipedia.org/wiki/IBM_AIX#Versions e$B$r8+$k$H!"e(B4.1e$B$Oe(B
1994e$BG/$G$9$M!#e(B
e$B$$$/$D$+$[$+$N%=%U%H$N%=!<%9$r8+$F$$?$N$G$9$,!“e(B
e$B$$$/$D$+$N%=%U%H$G$Oe(BAIXe$B$Ge(Bdlopene$B$r$D$+$C$F$$$J$$$N$,$”$j$^$7$?!#e(B
e$B#4!%#3$H$=$l0JA0$rJ,$1$F$$$k$h$&$J$N$b$"$j$^$7$?!#e(B
e$B$I$&$b8E$$e(BAIXe$B$r<N$F$k$N$,G&$S$J$$5$$,$7$F$-$?$N$G!"e(B
e$B$A$g$C$H9M$($F$
$h$&$H;W$$$^$9!#e(B

e$B$^$?!"I8=`$Ne(BCe$B$Ne(Bincludee$B%U%!%$%k$+$i%$%s%/%k!<%I$5$l$F$$$k%U%!%$%k$G!“e(B
#define _AIXVERSION_430 1
#define _AIXVERSION_431 1
#define _AIXVERSION_434 1
#define _AIXVERSION_510 1
#define _AIXVERSION_520 1
#define _AIXVERSION_530 1
#define _AIXVERSION_610 1
e$B$H$$$&$N$,$”$C$?$N$G!"8E$$$N$HF0:n$rJQ$($k$3$H$b$=$s$J$KFq$7$/$J$5$=$&$G$9!#e(B

e$B$=$l$H!“e(B[ruby-talk:331649]e$B$N$h$&$J$3$H$be(Bdlopene$B$r;H$&$h$&$K$9$l$Pe(B
e$BITMW$J$N$G$7$g$&$+!#e(B
encoding.oe$B$N4X?t$,e(Bruby.expe$B$K$J$$$H!”<j85$G$Oe(Bminirubye$B$,$J$<$+%O%s%0$7$^$7$?!#e(B
e$B$J$N$G!"$d$C$Q$j%(%/%9%]!<%H$5$l$F$$$J$$$H$^$:$=$&$G$9!#e(B
e$B<ALd$N0U?^$r$o$+$C$F$$$^$9$G$7$g$&$+!)e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs