From toni@iso.egotaivas.com  Wed Feb  9 19:32:11 2005
Return-Path: <toni@iso.egotaivas.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A51BA16A4CF
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  9 Feb 2005 19:32:11 +0000 (GMT)
Received: from iso.egotaivas.com (iso.egotaivas.com [193.65.195.170])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E60CF43D2F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  9 Feb 2005 19:32:10 +0000 (GMT)
	(envelope-from toni@iso.egotaivas.com)
Received: from iso.egotaivas.com (localhost.egotaivas.com [127.0.0.1])
	by iso.egotaivas.com (8.13.1/8.13.1) with ESMTP id j19JW9C4077011
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 9 Feb 2005 21:32:09 +0200 (EET)
	(envelope-from toni@iso.egotaivas.com)
Received: (from toni@localhost)
	by iso.egotaivas.com (8.13.1/8.13.1/Submit) id j19JW9aS077010;
	Wed, 9 Feb 2005 21:32:09 +0200 (EET)
	(envelope-from toni)
Message-Id: <200502091932.j19JW9aS077010@iso.egotaivas.com>
Date: Wed, 9 Feb 2005 21:32:09 +0200 (EET)
From: Toni Viemero <toni.viemero@iki.fi>
Reply-To:
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: lang/ruby18 fails to install on amd64
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         77324
>Category:       ports
>Synopsis:       lang/ruby18 fails to install on amd64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    knu
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 09 19:40:08 GMT 2005
>Closed-Date:    Fri Feb 25 00:30:30 GMT 2005
>Last-Modified:  Fri Feb 25 00:30:30 GMT 2005
>Originator:     Toni Viemero
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD iso.egotaivas.com 5.3-STABLE FreeBSD 5.3-STABLE #5: Wed Dec 1 14:47:46 EET 2004 root@iso.egotaivas.com:/usr/obj/usr/src/sys/ISO i386

>Description:
    Current lang/ruby18 (ruby-1.8.2_2) fails to install on amd64
    (5.3-RELEASE-p2 dual opteron)
    Install hangs on "./miniruby ./ext/extmk.rb"
    miniruby just uses 100% CPU and does nothing towards installation. After
    breaking the portupgrade with ctrl+c the miniruby process just leaves to
    background and has to be kill -9'd
    I tried to comment "MAKE_ARGS=-j 3" out from Makefile, but it didn't help.
    ruby-1.8.2_1 installs fine

./miniruby ./ext/extmk.rb --dest-dir=""  --make="make"  --mflags=" -j 3"  --make-flags=" ARCH=amd64 OPSYS=FreeBSD OSREL=5.3 OSVERSION=503001 PORTOBJFORMAT=elf SYSTEMVERSION= ARCH=amd64 OPSYS=FreeBSD OSREL=5.3 OSVERSION=503001 PORTOBJFORMAT=elf SYSTEMVERSION= -j 3" install

>How-To-Repeat:
    portupgrade lang/ruby18 or make install

>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->knu 
Responsible-Changed-By: lofi 
Responsible-Changed-When: Wed Feb 9 20:14:52 GMT 2005 
Responsible-Changed-Why:  
Over to maintainer. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=77324 

