NetBSD Problem Report #29209

From  Thu Feb  3 04:06:25 2005
Return-Path: <>
Received: by (Postfix, from userid 31301)
	id E3A1863B400; Thu,  3 Feb 2005 04:06:25 +0000 (UTC)
Message-Id: <>
Date: Thu,  3 Feb 2005 04:06:25 +0000 (UTC)
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:  Tue Jan 29 06:25:05 +0000 2019
>Originator:     John D. Baker
>Release:        MacOS X 10.2.8
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

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

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

bootstrap pkgsrc on MacOS X 10.[12].x
cd .../pkgsrc/math/sc
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).

@@ -80,3 +80,3 @@

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

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



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

Responsible-Changed-From-To: darwin-pkg-people->macos-pkg-people
Responsible-Changed-When: Wed, 07 Mar 2012 05:47:26 +0000
darwin-pkg-people has been changed to macos-pkg-people


 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.43 2018/01/16 07:36:43 maya Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.