Subject: ruby18: db4 is not an acceptable, can't read y.tab.c
To: None <taca@back-street.net>
From: rudolf <netbsd@eq.cz>
List: tech-pkg
Date: 12/12/2005 15:38:30
This is a multi-part message in MIME format.
--------------070203080900090001080500
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I'm trying to use pkgsrc on Slackware 10.1 and I have a slight problem 
with ruby. With the patch suggested before on the tech-pkg list 
(http://mail-index.netbsd.org/tech-pkg/2005/11/15/0021.html, 
http://mail-index.netbsd.org/tech-pkg/2005/11/16/0001.html; included as 
attachment "ruby18-base_bdb.diff") I get following result (some related 
information appended):

###
[14:31:09 root@queeg:/usr/pkgsrc/lang/ruby18-base]# bmake build

[...]

===> Building for ruby18-base-1.8.3nb1
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c array.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c bignum.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c class.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c compar.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c dir.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c dln.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c enum.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c error.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c eval.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c file.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c gc.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c hash.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c inits.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c io.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c marshal.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c math.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c numeric.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c object.c
gcc -O2 -I/usr/include  -fPIC -I. -I. -I/usr/include -c pack.c
/usr/pkg/bin/bison parse.y
sed '/^#/s|y\.tab\.c|parse.c|' y.tab.c > parse.c
sed: can't read y.tab.c: No such file or directory
*** Error code 2

Stop.
bmake: stopped in /usr/pkgsrc/lang/ruby18-base/work/ruby-1.8.3
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/lang/ruby18-base
===>
===> There was an error during the ``build'' phase.
===> Please investigate the following for more information:
===>      * log of the build
===>      * /usr/pkgsrc/lang/ruby18-base/work/.work.log
===>
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/lang/ruby18-base
[14:32:23 root@queeg:/usr/pkgsrc/lang/ruby18-base]# pkg_info
digest-20050731     Message digest wrapper utility
pkg_install-info-4.5nb3 Standalone GNU info file installation utility
bison-2.1           GNU yacc(1) replacement
[14:40:18 root@queeg:/usr/pkgsrc/lang/ruby18-base]# echo $PATH
/usr/pkg/sbin:/usr/local/sbin:/usr/sbin:/sbin:/usr/pkg/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin
[14:40:25 root@queeg:/usr/pkgsrc/lang/ruby18-base]# type sed
sed is /usr/bin/sed
[14:42:55 root@queeg:/usr/pkgsrc/lang/ruby18-base]# type bison
bison is /usr/pkg/bin/bison
[14:48:35 root@queeg:/usr/pkgsrc/lang/ruby18-base]# type yacc
yacc is /usr/bin/yacc
[14:48:38 root@queeg:/usr/pkgsrc/lang/ruby18-base]#
###

It is possible to fix this with the patch "ruby18-base_bison.diff" (as 
attachment) applied between "bmake configure" and "bmake build", but I 
don't know if this is the right fix (masking the symptoms instead of 
healing the disease). :)

Regards,

r.

--------------070203080900090001080500
Content-Type: text/plain;
 name="ruby18-base_bdb.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ruby18-base_bdb.diff"

--- Makefile-orig	2005-12-12 13:05:04.000000000 +0100
+++ Makefile	2005-12-12 12:53:23.000000000 +0100
@@ -134,7 +134,7 @@
 # XXX:	Ruby extconf shuld select native ndbm(3) or Berkley DB's
 #	ndbm(3) compatible support.
 #
-.if ${OPSYS} != "IRIX" && ${OPSYS} != "SunOS"
+.if ${OPSYS} != "IRIX" && ${OPSYS} != "SunOS" &&  ${OPSYS} != "Linux"
 BDB_ACCEPTED?=		db1
 .include "../../mk/bdb.buildlink3.mk"
 .endif

--------------070203080900090001080500
Content-Type: text/plain;
 name="ruby18-base_bison.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ruby18-base_bison.diff"

--- work/ruby-1.8.3/Makefile-orig	2005-12-12 15:22:25.000000000 +0100
+++ work/ruby-1.8.3/Makefile	2005-12-12 15:16:00.000000000 +0100
@@ -6,7 +6,7 @@
 VPATH = $(srcdir)/missing
 
 CC = gcc
-YACC = /usr/pkg/bin/bison
+YACC = /usr/pkg/bin/bison -y
 PURIFY =
 AUTOCONF = autoconf
 

--------------070203080900090001080500--