From: Michael Nottebrock <michaelnottebrock@gmx.net>
To: freebsd-gnats-submit@freebsd.org, toni.viemero@iki.fi
Cc:  
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Wed, 9 Feb 2005 21:18:08 +0100

 --Boundary-00=_CAnCCRzaPA21MHR
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 Fix:
 
 
 --Boundary-00=_CAnCCRzaPA21MHR
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="ruby18.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
 	filename="ruby18.diff"
 
 Index: Makefile
 ===================================================================
 RCS file: /home/pcvs/ports/lang/ruby18/Makefile,v
 retrieving revision 1.83
 diff -u -r1.83 Makefile
 --- Makefile	5 Feb 2005 04:59:24 -0000	1.83
 +++ Makefile	9 Feb 2005 20:16:54 -0000
 @@ -7,7 +7,7 @@
  
  PORTNAME=	ruby
  PORTVERSION=	${RUBY_PORTVERSION}
 -PORTREVISION=	2
 +PORTREVISION=	3
  CATEGORIES=	lang ruby ipv6
  MASTER_SITES=		${MASTER_SITE_RUBY}
  MASTER_SITE_SUBDIR=	${MASTER_SITE_SUBDIR_RUBY}
 @@ -42,6 +42,7 @@
  RUBY_NO_RUN_DEPENDS=	yes
  
  #USE_AUTOCONF=	yes	# does not work with 2.13; requires 2.53 or later
 +USE_REINPLACE=	yes
  GNU_CONFIGURE=	yes
  WRKSRC=		${RUBY_WRKSRC}
  CONFIGURE_ARGS=	${RUBY_CONFIGURE_ARGS} \
 @@ -58,12 +59,12 @@
  LATEST_LINK=	ruby-devel
  
  .include <bsd.port.pre.mk>
 -.if ${OSVERSION} >= 502102
  RUBY_ENABLE_PTHREAD?=	public demand
 -.endif
  
  .if defined(RUBY_ENABLE_PTHREAD) && ${RUBY_ENABLE_PTHREAD} != "no"
  CONFIGURE_ARGS+=	--enable-pthread
 +CONFIGURE_ENV+=		CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \
 +			LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS}"
  
  # There seems to be a bug in either gcc or libpthread that gets
  # (mini)ruby to malfunction..
 @@ -134,6 +135,8 @@
  	${MV} ${WRKSRC}/ext/dl/h2rb ${WRKSRC}/bin/
  
  post-patch:
 +	${REINPLACE_CMD} -e 's|-l$$pthread_lib|${PTHREAD_LIBS}|g' \
 +		${WRKSRC}/configure
  	${FIND} ${PATCH_WRKSRC} -name '*.orig' -delete
  .for d in Win32API
  	${RM} -rf ${BUILD_WRKSRC}/ext/${d}
 
 --Boundary-00=_CAnCCRzaPA21MHR--

From: Toni Viemero <toni.viemero@iki.fi>
To: Michael Nottebrock <michaelnottebrock@gmx.net>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Fri, 11 Feb 2005 10:54:50 +0200

 Michael Nottebrock wrote:
 
 > Fix:
 [...]
 
 This didn't fix it for me.
 Still hangs on "./miniruby ./ext/extmk.rb ..."
 
 -- 
 Toni Viemer  |  http://selfdestruct.net/
 "Don't do anything by half. If you love someone, love them. If you
  hate someone, hate them until it hurts."

From: Michael Nottebrock <michaelnottebrock@gmx.net>
To: freebsd-gnats-submit@freebsd.org, toni.viemero@iki.fi
Cc:  
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Fri, 11 Feb 2005 13:18:13 +0100

 Do you have special cflags set (-Os, -O2, etc)? If so, try with compiling ruby 
 with plain -O -pipe.

From: Toni Viemero <toni.viemero@iki.fi>
To: Michael Nottebrock <michaelnottebrock@gmx.net>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Fri, 11 Feb 2005 15:01:50 +0200

 Michael Nottebrock wrote:
 
 > Do you have special cflags set (-Os, -O2, etc)? If so, try with compiling ruby 
 > with plain -O -pipe.
 
 By comparing the build output to a i386 box, the build seems to die at
 "compiling bigdecimal" and tries to run install.
 This is the problem with ruby-1.8.2_2 too, I just didn't notice it before,
 since I just watched the install hang.
 
 cc -shared -Wl,-soname,libruby18.so.18  array.o  bignum.o  class.o  compar.o
 dir.o  dln.o  enum.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
 -pthread -lcrypt -lm   -o libruby18.so.18
 compiling bigdecimal
 ===>  Installing for ruby-1.8.2_3
 
 lang/ruby18/work/ruby-1.8.2> ./miniruby -v
 ruby 1.8.2 (2004-12-25) [amd64-freebsd5]
 
 lang/ruby18/work/ruby-1.8.2> ./miniruby ext/extmk.rb
 compiling bigdecimal
 
 lang/ruby18/work/ruby-1.8.2> ./miniruby -d ext/extmk.rb
 Exception `NoMethodError' at ./lib/mkmf.rb:657 - private method `split' called for nil:NilClass
 ext/extmk.rb:137: warning: global variable `$make' not initialized
 ext/extmk.rb:188: warning: global variable `$nmake' not initialized
 Exception `Errno::EEXIST' at ./lib/fileutils.rb:212 - File exists - ext
 Exception `Errno::EEXIST' at ./lib/fileutils.rb:212 - File exists - .
 Exception `Errno::EEXIST' at ./lib/fileutils.rb:212 - File exists - ext
 compiling bigdecimal
 Exception `NoMethodError' at ./lib/mkmf.rb:657 - private method `split' called for nil:NilClass
 
 -- 
 Toni Viemer  |  http://selfdestruct.net/
 "Don't do anything by half. If you love someone, love them. If you
  hate someone, hate them until it hurts."

