Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jul 2002 08:38:26 -0500
From:      Scott Bolte <listS+freebsd-questions@niss.com>
To:        pfeifer@dbai.tuwien.ac.at
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-emulators@FreeBSD.ORG
Subject:   heads up: wine 20020605 broken on FreeBSD, workaround included
Message-ID:  <200207011338.g61DcQ601786@crag.niss.com>

next in thread | raw e-mail | index | archive | help
	Over the weekend I tried to get wine 20020605 to run on a
	new installation of FreeBSD 4.6. It took a while, I haven't
	tried wine since 1997 after all, but I determined that my
	problems were due to configure's reentrant libc test failing
	when building the port.

	The wine_cv_libc_reentrant test in configure.ac first checks
	for Linux (__errno_location) and then tests for FreeBSD
	(__error).  I don't have more time to figure out why, but
	nesting the FreeBSD test that way results in a false
	negative. The configuration will continue, as will the
	build, but the resulting non-reentrant code goes into an
	endless loop when trying to spawn threads.

	A crude workaround, for FreeBSD users at least, is to
	replace the Linux test with the FreeBSD one. This needs to
	be done before configure is run. I did it by hand, but I
	expect the following code would do the trick.

  % cd /usr/ports/emulators/wine
  % make patch
  % perl -i -pe 's/__errno_location/__error/' work/wine-20020605/configure.ac
  % make
  % make install

	Below is the autoconf test script that demonstrates the
	problem. It needs to be run in
	/usr/ports/emulators/wine/work/wine-20020605/configure.ac

		Scott

	P.S. I'm not on the freebsd-emulators mailing list, but I
	     see from freebsd-questions that at least one other
	     person got wine to compile on 4.6. I can't explain
	     why it worked for him and not for me. However, I
	     installed a brand new copy of 4.6 from the standard
	     ISO images just to run wine.

---- testconf.ac
dnl Process this file with autoconf to produce a configure script.
dnl Original author: Michael Patra
dnl See ChangeLog file for detailed change history.

m4_define(WINE_VERSION,regexp(m4_include(VERSION),[version \([-.0-9A-Za-z]+\)],[\1]))

AC_PREREQ(2.53)
AC_INIT([Wine],WINE_VERSION)
AC_CONFIG_SRCDIR(server/atom.c)
AC_CONFIG_AUX_DIR(tools)

dnl **** Check for some programs ****

AC_PROG_CC

dnl **** Check for reentrant libc ****

wine_cv_libc_reentrant=no

dnl	#####
dnl	##### There is a problem if the FreeBSD test is nested
dnl	##### after the Linux test. In that instance, it fails.
dnl	##### If, on the other hand, it is tested first, it works.
dnl	##### 
dnl	##### Swap the order of two following test case to see
dnl	##### how they differ. (Ignore the second case since it
dnl	##### will use cached data.)
dnl	##### 

dnl FreeBSD style errno location
WINE_CHECK_ERRNO([__error], [wine_cv_libc_reentrant=__error])

dnl Linux style errno location
WINE_CHECK_ERRNO([__errno_location], [wine_cv_libc_reentrant=__errno_location],
  dnl FreeBSD style errno location
  WINE_CHECK_ERRNO([__error], [wine_cv_libc_reentrant=__error]
))

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207011338.g61DcQ601786>