pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/29209: math/sc build fails on MacOS X 10.[12].x



>Number:         29209
>Category:       pkg
>Synopsis:       math/sc build fails on MacOS X 10.[12].x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 03 04:07:00 +0000 2005
>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
 




Home | Main Index | Thread Index | Old Index