Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 2013 00:43:19 GMT
From:      Daniel Lorch <dlorch@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/184296: kBuild won't install on DragonFlyBSD due to hardcoded values in Makefile
Message-ID:  <201311260043.rAQ0hJu2081816@oldred.freebsd.org>
Resent-Message-ID: <201311260050.rAQ0o0ii083286@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         184296
>Category:       ports
>Synopsis:       kBuild won't install on DragonFlyBSD due to hardcoded values in Makefile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 26 00:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Lorch
>Release:        DragonFlyBSD 3.4.3
>Organization:
>Environment:
DragonFly dfly 3.4-RELEASE DragonFly v.343-RELEASE #0: Wed Aug 28 09:47:40 UTC 2013 root@/usr/obj/src/sys/X86_64_GENERIC x86_64
>Description:
kBuild won't install on DragonFlyBSD due to hardcoded OS string "freebsd" in the port's Makefile. 

DragonFlyBSD is using `dports', which is a port of the FreeBSD ports system. I am reporting the problem here ("upstream"), because I believe this is the right place to fix it.

Note that `kBuild' builds perfectly fine on DragonFly BSD, but the `make install' will fail because it is looks for the wrong path names (namely "freebsd" instead of "dragonfly"). Additionally, the Makefile fails to recognize the `amd64' architecture.

Here is an extract from `make install':

===>  Installing for kBuild-0.1.9998
===>   Generating temporary packing list
===>  Checking if devel/kBuild already installed
install  -s -o root -g wheel -m 555 /wrkdirs/devel/kBuild/work/kBuild-0.1.9998/out/freebsd.x86_64/release/stage/usr/local/bin/kDepIDB /usr/local/bin
install: /wrkdirs/devel/kBuild/work/kBuild-0.1.9998/out/freebsd.x86_64/release/stage/usr/local/bin/kDepIDB: No such file or directory
*** Error code 71

Stop.
make: stopped in /usr/dports/devel/kBuild
===>  Cleaning for kBuild-0.1.9998
build of /usr/dports/devel/kBuild ended at Wed Aug 28 02:41:00 PDT 2013

The full log can be obtained here: http://leaf.dragonflybsd.org/~marino/boomlogs/kBuild-0.1.9998.log
>How-To-Repeat:
cd /usr/dports/devel/kBuild && make install
>Fix:
I would like to suggest the patch attached to be applied to /usr/ports/devel/kBuild/Makefile and I am looking forward to your esteemed feedback.

Patch attached with submission follows:

--- /usr/freebsd-ports/devel/kBuild/Makefile	2013-11-22 02:45:10.218246000 +0000
+++ Makefile	2013-11-26 00:36:50.105484000 +0000
@@ -29,6 +29,7 @@
 		AUTORECONF=${AUTORECONF} \
 		AUTOPOINT=true
 USE_GCC=	any
+KBUILD_TARGET=	${OPSYS:tl}
 
 KBUILD_BINS=	kDepIDB kDepPre kObjCache kmk kmk_append kmk_ash kmk_cat \
 		kmk_chmod kmk_cmp kmk_cp kmk_echo kmk_expr kmk_gmake \
@@ -65,14 +66,14 @@
 
 do-install:
 .for bin in ${KBUILD_BINS}
-	${INSTALL_PROGRAM} ${WRKSRC}/out/freebsd.${KBUILD_ARCH}/release/stage${PREFIX}/bin/${bin} ${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/out/${KBUILD_TARGET}.${KBUILD_ARCH}/release/stage${PREFIX}/bin/${bin} ${PREFIX}/bin
 .endfor
 	${MKDIR} ${DATADIR}
-	(cd ${WRKSRC}/out/freebsd.${KBUILD_ARCH}/release/stage${PREFIX}/share/kBuild && ${COPYTREE_SHARE} \* ${DATADIR})
+	(cd ${WRKSRC}/out/${KBUILD_TARGET}.${KBUILD_ARCH}/release/stage${PREFIX}/share/kBuild && ${COPYTREE_SHARE} \* ${DATADIR})
 .if !defined(NOPORTDOCS)
 	${MKDIR} ${DOCSDIR}
 .for doc in ${PORTDOCS}
-	${INSTALL_DATA} ${WRKSRC}/out/freebsd.${KBUILD_ARCH}/release/stage${PREFIX}/share/doc/${PORTNAME}-${KBUILD_VERSION}/${doc} ${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/out/${KBUILD_TARGET}.${KBUILD_ARCH}/release/stage${PREFIX}/share/doc/${PORTNAME}-${KBUILD_VERSION}/${doc} ${DOCSDIR}
 .endfor
 .endif
 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311260043.rAQ0hJu2081816>