NetBSD Problem Report #47949

From www@NetBSD.org  Fri Jun 21 13:20:52 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 28B5D70A07
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 21 Jun 2013 13:20:52 +0000 (UTC)
Message-Id: <20130621132050.4B19B714FC@mollari.NetBSD.org>
Date: Fri, 21 Jun 2013 13:20:50 +0000 (UTC)
From: jwbacon@tds.net
Reply-To: jwbacon@tds.net
To: gnats-bugs@NetBSD.org
Subject: devel/ncurses fails to build on Darwin with a non-Xcode compiler
X-Send-Pr-Version: www-1.0

>Number:         47949
>Category:       pkg
>Synopsis:       devel/ncurses fails to build on Darwin with a non-Xcode compiler
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sevan
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 21 13:25:00 +0000 2013
>Closed-Date:    Wed Feb 18 03:19:18 +0000 2015
>Last-Modified:  Wed Feb 18 03:19:18 +0000 2015
>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

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->macosx-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Sat, 22 Jun 2013 12:38:35 +0000
Responsible-Changed-Why:
Problem on Darwin.


Responsible-Changed-From-To: macosx-pkg-people->macos-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Sat, 22 Jun 2013 12:40:53 +0000
Responsible-Changed-Why:
correct roll name.


Responsible-Changed-From-To: macos-pkg-people->sevan
Responsible-Changed-By: sevan@NetBSD.org
Responsible-Changed-When: Mon, 26 Jan 2015 18:30:28 +0000
Responsible-Changed-Why:
taking this


From: "Sevan Janiyan" <sevan@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47949 CVS commit: pkgsrc/devel/ncurses
Date: Wed, 18 Feb 2015 03:10:42 +0000

 Module Name:	pkgsrc
 Committed By:	sevan
 Date:		Wed Feb 18 03:10:42 UTC 2015

 Modified Files:
 	pkgsrc/devel/ncurses: distinfo
 	pkgsrc/devel/ncurses/patches: patch-ac

 Log Message:
 Drop the use of -no-cpp-precomp which is specific to Apple's supplied toolchain
 Provide an explaination of changes in patches/patch-ac

 Closes PR pkg/47949
 Reviewed by wiz@


 To generate a diff of this commit:
 cvs rdiff -u -r1.24 -r1.25 pkgsrc/devel/ncurses/distinfo
 cvs rdiff -u -r1.21 -r1.22 pkgsrc/devel/ncurses/patches/patch-ac

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: sevan@NetBSD.org
State-Changed-When: Wed, 18 Feb 2015 03:19:18 +0000
State-Changed-Why:
Commited, thanks!


>Unformatted:

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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.