Bug 153557 - patch to warn birtualbox compiler to unsetenv DISPLAY
Summary: patch to warn birtualbox compiler to unsetenv DISPLAY
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Bernhard Froehlich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-30 17:50 UTC by jhs
Modified: 2011-01-31 11:00 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (669 bytes, patch)
2010-12-30 17:50 UTC, jhs
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jhs 2010-12-30 17:50:07 UTC
	I was stuck by this bug till I posted & Bernhard F replied
	unsetenv DISPLAY, so this patch makes it easier for next
	person who gets stuck. It's not an ideal patch:
		- Its noisey,
		- one could add more ifdefs to avoid eg make fetch
		  also being marked as broken, & just leave make all broken.
	But it does the job until someone fixes virtualbox, when the
	patch can then be discarded.

Fix: Patch appended, also copied in 
	http://berklix.com/~jhs/src/bsd/fixes/FreeBSD/ports/gen/emulators/virtualbox-ose/Makefile_DISPLAY_unsetenv.REL=8.1-RELEASE.diff
How-To-Repeat: 	setenv DISPLAY your.host.com:0
	cd /usr/ports/emulators/virtualbox-ose ; make
Comment 1 swell.k 2010-12-30 18:19:41 UTC
"Julian Stacey" <jhs@berklix.com> writes:

> + test_display != printenv DISPLAY
> + .if ${test_display} != ""
> + BROKEN=		"unsetenv DISPLAY to avoid: Checking for Mesa / GLU: X Error of failed request:  BadRequest (invalid request code or no such operation)"
> + .endif
> + 

assignment is redundant here, you can use value from environment directly

  .if defined(DISPLAY) && ${DISPLAY} != ""

I don't use the port but have you tried CONFIGURE_ARGS+=--passive-mesa ?
Comment 2 jhs 2010-12-30 18:41:19 UTC
Hi,
Reference:
> From:		Anonymous <swell.k@gmail.com> 
> Date:		Thu, 30 Dec 2010 21:19:41 +0300 
> Message-id:	<867herazsy.fsf@gmail.com> 

Anonymous wrote:
> "Julian Stacey" <jhs@berklix.com> writes:
> 
> > + test_display != printenv DISPLAY
> > + .if ${test_display} != ""
> > + BROKEN=		"unsetenv DISPLAY to avoid: Checking for Mesa / GLU: X Error of failed request:  BadRequest (invalid request code or no such operation)"
> > + .endif
> > + 
> 
> assignment is redundant here, you can use value from environment directly
> 
>   .if defined(DISPLAY) && ${DISPLAY} != ""

Thanks, OK

> I don't use the port but have you tried CONFIGURE_ARGS+=--passive-mesa ?

Adding CC for maintainer of port: vbox@FreeBSD.org
Thanks, I'll look too.

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
	Mail plain text;  Not quoted-printable, or HTML or base r64.
	Avoid top posting, it cripples itemised cumulative responses.
Comment 3 jhs 2011-01-01 17:51:29 UTC
"Julian H. Stacey" wrote:
> Anonymous wrote:
> > "Julian Stacey" <jhs@berklix.com> writes:
> > 
> > > + test_display != printenv DISPLAY
> > > + .if ${test_display} != ""
> > > + BROKEN=		"unsetenv DISPLAY to avoid: Checking for Mesa / GLU: X Error of failed request:  BadRequest (invalid request code or no such operation)"
> > > + .endif
> > > + 
> > 
> > assignment is redundant here, you can use value from environment directly
> > 
> >   .if defined(DISPLAY) && ${DISPLAY} != ""
> 
> Thanks, OK

I did a test 
8.1-RELEASE amf64 make with DISPLAY set to null string, eg setenv DISPLAY ; make
printenv | grep DISPLAY
DISPLAY=
Result: it builds, thus I confirm your '&& ${DISPLAY} != ""' is also appropriate, Thanks.


> > I don't use the port but have you tried CONFIGURE_ARGS+=--passive-mesa ?

I added 
	CONFIGURE_ARGS+=--passive-mesa
to 8.1-RELEASE i386 /usr/ports/emulators/virtualbox-ose/Makefile
	printenv | grep DISPLAY	#	DISPLAY=fire.js.berklix.net:0
Result: it builds OK.  
Hashing out passive-mesa, make clean ; make fails again.
Conclusion:	
	Adding
		CONFIGURE_ARGS+=--passive-mesa
Works better avoids needing BROKEN=
But what & where
	--passive-mesa
does, I don't know
& if it might damage virtualbox run time I also don't know.
Hopefully vbox@FreeBSD.org &/or Bernhard Froehlich <decke@bluelife.at> (cc'd) 
can decide that.

*** old-8.1-RELEASE-and-current/ports/emulators/virtualbox-ose/Makefile	Sat Jan  1 18:29:21 2011
--- new-generic/ports/emulators/virtualbox-ose/Makefile	Sat Jan  1 18:32:19 2011
***************
*** 24,29 ****
--- 24,37 ----
  		as86:${PORTSDIR}/devel/dev86 \
  		xsltproc:${PORTSDIR}/textproc/libxslt \
  		kmk:${PORTSDIR}/devel/kBuild
+ 
+ # .if defined(DISPLAY) && ${DISPLAY} != ""
+ # BROKEN=         "unsetenv DISPLAY to avoid: Checking for Mesa / GLU: X Error of failed:  BadRequest (invalid request code or no such operation)"
+ # .endif
+ 
+ CONFIGURE_ARGS+=--passive-mesa 
+ # --passive-mesa	To avoid: Checking for Mesa / GLU: X Error of failed:  BadRequest (invalid request code or no such operation)"
+ 
  LIB_DEPENDS=	png.6:${PORTSDIR}/graphics/png \
  		xslt.2:${PORTSDIR}/textproc/libxslt \
  		curl.6:${PORTSDIR}/ftp/curl

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultants Munich http://berklix.com
	Mail plain text;  Not quoted-printable, or HTML or base r64.
	Avoid top posting, it cripples itemised cumulative responses.
Comment 4 Bernhard Froehlich freebsd_committer freebsd_triage 2011-01-03 10:57:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->decke

I'll take it.
Comment 5 Bernhard Froehlich 2011-01-03 11:33:49 UTC
--passive-mesa is the correct solution since VirtualBox 3.2.0 and does
only unset DISPLAY before executing the configure test.

http://www.virtualbox.org/changeset/26776

-- 
Bernhard Froehlich
http://www.bluelife.at/
Comment 6 dfilter service freebsd_committer freebsd_triage 2011-01-31 10:55:27 UTC
decke       2011-01-31 10:55:22 UTC

  FreeBSD ports repository

  Modified files:
    emulators/virtualbox-ose Makefile 
  Log:
  - Fix build when compiling remotely and DISPLAY is set
  
  PR:             ports/153557
  Submitted by:   Julian Stacey <jhs at berklix dot com>,
                  Anonymous <swell dot k at gmail dot com>
  Feature safe:   yes
  
  Revision  Changes    Path
  1.34      +1 -1      ports/emulators/virtualbox-ose/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Bernhard Froehlich freebsd_committer freebsd_triage 2011-01-31 10:56:21 UTC
State Changed
From-To: open->closed

Committed. Thanks!