# Building of ruby-1.8.7-p248 failed.



## Werner (Apr 11, 2010)

Hi there,

as you can see, I tried to install portupgrade by using the portstree, but compiling of ruby failed. These are some lines before the error occurs and the error itself.


```
[...]
In file included from version.c:14:
version.h:29:41: warning: no newline at end of file
cc -I/usr/include -O2 -fno-strict-aliasing -pipe -march=pentium3  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c dmyext.c
ar rcu libruby18-static.a array.o  bignum.o  class.o  compar.o  dir.o  dln.o  enum.o  enumerator.o  error.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  regex.o  ruby.o signal.o  
sprintf.o  st.o  string.o  struct.o  time.o  util.o  variable.o  version.o   dmyext.o
cc -I/usr/include -O2 -fno-strict-aliasing -pipe -march=pentium3  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c main.c
cc -I/usr/include -O2 -fno-strict-aliasing -pipe -march=pentium3  -fPIC    -DRUBY_EXPORT -L.  -rpath=/usr/lib:/usr/local/lib -pthread 
-rdynamic  -pthread main.o libruby18-static.a -lrt -lcrypt -lm -L/usr/lib  -rpath=/usr/lib:/usr/local/lib -pthread  -o miniruby
rbconfig.rb updated
cc -shared -Wl,-soname,libruby18.so.18  array.o  bignum.o  class.o  compar.o  dir.o  dln.o  enum.o  enumerator.o  error.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  regex.o  
ruby.o  signal.o  sprintf.o  st.o  string.o  struct.o  time.o  util.o  variable.o  version.o   dmyext.o -lrt -lcrypt -lm -L/usr/lib  
-rpath=/usr/lib:/usr/local/lib -pthread  -o libruby18.so.18
compiling bigdecimal
make: don't know how to make 29. Stop
*** Error code 1

Stop in /usr/ports/lang/ruby18/work/ruby-1.8.7-p248.
*** Error code 1

Stop in /usr/ports/lang/ruby18.
*** Error code 1

Stop in /usr/ports/lang/ruby18.
*** Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
*** Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
localhost#
```


Here are some hopefully useful informations:

My make.conf


```
MASTER_SORT_REGEX?=://[^/]*\.de[/.]
DISABLE_SIZE=   yes
FETCH_CMD=      /usr/local/bin/wget --continue --passive-ftp -t 2 -T 15


CPUTYPE=pentium3

CFLAGS= -O2 -fno-strict-aliasing -pipe
CXXFLAGS= -O2 -fno-strict-aliasing -pipe
MAKE_SHELL?=sh
COPTFLAGS= -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing


OPTIMIZED_CFLAGS=       YES
WITHOUT_X11=            YES
BUILD_OPTIMIZED=        YES
WITH_CPUFLAGS=          YES
WITHOUT_DEBUG=          YES
WITH_OPTIMIZED_CFLAGS=  YES
#NO_PROFILE=             YES
#BUILD_STATIC=           YES
WITH_IPV6=              NO
WITHOUT_IPV6=           YES

# added by use.perl 2010-04-10 22:37:34
PERL_VERSION=5.10.1
```


```
localhost# uname -a
FreeBSD localhost.localdomain 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009     [email]root@almeida.cse.buffalo.edu[/email]:
/usr/obj/usr/src/sys/GENERIC  i386
```

Regards

PS: Please don't blame me if it's only a stupid mistake. I am quite new at FreeBSD


----------



## Werner (Apr 11, 2010)

There some more things going wrong.
I tried to build basejail with `# ezjail-admin update -b` but it failed.


```
[...]
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_aux_runtime.cc:34:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_call.cc:33:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_call.cc:37:23: error: unwind-pe.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_catch.cc:31:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_exception.cc:34:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_globals.cc:35:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_personality.cc:33:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_personality.cc:41:23: error: unwind-pe.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_term_handler.cc:31:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_terminate.cc:34:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_throw.cc:31:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_type.cc:33:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/eh_unex_handler.cc:30:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/pure.cc:32:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
In file included from /usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/vec.cc:37:
/usr/src/gnu/lib/libstdc++/../../../contrib/libstdc++/libsupc++/unwind-cxx.h:41:20: error: unwind.h: No such file or directory
mkdep: compile failed
*** Error code 1

Stop in /usr/src/gnu/lib/libstdc++.
*** Error code 1

Stop in /usr/src/gnu/lib.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
Error: The command 'make buildworld installworld' failed.
  Refer to the error report(s) above.
localhost#
```