From: Michael Nottebrock <michaelnottebrock@gmx.net>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Fri, 11 Feb 2005 15:12:30 +0100

 Looks like a different problem then. FWIW, the binary package on amd64 seems 
 to build fine (on the package build machines), so I can only guess the 
 problem is something local to your system.

From: Alex Varju <alex@varju.ca>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Sun, 13 Feb 2005 12:22:30 -0800

 For what it's worth, I see identical behaviour on my amd64 machine.  The 
 build gets as far as bigdecimal, and silently fails.  This is on 
 5.3-STABLE checked out January 30.
 

From: "Jeremy Messenger" <mezz7@cox.net>
To: freebsd-gnats-submit@freebsd.org, toni.viemero@iki.fi,
	"Alex Varju" <alex@varju.ca>
Cc:  
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Mon, 14 Feb 2005 16:13:13 -0600

 Can you guys please test this patch? Let me know if it works for you. It  
 has multi-patch from Debian and Gentoo. It includes amd64 fix too, so I  
 have no idea if this will help for the other than i386 platforms.
 
 http://people.freebsd.org/~mezz/diff/ruby18.diff
 
 Debian:
 	patch-100_cvs_updates (took from Ruby CVS)
 	patch-101_cvs_updates (more took from Ruby CVS)
 	patch-800_delegate.rb
 	patch-900_ri_pager
 
 Gentoo:
 	patch-ruby-1.6.8-fix-x86_64
 
 =========================
 	<update your ports tree>
 
 	cd /usr/ports/lang
 	patch -p0 < /path/to/ruby18.diff
 	find ruby18 -empty -delete ; find ruby18 -name \*.orig -delete
 
 	<You have to rebuild all apps that depend on ruby18.>
 =========================
 
 Thanks!
 
 Cheers,
 Mezz
 
 
 -- 
 mezz7@cox.net  -  mezz@FreeBSD.org
 FreeBSD GNOME Team
 http://www.FreeBSD.org/gnome/  -  gnome@FreeBSD.org

From: Toni Viemero <toni.viemero@iki.fi>
To: Jeremy Messenger <mezz7@cox.net>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Tue, 15 Feb 2005 00:24:46 +0200

 Jeremy Messenger wrote:
 
 > Can you guys please test this patch? Let me know if it works for you. It  
 > has multi-patch from Debian and Gentoo. It includes amd64 fix too, so I  
 > have no idea if this will help for the other than i386 platforms.
 > 
 > http://people.freebsd.org/~mezz/diff/ruby18.diff
 
 Compiling stops at "compiling bigdecimal", but this time make install
 doesn't hang and no 'miniruby' in background to consule all cpu.
 
 ===>  Installing for ruby-1.8.2_2
 ===>   Generating temporary packing list
 ===>  Checking if lang/ruby18 already installed
 ./miniruby ./instruby.rb --dest-dir=""  --make="make"  --mflags=" -j 3" --make-flags=" ARCH=amd64 OPSYS=FreeBSD OSREL=5.3 OSVERSION=503001 PORTOBJFORMAT=elf SYSTEMVERSION= -j 3" --mantype="doc"
 install -c -p -m 0755 ruby18 /usr/local/bin/ruby18
 *** Error code 1
 1 error
 *** Error code 2
 
 work/ruby-1.8.2> ./miniruby -d ext/extmk.rb 
 Exception `NoMethodError' at ./lib/mkmf.rb:657 - private method `split' called for nil:NilClass
 ext/extmk.rb:137: warning: global variable `$make' not initialized
 ext/extmk.rb:188: warning: global variable `$nmake' not initialized
 Exception `Errno::EEXIST' at ./lib/fileutils.rb:219 - File exists - ext
 Exception `Errno::EEXIST' at ./lib/fileutils.rb:219 - File exists - .
 Exception `Errno::EEXIST' at ./lib/fileutils.rb:219 - File exists - ext
 compiling bigdecimal
 Exception `NoMethodError' at ./lib/mkmf.rb:657 - private method `split' called for nil:NilClass
 
 -- 
 Toni Viemer  |  http://selfdestruct.net/
 "Don't do anything by half. If you love someone, love them. If you
  hate someone, hate them until it hurts."

