pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/54539: devel/kbuild does not build on macOS (patch with revision upgrade
>Number: 54539
>Category: pkg
>Synopsis: devel/kbuild does not build on macOS (patch with revision upgrade
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Sep 09 13:25:00 +0000 2019
>Originator: clement bouvier
>Release: current
>Organization:
>Environment:
macOS Mojave 10.14.6
>Description:
devez/kbuild does not build on macos.
/Users/cbouvier/prj/pkgsrc/devel/kbuild/work/kBuild-r3127/src/kmk/kmkbuiltin/strlcpy.c:44:8: error: expected ')'
size_t strlcpy(dst, src, siz)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/secure/_string.h:108:47: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^
/Users/cbouvier/prj/pkgsrc/devel/kbuild/work/kBuild-r3127/src/kmk/kmkbuiltin/strlcpy.c:44:8: note: to match this '('
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/secure/_string.h:108:27: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/Users/cbouvier/prj/pkgsrc/devel/kbuild/work/kBuild-r3127/src/kmk/kmkbuiltin/strlcpy.c:44:8: error: conflicting types for '__builtin___strlcpy_chk'
size_t strlcpy(dst, src, siz)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/secure/_string.h:108:3: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/Users/cbouvier/prj/pkgsrc/devel/kbuild/work/kBuild-r3127/src/kmk/kmkbuiltin/strlcpy.c:44:8: note: '__builtin___strlcpy_chk' is a builtin with type 'unsigned long (char *, const char *, unsigned long, unsigned long)'
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/secure/_string.h:108:3: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
^
/Users/cbouvier/prj/pkgsrc/devel/kbuild/work/kBuild-r3127/src/kmk/kmkbuiltin/strlcpy.c:44:8: error: definition of builtin function '__builtin___strlcpy_chk'
size_t strlcpy(dst, src, siz)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/secure/_string.h:108:3: note: expanded from macro 'strlcpy'
__builtin___strlcpy_chk (dest, __VA_ARGS__, __darwin_obsz (dest))
>How-To-Repeat:
Build devel/kbuild on macOS.
>Fix:
-The revision 3248 solves the build problem:
http://trac.netlabs.org/kbuild/browser/trunk/src/kmk/kmkbuiltin/strlcpy.c?annotate=blame
- another install problem are happening at install with the mix of mode (absolute and symbolic) of the filename.
The patch adds:
- the package to the last revision (3296 8 months year old).
- Allow install on macOS
- Add a new file in the PLIST (share/kBuild/units/gccprecomp.kmk)
- Add yacc as USE_TOOLS (some linuxes need it :
kmk: yacc: Command not found on
https://us-east.manta.joyent.com/pkgsrc/public/reports/Linux/el7/trunk/x86_64/20190908.0008/kbuild-0.1.9998.8.r3127nb2/build.log
- removing the prebuilt files are now in post-extract target (I removed pre-build target).
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/kbuild/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile 11 Aug 2019 13:18:44 -0000 1.5
+++ Makefile 9 Sep 2019 13:22:43 -0000
@@ -3,12 +3,12 @@
KBUILDNAME= kBuild
KBUILDVERMAJ= 0.1.9998
KBUILDVERMIN= 8
-KBUILDVERSVN= 3127
+KBUILDVERSVN= 3296
#KBUILDVERFDR= 25
DISTNAME= ${KBUILDNAME}-r${KBUILDVERSVN}
PKGNAME= kbuild-${KBUILDVERMAJ}.${KBUILDVERMIN}.r${KBUILDVERSVN}
-PKGREVISION= 2
+
CATEGORIES= devel
MASTER_SITES= http://svn.netlabs.org/repos/kbuild/trunk
@@ -22,7 +22,7 @@
MAKE_JOBS_SAFE= no
-USE_TOOLS+= pax lex gmake autoconf autoreconf automake autopoint perl
+USE_TOOLS+= pax lex yacc gmake autoconf autoreconf automake autopoint perl
KBUILD_VERSION_PATCH= ${KBUILDVERMAJ:E}
@@ -36,6 +36,7 @@
MAKE_ENV+= TEMPLATE_BIN-KMK_LDFLAGS=${LDFLAGS:Q}
MAKE_ENV+= TEMPLATE_BIN_CFLAGS=${CFLAGS:Q}
MAKE_ENV+= TEMPLATE_BIN_LDFLAGS=${LDFLAGS:Q}
+MAKE_ENV.Darwin+= KBUILD_MACOSX_WHATEVER_MODE=1
INSTALL_ENV+= TEMPLATE_BIN_CFLAGS=${CFLAGS:Q}
INSTALL_ENV+= TEMPLATE_BIN_LDFLAGS=${LDFLAGS:Q}
@@ -45,6 +46,7 @@
INSTALL_ENV+= kDepPre_LDFLAGS=${LDFLAGS:Q}
INSTALL_ENV+= kmk_sed_LDFLAGS=${LDFLAGS:Q}
INSTALL_ENV+= kmk_time_LDFLAGS=${LDFLAGS:Q}
+INSTALL_ENV+= KBUILD_MACOSX_WHATEVER_MODE=1
.PHONY: fetch-with-svn
fetch-with-svn:
@@ -58,9 +60,7 @@
post-extract:
${RUN} ${CP} ${FILESDIR}/SvnInfo.kmk ${WRKSRC}/
-
-pre-build:
-# Remove prebuilt files
+ # Remove prebuilt files
${RUN} cd ${WRKSRC} && rm -rf kBuild/bin/*
do-build:
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/devel/kbuild/PLIST,v
retrieving revision 1.2
diff -u -r1.2 PLIST
--- PLIST 2 Jan 2018 10:37:29 -0000 1.2
+++ PLIST 9 Sep 2019 13:22:43 -0000
@@ -137,6 +137,7 @@
share/kBuild/tools/YASM.kmk
share/kBuild/tools/ZIP.kmk
share/kBuild/units/dtrace.kmk
+share/kBuild/units/gccprecomp.kmk
share/kBuild/units/lex.kmk
share/kBuild/units/qt3.kmk
share/kBuild/units/qt4.kmk
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/kbuild/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 2 Jan 2018 10:37:29 -0000 1.2
+++ distinfo 9 Sep 2019 13:22:43 -0000
@@ -1,10 +1,11 @@
$NetBSD: distinfo,v 1.2 2018/01/02 10:37:29 wiz Exp $
-SHA1 (kBuild-r3127.tar.gz) = 1f2d383c504a7881a2ef71b1470c2422b773316d
-RMD160 (kBuild-r3127.tar.gz) = aea4428954871e44ebb4ccb7bf1f4facc91a92a6
-SHA512 (kBuild-r3127.tar.gz) = 6a724892d32c25a08dede7969d3878dea2c18f47da30908b147451e36297f77fdb806c34c457524010d3eadf199858843a92ca4cef774a0b8a700471708cb36c
-Size (kBuild-r3127.tar.gz) = 17579258 bytes
+SHA1 (kBuild-r3296.tar.gz) = f6e70eca018e6981a2ec2fee83dcdd7b5cc99635
+RMD160 (kBuild-r3296.tar.gz) = fd5305818005560e103b021811fb957e224514e9
+SHA512 (kBuild-r3296.tar.gz) = b09436fd3957778ee84ee57348567923ad6b0b7ffb29481c71e2fc624b046e972aec1eae0ed9985e0a4b567164305563e9af6d25ab1134cd8bd9d4d7760f6fcc
+Size (kBuild-r3296.tar.gz) = 19158885 bytes
+SHA1 (patch-kBuild_footer-pass2-compiling-targets.kmk) = 630a719c1429b4d0438bb3d812cae1034108310e
SHA1 (patch-kBuild_header.kmk) = bcba91ea5f4ae200087aa0adf4632b461661ed26
-SHA1 (patch-src_kmk_Makefile.kmk) = 7647322e79030bf794caa900feaf5dbe293a2247
+SHA1 (patch-src_kmk_Makefile.kmk) = 550f5e9af14b479e7ae41ba52e7e8b95b5184f00
SHA1 (patch-src_kmk_kmkbuiltin_osdep.c) = de8a40b3a454abaf82b3384f0c44dd98794d0267
SHA1 (patch-src_sed_lib_utils.c) = a2414f2d80623b94ab34fbc1744a2e3bc33571b3
Index: files/SvnInfo.kmk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/kbuild/files/SvnInfo.kmk,v
retrieving revision 1.1
diff -u -r1.1 SvnInfo.kmk
--- files/SvnInfo.kmk 2 Jan 2018 10:37:29 -0000 1.1
+++ files/SvnInfo.kmk 9 Sep 2019 13:22:43 -0000
@@ -1,2 +1,2 @@
KBUILD_SVN_URL := http://svn.netlabs.org/repos/kbuild/trunk
-KBUILD_SVN_REV := 3127
+KBUILD_SVN_REV := 3296
Index: patches/patch-kBuild_footer-pass2-compiling-targets.kmk
===================================================================
RCS file: patches/patch-kBuild_footer-pass2-compiling-targets.kmk
diff -N patches/patch-kBuild_footer-pass2-compiling-targets.kmk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-kBuild_footer-pass2-compiling-targets.kmk 9 Sep 2019 13:22:43 -0000
@@ -0,0 +1,15 @@
+$NetBSD$
+
+- If absolute mode is given, symbolic mode cannot work.
+
+--- kBuild/footer-pass2-compiling-targets.kmk.orig 2019-01-05 03:24:58.000000000 +0000
++++ kBuild/footer-pass2-compiling-targets.kmk
+@@ -465,7 +465,7 @@ $(target)_2_DEBUG_INSTALL_TARGET_FILES :
+ if ( defined($(target)_2_OUTPUT_DEBUG_DIRS) \
+ || defined($(target)_2_OUTPUT_DEBUG_FILES) ) \
+ && "$($(target)_1_DEBUG_INSTTYPE)" != "none"
+- local mode := $(if $(mode),$(mode)$(COMMA)a-x,0644)
++ local mode := $(if $(mode),$(mode),0644)
+
+ ifeq ($($(target)_1_DEBUG_INSTTYPE),both)
+ local debug_inst_path := $(PATH_INS)
Index: patches/patch-src_kmk_Makefile.kmk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/kbuild/patches/patch-src_kmk_Makefile.kmk,v
retrieving revision 1.2
diff -u -r1.2 patch-src_kmk_Makefile.kmk
--- patches/patch-src_kmk_Makefile.kmk 2 Jan 2018 10:37:29 -0000 1.2
+++ patches/patch-src_kmk_Makefile.kmk 9 Sep 2019 13:22:43 -0000
@@ -2,10 +2,10 @@
Add NetBSD support.
---- src/kmk/Makefile.kmk.orig 2017-11-26 23:29:40.000000000 +0900
-+++ src/kmk/Makefile.kmk 2017-11-27 00:19:02.807006197 +0900
-@@ -264,6 +264,9 @@
- w32/subproc/sub_proc.c
+--- src/kmk/Makefile.kmk.orig 2018-03-30 21:03:40.000000000 +0000
++++ src/kmk/Makefile.kmk
+@@ -301,6 +301,9 @@ kmk_SOURCES.win = \
+ endif
kmk_DEFS.freebsd.x86 = CONFIG_WITHOUT_THREADS
+kmk_DEFS.netbsd.x86 = CONFIG_WITHOUT_THREADS
@@ -14,7 +14,7 @@
#kmk_LIBS.solaris = malloc
#kmk_DEFS.solaris += HAVE_MALLINFO
-@@ -702,5 +705,3 @@
+@@ -748,5 +751,3 @@ test_all: \
test_2ndtargetexp \
test_30_continued_on_failure \
test_lazy_deps_vars
Home |
Main Index |
Thread Index |
Old Index