I don't know what's the problem. I already successful installed FreeBSD8-amd64 with ezjail and portupgrade and much more in a virtual machine and I have a quite similar make.conf (well I didn't set MAKE_SHELL and COPTFLAGS in the other make.conf and I also didn't use -fno-strict-aliases).


----------



## val (Apr 28, 2010)

Almost same issue

```
cc -I/usr/include -O2 -pipe -O2 -mtune=native -march=nocona -fno-strict-aliasing  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c version.c
In file included from version.c:14:
version.h:29:41: warning: no newline at end of file
cc -I/usr/include -O2 -pipe -O2 -mtune=native -march=nocona -fno-strict-aliasing  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c dmyext.c
ar rcu libruby18-static.a array.o  bignum.o  class.o  compar.o  dir.o  dln.o  enum.o  enumerator.o  error.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  regex.o  ruby.o  signal.o  
sprintf.o  st.o  string.o  struct.o  time.o  util.o  variable.o  version.o   dmyext.o
cc -I/usr/include -O2 -pipe -O2 -mtune=native -march=nocona -fno-strict-aliasing  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c main.c
cc -I/usr/include -O2 -pipe -O2 -mtune=native -march=nocona -fno-strict-aliasing  -fPIC    -DRUBY_EXPORT -L.  -rpath=/usr/lib:/usr/local/lib 
-rdynamic   main.o  libruby18-static.a -lrt -lcrypt -lm -L/usr/lib  -rpath=/usr/lib:/usr/local/lib  -o miniruby
libruby18-static.a(process.o)(.text+0x1b40): In function `proc_exec_v':
: undefined reference to `rb_thread_stop_timer_fake'
libruby18-static.a(process.o)(.text+0x25ad): In function `rb_proc_exec':
: undefined reference to `rb_thread_stop_timer_fake'
*** Error code 1

Stop in /usr/ports/lang/ruby18/work/ruby-1.8.7-p248.
*** Error code 1

Stop in /usr/ports/lang/ruby18.
*** Error code 1

Stop in /usr/ports/lang/ruby18.
```


----------



## ndhertbsd (Apr 28, 2010)

*same error here*

I have exacly the same error as Val with the portupgrade of today..


----------



## jnevans (Apr 28, 2010)

Am experiencing the same thing here today as well.


----------



## Rick (Apr 28, 2010)

Chiming in, same issue as val, though on 7.1-RELEASE-p2. Looks like one of the patches is adding the rb_thread_stop_timer_fake function improperly.


----------



## Rick (Apr 28, 2010)

Oh I get it, I think whoever pushed this patch out didn't test it. miniruby is what's failing to build, since the new function is defined in a file that isn't included with the miniruby build process.


----------



## jnevans (Apr 28, 2010)

Rick, looks like you are right.  I edited the offending files and was able to have a successful compile and installation.


----------



## DutchDaemon (Apr 28, 2010)

Contact maintainer (cd /usr/ports/lang/ruby18 && make maintainer) or Send a PR.


----------



## notfed (Apr 29, 2010)

*Problem compiling lang/ruby18*

I did a portaudit and saw the following warning for the ruby port:



> Attempting to fetch from http://portaudit.FreeBSD.org/.
> New database installed.
> Affected package: ruby-1.8.6.287,1 (matched by ruby>=1.8.*,1<1.8.7.160_1,1)
> Type of problem: ruby -- BigDecimal denial of service vulnerability.
> Reference: <http://portaudit.FreeBSD.org/62e0fbe5-5798-11de-bb78-001cc0377035.html>



Looking in /usr/ports/UPDATING, I see the following info:


> 20050224:
> AFFECTS: users of lang/ruby18 and any apps that depend on ruby18
> AUTHOR: mezz@FreeBSD.org
> 
> ...



So, I did the portupgrade.  Now, when I attempt to reinstall the lang/ruby18 port, it fails.


