# Build failed on osx

**URL:** <https://www.ruby-forum.com/t/build-failed-on-osx/67354>\
**Category:** Development\
**Created:** [September 2, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354 "2006-09-02T18:46:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Masatoshi\_SEKI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Post date:** [September 2, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354/1 "2006-09-02T18:46:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Masatoshi\_SEKI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Post date:** [September 3, 2006, 4:53am UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354/2 "2006-09-03T04:53:45Z")

</div>

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  
removed\_email\_address@domain.invalid

— 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
```

---

<div class="post-metadata">

**Author:** ![Masatoshi\_SEKI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Post date:** [September 4, 2006, 2:43pm UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354/3 "2006-09-04T14:43:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Masatoshi\_SEKI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Post date:** [September 4, 2006, 2:43pm UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354/4 "2006-09-04T14:43:30Z")

</div>

In article [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
Masatoshi SEKI [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28197)  
e$B$8$c$J$$$G$9$+!#e(B

---

<div class="post-metadata">

**Author:** ![Masatoshi\_SEKI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Post date:** [October 22, 2006, 2:03am UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354/5 "2006-10-22T02:03:18Z")

</div>

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](http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28197)  
> 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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

```
    * 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\

---

<div class="post-metadata">

**Author:** ![Masatoshi\_SEKI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Post date:** [October 22, 2006, 4:23pm UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354/6 "2006-10-22T16:23:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Masatoshi\_SEKI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Post date:** [October 22, 2006, 6:03am UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354/7 "2006-10-22T06:03:50Z")

</div>

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  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
|  
| \* 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

---

<div class="post-metadata">

**Author:** ![Masatoshi\_SEKI](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/5f8ce5/32.png) [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Post date:** [October 22, 2006, 9:00pm UTC](https://www.ruby-forum.com/t/build-failed-on-osx/67354/8 "2006-10-22T21:00:56Z")

</div>

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  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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