From: "Jeremy Messenger" <mezz7@cox.net>
To: "Toni Viemero" <toni.viemero@iki.fi>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: ports/77324: lang/ruby18 fails to install on amd64
Date: Mon, 14 Feb 2005 20:01:46 -0600

 On Tue, 15 Feb 2005 00:24:46 +0200, Toni Viemero <toni.viemero@iki.fi>  
 wrote:
 
 > Jeremy Messenger wrote:
 >
 >> Can you guys please test this patch? Let me know if it works for you. It
 >> has multi-patch from Debian and Gentoo. It includes amd64 fix too, so I
 >> have no idea if this will help for the other than i386 platforms.
 >>
 >> http://people.freebsd.org/~mezz/diff/ruby18.diff
 >
 > Compiling stops at "compiling bigdecimal", but this time make install
 > doesn't hang and no 'miniruby' in background to consule all cpu.
 
 Thanks for test.. I have no idea, so I am giving up. Be sure to delete  
 lang/ruby18 before you do the future test or upgrade to be sure have all  
 of unoffical patches deleted.
 
 Cheers,
 Mezz
 
 > ===>  Installing for ruby-1.8.2_2
 > ===>   Generating temporary packing list
 > ===>  Checking if lang/ruby18 already installed
 > ./miniruby ./instruby.rb --dest-dir=""  --make="make"  --mflags=" -j 3"  
 > --make-flags=" ARCH=amd64 OPSYS=FreeBSD OSREL=5.3 OSVERSION=503001  
 > PORTOBJFORMAT=elf SYSTEMVERSION= -j 3" --mantype="doc"
 > install -c -p -m 0755 ruby18 /usr/local/bin/ruby18
 > *** Error code 1
 > 1 error
 > *** Error code 2
 >
 > work/ruby-1.8.2> ./miniruby -d ext/extmk.rb
 > Exception `NoMethodError' at ./lib/mkmf.rb:657 - private method `split'  
 > called for nil:NilClass
 > ext/extmk.rb:137: warning: global variable `$make' not initialized
 > ext/extmk.rb:188: warning: global variable `$nmake' not initialized
 > Exception `Errno::EEXIST' at ./lib/fileutils.rb:219 - File exists - ext
 > Exception `Errno::EEXIST' at ./lib/fileutils.rb:219 - File exists - .
 > Exception `Errno::EEXIST' at ./lib/fileutils.rb:219 - File exists - ext
 > compiling bigdecimal
 > Exception `NoMethodError' at ./lib/mkmf.rb:657 - private method `split'  
 > called for nil:NilClass
 
 
 -- 
 mezz7@cox.net  -  mezz@FreeBSD.org
 FreeBSD GNOME Team
 http://www.FreeBSD.org/gnome/  -  gnome@FreeBSD.org
State-Changed-From-To: open->closed 
State-Changed-By: mezz 
State-Changed-When: Fri Feb 25 00:29:00 GMT 2005 
State-Changed-Why:  
Should be fixed in today committed, be sure to read /usr/ports/UPDATING. 

http://www.freebsd.org/cgi/getmsg.cgi?fetch=966961+0+current/cvs-ports 

If you still have the problem, please create a new PR of it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77324 
>Unformatted:
