pkgsrc-Bugs archive

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

pkg/47949: devel/ncurses fails to build on Darwin with a non-Xcode compiler



>Number:         47949
>Category:       pkg
>Synopsis:       devel/ncurses fails to build on Darwin with a non-Xcode 
>compiler
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 21 13:25:00 +0000 2013
>Originator:     Jason Bacon
>Release:        Darwin 10.8.0
>Organization:
Acadix Consulting, LLC
>Environment:
Darwin heron 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; 
root:xnu-1504.15.3~1/RELEASE_I386 i386
>Description:

Some software packages make assumptions about compiler flags based on the OS.

In this case, the ncurses configure script adds --no-cpp-precomp for all Darwin 
builds, which causes compilation failures when using non-Xcode compilers on 
Darwin.

This flag is a special hack only supported by the Xcode gcc.  It has been 
obsolete for years and remains supported only as a dummy flag.  It was recently 
removed from mk/platform/Darwin.mk, but some packages, such as devel/ncurses, 
still insert it on their own.

>How-To-Repeat:
Run make in devel/ncurses on a Darwin system using a non-Xcode compiler.
>Fix:
diff -ruN ../devel/ncurses/patches/patch-ac ncurses/patches/patch-ac
--- ../devel/ncurses/patches/patch-ac   2011-11-01 20:02:25.000000000 -0500
+++ ncurses/patches/patch-ac    2013-06-18 13:37:23.000000000 -0500
@@ -1,7 +1,16 @@
-$NetBSD: patch-ac,v 1.18 2011/11/01 14:47:46 hans Exp $
+$NetBSD$
 
---- configure.orig     2011-02-21 01:40:36.000000000 +0000
+--- configure.orig     2011-03-31 23:35:51.000000000 +0000
 +++ configure
+@@ -5584,7 +5584,7 @@ CF_EOF
+               chmod +x mk_shared_lib.sh
+               ;;
+       darwin*) #(vi
+-              EXTRA_CFLAGS="-no-cpp-precomp"
++              # EXTRA_CFLAGS="-no-cpp-precomp"
+               CC_SHARED_OPTS="-dynamic"
+               MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name 
${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version 
${ABI_VERSION} -o $@'
+               test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
 @@ -7096,6 +7096,13 @@ sco*) #(vi
        # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
        ;;
@@ -29,7 +38,7 @@
    ;;
  esac
  
-@@ -18449,7 +18444,7 @@ echo "${ECHO_T}$LIB_SUBSETS" >&6
+@@ -18592,7 +18594,7 @@ echo "${ECHO_T}$LIB_SUBSETS" >&6
  
  ### Construct the list of include-directories to be generated



Home | Main Index | Thread Index | Old Index