pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/60714: lang/gnucobol: does not package on macOS (CBL_OC_DUMP.so vs .dylib)
>Number: 60714
>Category: pkg
>Synopsis: lang/gnucobol: does not package on macOS (CBL_OC_DUMP.so vs .dylib)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 10 23:25:00 +0000 2026
>Originator: Showta Ishizaki
>Release: NetBSD 11.0, pkgsrc CVS as of 2026-09-01
>Organization:
>Environment:
System: NetBSD 11.0 amd64
Architecture: x86_64
Machine: amd64
>Description:
lang/gnucobol fails at the packaging step on macOS:
pkg_create: can't stat .../lib/gnucobol/CBL_OC_DUMP.so
ERROR: ... in the PLIST but not in .../destdir: .../CBL_OC_DUMP.so
ERROR: ... in .../destdir but not in the PLIST: .../CBL_OC_DUMP.dylib
The helper module CBL_OC_DUMP is built and loaded with the extension
COB_MODULE_EXT, which gnucobol's configure sets to the platform's
shared-library suffix (acl_cv_shlibext): "so" on ELF, "dylib" on
Darwin, "dll" on Windows. extras/Makefile installs
CBL_OC_DUMP.$(COB_MODULE_EXT) and libcob's cob_resolve() loads it with
the same suffix, so the two are always consistent. PLIST, however,
hardcodes CBL_OC_DUMP.so, so on macOS the build installs a .dylib that
the PLIST does not list.
I built lang/gnucobol on macOS and saw the failure above; the module
is installed as CBL_OC_DUMP.dylib. With the patch below the package
builds cleanly (gnucobol-3.2nb8.tgz).
NetBSD is not affected: there COB_MODULE_EXT is "so", so the PLIST
entry expands back to CBL_OC_DUMP.so, exactly as before.
>How-To-Repeat:
Build lang/gnucobol on macOS. It stops at the package stage with the
PLIST mismatch above.
>Fix:
Make the PLIST follow the module suffix instead of assuming .so.
--- Makefile.orig
+++ Makefile
@@ -25,6 +25,14 @@
INFO_FILES= yes
TEST_TARGET= check
+.include "../../mk/bsd.prefs.mk"
+
+COBOL_MODULE_EXT= so
+.if ${OPSYS} == "Darwin"
+COBOL_MODULE_EXT= dylib
+.endif
+PLIST_SUBST+= COBOL_MODULE_EXT=${COBOL_MODULE_EXT}
+
SUBST_CLASSES+= bdb
SUBST_MESSAGE.bdb= Detect pkgsrc Berkeley DB library
SUBST_STAGE.bdb= pre-configure
--- PLIST.orig
+++ PLIST
@@ -10,7 +10,7 @@
include/libcob/statement.def
include/libcob/version.h
info/gnucobol.info
-lib/gnucobol/CBL_OC_DUMP.so
+lib/gnucobol/CBL_OC_DUMP.${COBOL_MODULE_EXT}
lib/libcob.la
man/man1/cob-config.1
man/man1/cobc.1
Home |
Main Index |
Thread Index |
Old Index