```
[/usr/ports/lang/ruby18]# make install clean
===>  Found saved configuration for ruby-1.8.6.287,1
===>  Extracting for ruby+nopthreads-1.8.7.248_1,1
=> MD5 Checksum OK for ruby/ruby-1.8.7-p248.tar.bz2.
=> SHA256 Checksum OK for ruby/ruby-1.8.7-p248.tar.bz2.
/bin/mv /usr/ports/lang/ruby18/work/ruby-1.8.7-p248/ext/dl/h2rb /usr/ports/lang/ruby18/work/ruby-1.8.7-p248/bin/
===>  Patching for ruby+nopthreads-1.8.7.248_1,1
===>  Applying FreeBSD patches for ruby+nopthreads-1.8.7.248_1,1
/bin/rm -rf /usr/ports/lang/ruby18/work/ruby-1.8.7-p248/ext/Win32API
/bin/rm -rf /usr/ports/lang/ruby18/work/ruby-1.8.7-p248/ext/win32ole
/bin/mv /usr/ports/lang/ruby18/work/ruby-1.8.7-p248/ext/gdbm /usr/ports/lang/ruby18/work/
/bin/mv /usr/ports/lang/ruby18/work/ruby-1.8.7-p248/ext/iconv /usr/ports/lang/ruby18/work/
/bin/mv /usr/ports/lang/ruby18/work/ruby-1.8.7-p248/ext/tk /usr/ports/lang/ruby18/work/
===>   ruby+nopthreads-1.8.7.248_1,1 depends on file: /usr/local/bin/automake-1.10 - found
===>   ruby+nopthreads-1.8.7.248_1,1 depends on file: /usr/local/bin/autoconf-2.62 - found
===>  Configuring for ruby+nopthreads-1.8.7.248_1,1
/usr/bin/touch /usr/ports/lang/ruby18/work/ruby-1.8.7-p248/configure
/usr/local/share/aclocal/linc.m4:1: warning: underquoted definition of AM_PATH_LINC
/usr/local/share/aclocal/linc.m4:1:   run info '(automake)Extending aclocal'
/usr/local/share/aclocal/linc.m4:1:   or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.in:239: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:385: AC_USE_SYSTEM_EXTENSIONS is expanded from...
../../lib/autoconf/specific.m4:456: AC_MINIX is expanded from...
configure.in:239: the top level
configure.in:239: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
configure.in:239: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
../../lib/autoconf/specific.m4:385: AC_USE_SYSTEM_EXTENSIONS is expanded from...
../../lib/autoconf/specific.m4:456: AC_MINIX is expanded from...
configure.in:239: the top level
configure.in:239: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
checking build system type... i386-portbld-freebsd7
checking host system type... i386-portbld-freebsd7
checking target system type... i386-portbld-freebsd7
checking for C compiler default output file name... a.out

...
... snipped for brevity
...

cc -I/usr/include -O2 -fno-strict-aliasing -pipe  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c util.c
cc -I/usr/include -O2 -fno-strict-aliasing -pipe  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c variable.c
cc -I/usr/include -O2 -fno-strict-aliasing -pipe  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c version.c
In file included from version.c:14:
version.h:29:41: warning: no newline at end of file
cc -I/usr/include -O2 -fno-strict-aliasing -pipe  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c dmyext.c
ar rcu libruby18-static.a array.o  bignum.o  class.o  compar.o  dir.o  dln.o  enum.o  enumerator.o  error.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  regex.o  ruby.o  signal.o  
sprintf.o  st.o  string.o  struct.o  time.o  util.o  variable.o  version.o   dmyext.o
cc -I/usr/include -O2 -fno-strict-aliasing -pipe  -fPIC    -DRUBY_EXPORT -I. -I. -I/usr/include    -c main.c
cc -I/usr/include -O2 -fno-strict-aliasing -pipe  -fPIC    -DRUBY_EXPORT -L.  -rpath=/usr/lib:/usr/local/lib -rdynamic   main.o  libruby18-
static.a -lrt -lcrypt -lm -L/usr/lib  -rpath=/usr/lib:/usr/local/lib  -o miniruby
libruby18-static.a(process.o)(.text+0x1f40): In function `proc_exec_v':
: undefined reference to `rb_thread_stop_timer_fake'
libruby18-static.a(process.o)(.text+0x2a92): In function `rb_proc_exec':
: undefined reference to `rb_thread_stop_timer_fake'
*** Error code 1

Stop in /usr/ports/lang/ruby18/work/ruby-1.8.7-p248.
*** Error code 1

Stop in /usr/ports/lang/ruby18.
*** Error code 1

Stop in /usr/ports/lang/ruby18.
```
Can anyone help me out here? Am I doing something wrong?


----------



## notfed (Apr 29, 2010)

jnevans said:
			
		

> Rick, looks like you are right.  I edited the offending files and was able to have a successful compile and installation.



Can you please tell us what you did to get it to compile?


----------



## orionmaster (May 1, 2010)

I upgraded my ports today and after that the istallaion work without editing any files.


----------

