NetBSD Problem Report #56341

From www@netbsd.org  Sun Aug  1 12:26:10 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 577061A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  1 Aug 2021 12:26:10 +0000 (UTC)
Message-Id: <20210801122608.B50621A923A@mollari.NetBSD.org>
Date: Sun,  1 Aug 2021 12:26:08 +0000 (UTC)
From: jonthn+pkgsrc@pinacea.com
Reply-To: jonthn+pkgsrc@pinacea.com
To: gnats-bugs@NetBSD.org
Subject: Fix developers/lua-BitOp
X-Send-Pr-Version: www-1.0

>Number:         56341
>Category:       pkg
>Synopsis:       Fix developers/lua-BitOp
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 01 12:30:00 +0000 2021
>Closed-Date:    Sat Aug 07 03:29:43 +0000 2021
>Last-Modified:  Sat Aug 07 03:29:43 +0000 2021
>Originator:     Jonathan Buschmann
>Release:        current
>Organization:
>Environment:
>Description:
Currently devel/lua-BitOp is broken on macOS as the linking process is using both `-dynamiclib` and `-bundle` which does not work.
Moreover using MACOSX_DEPLOYMENT_TARGET only for the linking process is not the correct way it should be used for both compilation of sources and linking.

Attached is a possible fix the other option would be to use LUA_LINKER_MAGIC=no I did not choose this option as I assume most Lua module are compiled with -bundle on macOS and it's better to keep consistency on this part.
But your opinion may differ.
>How-To-Repeat:

>Fix:
diff --git i/devel/lua-BitOp/distinfo w/devel/lua-BitOp/distinfo
index b4939928cf5..8c9c044b5fa 100644
--- i/devel/lua-BitOp/distinfo
+++ w/devel/lua-BitOp/distinfo
@@ -4,4 +4,4 @@ SHA1 (LuaBitOp-1.0.2.tar.gz) = 1f611edbc4f65279072c96af15bd6e455ea9dd10
 RMD160 (LuaBitOp-1.0.2.tar.gz) = 6b5a44515022ed1f4edb9d966b8ea3aa9c38a892
 SHA512 (LuaBitOp-1.0.2.tar.gz) = a652050ea5c6fbeb8a28b05e2bc4a3550c854cc45f7f42c8c1b0a81f5b76773cdf061e6a839cdb339614118169e578b6e3efa5a3efbe59a2f01874b2fa2b4f2e
 Size (LuaBitOp-1.0.2.tar.gz) = 23127 bytes
-SHA1 (patch-Makefile) = 5b484bdbaa2cc94b1b73177f3eeb0a686f7e897d
+SHA1 (patch-Makefile) = 686c642a513e50156145738d13f0a7b3a18bce7e
diff --git i/devel/lua-BitOp/patches/patch-Makefile w/devel/lua-BitOp/patches/patch-Makefile
index bf300755508..5255f261a30 100644
--- i/devel/lua-BitOp/patches/patch-Makefile
+++ w/devel/lua-BitOp/patches/patch-Makefile
@@ -1,6 +1,7 @@
 $NetBSD: patch-Makefile,v 1.3 2016/08/20 12:43:40 alnsn Exp $

 Install tweaks.
+macOS linking

 --- Makefile.orig	2012-05-08 19:15:00.000000000 +0000
 +++ Makefile
@@ -22,6 +23,15 @@ Install tweaks.

  CC= gcc
  CCOPT= -O2 -fomit-frame-pointer
+@@ -30,7 +30,7 @@ all: $(MODSO)
+ 
+ # Alternative target for compiling on Mac OS X:
+ macosx:
+-	$(MAKE) all "SOCC=MACOSX_DEPLOYMENT_TARGET=10.4 $(CC) -dynamiclib -single_module -undefined dynamic_lookup"
++	$(MAKE) all "SOCC=$(CC)"
+ 
+ $(MODNAME).o: $(MODNAME).c
+ 	$(CC) $(SOCFLAGS) -c -o $@ $<
 @@ -39,7 +39,8 @@ $(MODSO): $(MODNAME).o
  	$(SOCC) $(SOLDFLAGS) -o $@ $<


>Release-Note:

>Audit-Trail:
From: "Nia Alarie" <nia@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56341 CVS commit: pkgsrc/devel/lua-BitOp
Date: Sun, 1 Aug 2021 12:39:46 +0000

 Module Name:	pkgsrc
 Committed By:	nia
 Date:		Sun Aug  1 12:39:46 UTC 2021

 Modified Files:
 	pkgsrc/devel/lua-BitOp: distinfo
 	pkgsrc/devel/lua-BitOp/patches: patch-Makefile

 Log Message:
 lua-BitOp: fix on macOS. via Jonathan Buschmann

 PR pkg/56341


 To generate a diff of this commit:
 cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/lua-BitOp/distinfo
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/lua-BitOp/patches/patch-Makefile

 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: dholland@NetBSD.org
State-Changed-When: Sat, 07 Aug 2021 03:29:43 +0000
State-Changed-Why:
committed, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.