Build failed on osx

e$B31$H$$$$$^$9!#e(B

OSXe$B>e$Ge(BCVS
HEADe$B$Ne(Bruby(1.9e$B7Oe(B)e$B$N%S%k%I$K<:GT$7$F:$$C$F$$$^$9!#e(B

e$B%3%s%Q%$%k$,$G$-$J$$$N$G$J$/$F!“e(BMakefilee$B$K$J$K$+LdBj$,$”$k$h$&$J5$$,$7$^$9!#e(B

$ make
gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c array.c
gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c ascii.c

e$BN,e(B

gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c dmyext.c
ar rcu libruby19-static.a array.o ascii.o bignum.o class.o compar.o
dir.o dln.o enum.o enumerator.o error.o euc_jp.o eval.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 prec.o random.o range.o re.o regcomp.o regenc.o regerror.o
regexec.o regparse.o ruby.o signal.o sjis.o sprintf.o st.o string.o
struct.o time.o utf8.o util.o variable.o version.o dmyext.o
gcc -g -O2 -pipe -fno-common -DRUBY_EXPORT -I. -I. -c main.c
gcc main.o libruby19-static.a -ldl -lobjc -o miniruby -g -O2 -pipe
-fno-common -DRUBY_EXPORT
/usr/bin/ld: warning multiple definitions of symbol _setregid
libruby19-static.a(process.o) definition of _setregid in section
(__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/…/…/…/libdl.dylib(setregid.So)
definition of _setregid
/usr/bin/ld: warning multiple definitions of symbol _setreuid
libruby19-static.a(process.o) definition of _setreuid in section
(__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/…/…/…/libdl.dylib(setreuid.So)
definition of _setreuid
rbconfig.rb updated
make: *** [all] Illegal instruction

make, autoconfe$B$N%P!<%8%g%s$O<!$NDL$j$G$9!#e(B

$ uname -a
Darwin cinq.local 8.7.0 Darwin Kernel Version 8.7.0: Fri May 26 15:20:53
PDT 2006; root:xnu-792.6.76.obj~1/RELEASE_PPC Power Macintosh powerpc

$ make --version
GNU Make 3.80
Copyright © 2002 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.

$ autoconf -V
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim Demaille.

Copyright © 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.

OSXe$B$G%S%k%I$5$l$F$$$kJ}$OB?$$$h$&$K;W$$$^$9!#e(B
e$B%S%k%I$9$k%R%s%H$,$"$C$?$i65$($F$/$@$5$$$^$;!#e(B

e$B6aF#$H?=$7$^$9!#e(B

On 2006/09/03, at 1:39, Masatoshi SEKI wrote:

pipe -fno-common -DRUBY_EXPORT
rbconfig.rb updated
make: *** [all] Illegal instruction

-Wl,-multiply_defined,suppress
e$B$G$I$&$G$7$g$&e(B? (configure.ine$B$N%Q%C%A$r$3$N%a!<%k$N:G8e$Ke(B
e$B$D$1$^$7$?e(B)
e$B$A$J$_$Ke(Bcvse$B$=$N$^$^$G$b!"e(Bintel iMace$B$G$Oe(Bwarning
e$B$O=P$k$b$N$N%S%k%I$G$-$k$h$&$G$9!#e(B


e$B6aF#=<90e(B
[email protected]

— configure.in.orig 2006-09-03 11:47:27.000000000 +0900
+++ configure.in 2006-09-03 11:47:57.000000000 +0900
@@ -980,7 +980,7 @@
: ${LDFLAGS=""}
rb_cv_dlopen=yes ;;
darwin*) : ${LDSHARED=‘cc -dynamic -bundle -undefined
suppress -flat_namespace’}

  •                   : ${LDFLAGS=""}
    
  •                   : ${LDFLAGS="-Wl,-multiply_defined,suppress"}
                       : ${LIBPATHENV=DYLD_LIBRARY_PATH}
                       rb_cv_dlopen=yes ;;
        aix*)           if test "$GCC" = yes; then

e$B31$H$$$$$^$9!#e(B

On 2006/09/03, at 11:51, Mitsuhiro Kondo wrote:

/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/…/…/…/libdl.dylib(setreuid.So) definition of _setreuid
rbconfig.rb updated
make: *** [all] Illegal instruction

-Wl,-multiply_defined,suppress
e$B$G$I$&$G$7$g$&e(B? (configure.ine$B$N%Q%C%A$r$3$N%a!<%k$N:G8e$K$D$1$^$7$?e(B)
e$B$A$J$_$Ke(Bcvse$B$=$N$^$^$G$b!"e(Bintel iMace$B$G$Oe(Bwarninge$B$O=P$k$b$N$N%S%k%I$G$-$k$h$&$G$9!#e(B

e$B$"$j$,$H$&$4$6$$$^$9!#e(B
e$B$G$b$&$^$/$$$-$^$;$s$G$7$?!#e(B

Illegal instructione$B$C$F$$$&$N$O!“e(Bmakee$B$,=PNO$7$F$k$N$+$7$i!#e(B
Makefilee$B$K$J$K$+LdBj$,$”$k$N$+$J$"!#e(B

In article [email protected],
Masatoshi SEKI [email protected] writes:

Illegal instructione$B$C$F$$$&$N$O!"e(Bmakee$B$,=PNO$7$F$k$N$+$7$i!#e(B

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28197
e$B$8$c$J$$$G$9$+!#e(B

e$BKNIt$G$9!#$b$N$9$4!<$/A0$N%a!<%k$KJV?.$7$^$9$,!"e(B

Tanaka A. wrote:

Illegal instructione$B$C$F$$$&$N$O!"e(Bmakee$B$,=PNO$7$F$k$N$+$7$i!#e(B

28197 – longjmp and alloca cause bus error at -O0
e$B$8$c$J$$$G$9$+!#e(B

e$B$I$&$K$b$J$*$k$h$&$J5$G[$,$“$j$^$;$s!#e(B
e$B$$$$$+$2$sJ|CV$5$l$F$k$N$Ge(BRubye$B$N$[$&$GBP1~$9$k$N$,$$$$$H;W$$$^$9!#e(B
AC_DEFINE_UNQUOTED(alloca,
alloca)e$B$A$e$&$N$,@5$7$$5-=R$J$N$+$K4X$7$F$O<ce(B
e$B43$N5DO@$NM>CO$,$”$k5$$,$7$^$9$,!“$H$j$”$($:$3$l$Ge(Bmake
teste$B$,DL$k$H$3$me(B
e$B$^$G$$$/$N$O3NG’$7$^$7$?!#e(B

Sun Oct 22 05:20:34 2006 URABE Shyouhei [email protected]

    * configure.in: alloca is broken; use C_ALLOCA instead.
      [ruby-dev:29416]

Index: configure.in

RCS file: /src/ruby/configure.in,v
retrieving revision 1.312
diff -u -p -3 -r1.312 configure.in
— configure.in 12 Aug 2006 06:56:06 -0000 1.312
+++ configure.in 21 Oct 2006 19:49:49 -0000
@@ -515,7 +515,17 @@ fi
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
-AC_FUNC_ALLOCA
+case “${target_cpu}-${target_os}” in
+powerpc-darwin*)

  • AC_LIBSOURCES(alloca.c)
  • AC_SUBST([ALLOCA], [${LIBOBJDIR}alloca.${ac_objext}])
  • AC_DEFINE(C_ALLOCA)
  • AC_DEFINE_UNQUOTED(alloca, alloca)
  • ;;
    +*)
  • AC_FUNC_ALLOCA
  • ;;
    +esac
    AC_FUNC_MEMCMP
    AC_REPLACE_FUNCS(dup2 memmove strcasecmp strncasecmp strerror strftime
    strchr strstr strtoul crypt flock\

Yukihiro M. wrote:

e$B<h$j9~$`$N$Oe(B1.9e$B$@$1$8$c$J$/$Fe(B1.8e$B$b$G$9$h$M!#e(B

e$B$O$$!#%Q%C%AEv$F$?>uBV$Ge(B1.8e$B$G$Oe(B0F0Ee$B$G$9!#e(B

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

In message “Re: [ruby-dev:29681] Re: build failed on osx”
on Sun, 22 Oct 2006 09:02:45 +0900, URABE Shyouhei
[email protected] writes:

|e$BKNIt$G$9!#$b$N$9$4!<$/A0$N%a!<%k$KJV?.$7$^$9$,!"e(B

e$B$9$0$=$P$K$$$k$s$@$+$iD>@\J9$1$h$C$F5$$b$7$J$$$G$b$J$$$s$G$9e(B
e$B$3$l$I$b!#e(B

|e$B$$$$$+$2$sJ|CV$5$l$F$k$N$Ge(BRubye$B$N$[$&$GBP1~$9$k$N$,$$$$$H;W$$$^$9!#e(B
|AC_DEFINE_UNQUOTED(alloca, alloca)e$B$A$e$&$N$,@5$7$$5-=R$J$N$+$K4X$7$F$O<ce(B
|e$B43$N5DO@$NM>CO$,$“$k5$$,$7$^$9$,!”$H$j$"$($:$3$l$Ge(Bmake teste$B$,DL$k$H$3$me(B
|e$B$^$G$$$/$N$O3NG’$7$^$7$?!#e(B
|
|Sun Oct 22 05:20:34 2006 URABE Shyouhei [email protected]
|
| * configure.in: alloca is broken; use C_ALLOCA instead.
| [ruby-dev:29416]

e$B<h$j9~$`$N$Oe(B1.9e$B$@$1$8$c$J$/$Fe(B1.8e$B$b$G$9$h$M!#e(B

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

In message “Re: [ruby-dev:29683] Re: build failed on osx”
on Sun, 22 Oct 2006 23:22:44 +0900, URABE Shyouhei
[email protected] writes:

|Yukihiro M. wrote:
|> e$B<h$j9~$`$N$Oe(B1.9e$B$@$1$8$c$J$/$Fe(B1.8e$B$b$G$9$h$M!#e(B
|>
|e$B$O$$!#%Q%C%AEv$F$?>uBV$Ge(B1.8e$B$G$Oe(B0F0Ee$B$G$9!#e(B

e$BN>J}$H$b%3%_%C%H$7$^$9!#e(B