ports/118808: Fix to build ports/lang/drscheme on FreeBSD-7.0

Andrew Reilly areilly at bigpond.net.au
Tue Dec 18 07:10:04 UTC 2007


>Number:         118808
>Category:       ports
>Synopsis:       Fix to build ports/lang/drscheme on FreeBSD-7.0
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 18 07:10:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Reilly
>Release:        FreeBSD 7.0-BETA4 amd64
>Organization:
>Environment:
System: FreeBSD duncan.reilly.home 7.0-BETA4 FreeBSD 7.0-BETA4 #3: Sat Dec 15 11:34:46 EST 2007 root at duncan:/usr/obj/usr/src/sys/DUNCAN amd64


	machine is an AMD Athlon64-X2 with 1G RAM
>Description:
        drscheme (version 370) is currently marked BROKEN (Fails
        to install (signal 11)).  On my machine, if BROKEN is
        commented out of the Makefile, then it doesn't even
        build.  Previous versions have built successfully under
        FreeBSD-6, and version 3.99.0.4, from the PLT subversion
	repository also builds and installs just fine.

>How-To-Repeat:

	This is the script that I've been using to try building
	outside of the ports tree.  Ports has ver=370.  The
	current release is 371, and 371.3 is available as a
	pre-release, which is what I've used here.  If the
	maintainer could upgrade, as well as apply this patch,
	that'd be neat, too.

#!/bin/sh -v
ver=371.3
rm -rf plt-${ver}
tar xvfz ../Desktop/plt-${ver}-src-unix.tgz
#patch -p0 <plt-${ver}-sigsegv.patch
cd plt-${ver}/src
PREFIX=/usr/local
X11BASE=/usr/local
CFLAGS="-O2 -fno-strict-aliasing -pipe -g"
LDFLAGS=-L/usr/local/lib
CPPFLAGS="-I/usr/local/include -DLONG64"
LIBTOOL=/usr/local/bin/libtool

./configure --prefix=${PREFIX} --enable-shared --enable-xft --enable-gl \
	    --enable-xrender --enable-cairo --with-x --enable-pthread \
	    --enable-lt=${LIBTOOL} \
	    --x-includes=${X11BASE}/include --x-libraries=${X11BASE}/lib \
	    CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
	    CPPFLAGS="${CPPFLAGS}" \
	    --mandir=/usr/local/man amd64-portbld-freebsd7.0

gmake
>Fix:

	Uncomment the patch line, above, where the named file
	contains the following:

diff -ur plt-371.3/src/mred/wxme/wx_keym.cxx plt-371.3.new/src/mred/wxme/wx_keym.cxx
--- plt-371.3/src/mred/wxme/wx_keym.cxx	2007-08-03 02:56:05.000000000 +1000
+++ plt-371.3.new/src/mred/wxme/wx_keym.cxx	2007-12-18 17:19:10.000000000 +1100
@@ -512,14 +512,20 @@
     if (i >= MAX_BUF - 1)
       return 0;
     buffer[i] = keyseq[kp];
-    if (buffer[i] < 128)
-      buffer[i] = tolower(buffer[i]);
+    if (buffer[i] < 128) {
+      wxchar t;
+      t = tolower(buffer[i]);
+      buffer[i] = t;
+    }
   }
   buffer[i] = 0;
   code = 0;
   if (buffer[1]) {
-    if (buffer[0] < 128)
-      buffer[0] = tolower(buffer[0]);
+    if (buffer[0] < 128) {
+      wxchar t;
+      t = tolower(buffer[0]);
+      buffer[0] = t;
+    }
     for (i = 0; keylist[i].str; i++) {
       if (!wx_c_strcmp(buffer, keylist[i].str)) {
 	code = keylist[i].code;
diff -ur plt-371.3/src/mzscheme/gc2/sighand.c plt-371.3.new/src/mzscheme/gc2/sighand.c
--- plt-371.3/src/mzscheme/gc2/sighand.c	2007-08-08 22:11:24.000000000 +1000
+++ plt-371.3.new/src/mzscheme/gc2/sighand.c	2007-12-18 16:56:53.000000000 +1100
@@ -27,13 +27,14 @@
 /*  As of 2007/06/29, this is a guess for NetBSD!  */
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 # include <signal.h>
+# include <sys/param.h>
 void fault_handler(int sn, siginfo_t *si, void *ctx)
 {
   if (!designate_modified(si->si_addr))
     abort();
 }
 #  define NEED_SIGACTION
-#  if defined(__FreeBSD__)
+#  if defined(__FreeBSD__) && (__FreeBSD_version < 700000)
 #    define USE_SIGACTON_SIGNAL_KIND SIGBUS
 #  else
 #    define USE_SIGACTON_SIGNAL_KIND SIGSEGV


The second patch, to sighand.c copes with the change in
delivered signal on a memory page fault, in FreeBSD-7.  The
first patch, to wx_keym.cxx seems to relate to some extra
strictness in the xform.ss program.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list