NetBSD Problem Report #49417

From www@NetBSD.org  Tue Nov 25 10:13:07 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id ABF1BA57FD
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 25 Nov 2014 10:13:07 +0000 (UTC)
Message-Id: <20141125101306.3949FA57FE@mollari.NetBSD.org>
Date: Tue, 25 Nov 2014 10:13:06 +0000 (UTC)
From: venture37@geeklan.co.uk
Reply-To: venture37@geeklan.co.uk
To: gnats-bugs@NetBSD.org
Subject: fix lang/ocaml build issue on Darwin PowerPC prior to 9
X-Send-Pr-Version: www-1.0

>Number:         49417
>Category:       pkg
>Synopsis:       fix lang/ocaml build issue on Darwin PowerPC prior to 9
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 25 10:15:00 +0000 2014
>Closed-Date:    Tue Nov 25 11:10:47 +0000 2014
>Last-Modified:  Tue Nov 25 11:10:47 +0000 2014
>Originator:     Sevan Janiyan
>Release:        pkgsrc-current
>Organization:
>Environment:
Darwin 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc
>Description:
Build fails on Tiger PowerPC with
gcc -pipe -O2 -I/usr/include -DCAML_NAME_SPACE -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT  -DDB_DBM_HSEARCH -isystem /usr/include -I/usr/include  -c -o prims.o prims.c
gcc -Wl,-no_compact_unwind  -o ocamlrun \
	  prims.o libcamlrun.a -L/usr/lib -L/usr/pkg/lib    -lcurses -lpthread
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: unknown flag: -no_compact_unwind
collect2: ld returned 1 exit status
Makefile:29: recipe for target 'ocamlrun' failed
gmake[2]: *** [ocamlrun] Error 1
gmake[2]: Leaving directory '/private/tmp/lang/ocaml/work/ocaml-4.02.0/byterun'
Makefile:186: recipe for target 'coldstart' failed
gmake[1]: *** [coldstart] Error 2
gmake[1]: Leaving directory '/private/tmp/lang/ocaml/work/ocaml-4.02.0'
Makefile:135: recipe for target 'world' failed
gmake: *** [world] Error 2

Amend the version match string in hacks.mk to apply to versions 9 and prior & not specifically to 9.
>How-To-Repeat:

>Fix:
Index: hacks.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/ocaml/hacks.mk,v
retrieving revision 1.4
diff -u -r1.4 hacks.mk
--- hacks.mk    9 Oct 2014 19:08:28 -0000       1.4
+++ hacks.mk    25 Nov 2014 10:05:42 -0000
@@ -6,7 +6,7 @@
 .include "../../mk/compiler.mk"

 ### [Fri Jan 17 18:06:18 JST 2014 : pho]
-### The linker comes with Darwin 9 does not recognize the option
+### The linker that comes with Darwin 9 & prior does not recognize the option
 ### "-no_compact_unwind" since compact unwind information is only
 ### introduced (and made default) as of Darwin 10.  Note that this
 ### can't be worked around with transformation
@@ -14,7 +14,7 @@
 ### into utils/config.ml and will later be used by the OCaml compiler
 ### itself.
 ###
-.if !empty(MACHINE_PLATFORM:MDarwin-9.*)
+.if !empty(MACHINE_PLATFORM:MDarwin-[0-9].*-*)
 PKG_HACKS+=    no_compact_unwind
 SUBST_CLASSES+=        no_compact_unwind
 SUBST_MESSAGE.no_compact_unwind= Removing -no_compact_unwind from linker options

>Release-Note:

>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49417 CVS commit: pkgsrc/lang/ocaml
Date: Tue, 25 Nov 2014 11:09:51 +0000

 Module Name:	pkgsrc
 Committed By:	obache
 Date:		Tue Nov 25 11:09:51 UTC 2014

 Modified Files:
 	pkgsrc/lang/ocaml: hacks.mk

 Log Message:
 linker flag hack is required on Darwin prior to 9 too.

 PR pkg/49417 by Sevan Janiyan.


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/ocaml/hacks.mk

 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: obache@NetBSD.org
State-Changed-When: Tue, 25 Nov 2014 11:10:47 +0000
State-Changed-Why:
Committed.  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.