From owner-freebsd-ports-bugs@FreeBSD.ORG Mon May 16 00:10:10 2005 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 330A816A4CE for ; Mon, 16 May 2005 00:10:10 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E23F743D68 for ; Mon, 16 May 2005 00:10:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j4G0A1mb012276 for ; Mon, 16 May 2005 00:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j4G0A1BZ012275; Mon, 16 May 2005 00:10:01 GMT (envelope-from gnats) Resent-Date: Mon, 16 May 2005 00:10:01 GMT Resent-Message-Id: <200505160010.j4G0A1BZ012275@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Isaac Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7EEA916A4CE for ; Mon, 16 May 2005 00:02:55 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E2DA43D91 for ; Mon, 16 May 2005 00:02:55 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j4G02n9U010950 for ; Mon, 16 May 2005 00:02:49 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j4G02n5I010949; Mon, 16 May 2005 00:02:49 GMT (envelope-from nobody) Message-Id: <200505160002.j4G02n5I010949@www.freebsd.org> Date: Mon, 16 May 2005 00:02:49 GMT From: Isaac To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: ports/81085: Processing of "-jN" flags for "make" builds X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2005 00:10:10 -0000 >Number: 81085 >Category: ports >Synopsis: Processing of "-jN" flags for "make" builds >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: Mon May 16 00:10:01 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Isaac >Release: 5.3-RELEASE 5.4-RELEASE 6.0-CURRENT >Organization: >Environment: FreeBSD bsd3.osfsir.org 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun May 15 09:39:43 PDT 2005 root@bsd3.osfsir.org:/usr/obj/usr/src/sys/kernel5 i386 >Description: Hi, I'm having problems building the many of the ports with dependencies like Xorg, KDE, etc., when I use the -j8 flag inline with "make" command or set in the environment or "/etc/make.conf". For example, if I want to build "xorg" port or any of it's dependency (xorg-client, xorg-libraries, etc) where the port in question requires other port(s)/package(s) that are not installed, it proceeds to build that dependant port. If the -j8 flag is sent via command line or set in the environment, the build of the dependant build port will fail because of an error: cd: can't cd to However, I can successfully6 build the port without the use of -j8 flag using any of the following commands: # make # make install # make install clean # make clean && FORCE_PKG_REGISTER=1 make install clean # make clean && make install clean Or in the bash shell: # for bldport in ; do cd $bldport; FORCE_PKG_REGISTER=1 make install clean; done; **** The breakdown approach: If I did each step separately, # cd /usr/ports/x11/xorg-clients # make clean # make extract # make patch # make configure # make -j8 build or # make build -j8 I didn't get the "can't cd to" error but I got another error: /usr/bin/ld: cannot find -llisp Which the # make -j8 configure failed during the changing of the directory. But if I just do # make build (without the -j8 flag) it builds fine which brings back to all the in one step: # make **** On another note: I've successfully with ccache and distcc running: # cd /usr/src # make -j12 buildkernel KERNCONF=kernel5 on 5.3-RELEASE and 5.4-RELEASE and on 6.0-CURRENT, # make -j12 buildkernel KERNCONF=kernel6 The -j flag used in buildworld works too but buildworld opened a large can of worms with errors from Heimdal/Kerberos, and others (I can't remember off the top of my head). Buildworld is beyond this scope anyway... ;) I have 3 systems running FreeBSD 5.3-RELEASE, 5.4-RELEASE, & 6.0-CURRENT. The use of -j8 flag on any of these systems will fail even if it's fresh minimal install and port build the rest. I have ccache and distcc running on all 3 systems. The use of -j8 flag will still fail even if I disabled both ccache and distcc via environment setting NOCCACHE=1 and removing the masquerated directories from the path. This can be confirmed that both ccache and distcc are not running when the make build happens, via ccache -s and DISTCC_VERBOSE=1. I've read both the online man (pages) and the handbook regarding the use of -j flag. According the the man page, if the -j flag is not specified via command line or environment, the -B flag will be used which is sequential (1 job) processing. I've tried to understand port build process of handling the -j flag by reading the main.c in /usr/src/usr.bin/make and reading the bsd.port*.mk files in /usr/ports/Mk but I'm not having much luck since I'm a BSD n00b :( and haven't done much C/C++ programming in ages. If more information is needed, I'll try to provide as much as I can including dmesg, script capture of screen output, etc. I really want to make full use of the -j flag for time saving (via SMP or parallel/distributing computing/compiling) since I want to start developing on FreeBSD :D. Thanks, Isaac BSD n00b in the learning process NOTE: The use of the -j flag will fail even if the port/package is already installed. All compilations are done as root and the compilers: CC, cc, gcc, g++, c++ are version 3.4.2 [FreeBSD] 20040728 >How-To-Repeat: # cd /usr/ports/x11/xorg-clients then # make clean # make -j8 <<< even -j2 will fail or # make clean && make -j8 >Fix: >Release-Note: >Audit-Trail: >Unformatted: