NetBSD Problem Report #29209

From www@netbsd.org  Thu Feb  3 04:06:25 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id E3A1863B400; Thu,  3 Feb 2005 04:06:25 +0000 (UTC)
Message-Id: <20050203040625.E3A1863B400@narn.netbsd.org>
Date: Thu,  3 Feb 2005 04:06:25 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@netbsd.org
Subject: math/sc build fails on MacOS X 10.[12].x
X-Send-Pr-Version: www-1.0

>Number:         29209
>Category:       pkg
>Synopsis:       math/sc build fails on MacOS X 10.[12].x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    macos-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 03 04:07:00 +0000 2005
>Last-Modified:  Wed Mar 07 05:47:26 +0000 2012
>Originator:     John D. Baker
>Release:        MacOS X 10.2.8
>Organization:
>Environment:
Darwin pm8500.technoskunk.fur 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC  Power Macintosh powerpc

>Description:
The source package for 'sc' accounts for either BSD or SYSV style
regular expression parsing libraries.

MacOS X has neither of these.  Instead, it has an altogether different
implementation which the manual pages say are IEEE Std 1003.2
(``POSIX.2'') and uses function names mostly the same as the other
implementations, but with different arguments and calling conventions.

MacOS X does not provide 'libcompat'.

Therefore a straight build of math/sc fails as follows:

gcc -pipe  -L/usr/pkg/lib -L/usr/pkg/lib cmds.o crypt.o format.o gram.o help.o interp.o lex.o range.o sc.o  screen.o version.o vi.o vmtbl.o xmalloc.o -lm -lcurses -ltermcap -lcompat -o sc
ld: can't locate file for: -lcompat
*** Error code 1

Stop.
bmake: stopped in /Volumes/NetBSD/tmp/pkgsrc/math/sc/work

>How-To-Repeat:
bootstrap pkgsrc on MacOS X 10.[12].x
cd .../pkgsrc/math/sc
bmake
>Fix:
The style of regular-expression library to be used is controlled by
two sets of flags in the distribution Makefile.  Upon examining key
source files, it was revealed that if both flag sets were empty, no
regular expression parsing would be expected and the code would revert
to plain string matching.

Therefore the workaround is to disable regular expression support
as follows:

bmake configure

Patch work/Makefile as follows (if editing manually, you will
probably have to "chmod a+w work/Makefile" to make it writable):
--- work/Makefile.orig2 Wed Feb  2 21:54:59 2005
+++ work/Makefile       Wed Feb  2 22:02:00 2005
@@ -74,4 +74,4 @@
 # (most BSD based systems do).
-RE_COMP=-DRE_COMP
-#RE_COMP=
+#RE_COMP=-DRE_COMP
+RE_COMP=

@@ -80,3 +80,3 @@
 #REGCMP=-DREGCMP
-#REGCMP=
+REGCMP=

@@ -84,4 +84,4 @@
 # "pg" may be appropriate for SYSV.
-#DFLT_PAGER=-DDFLT_PAGER=\"less\"
-DFLT_PAGER=-DDFLT_PAGER=\"more\"       # generic && reno
+DFLT_PAGER=-DDFLT_PAGER=\"less\"
+#DFLT_PAGER=-DDFLT_PAGER=\"more\"      # generic && reno

@@ -225,3 +225,3 @@
 #LDFLAGS=
-LIB=-lm -lcurses -ltermcap -lcompat
+LIB=-lm -lcurses -ltermcap


>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->darwin-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Thu, 03 Feb 2005 09:49:49 +0000
Responsible-Changed-Why:
Darwin pkgsrc PR.


Responsible-Changed-From-To: darwin-pkg-people->macos-pkg-people
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Wed, 07 Mar 2012 05:47:26 +0000
Responsible-Changed-Why:
darwin-pkg-people has been changed to macos-pkg-people


>Unformatted:

 Problem still exists on 10.6.   Really upstream needs to be fixed.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.