From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Nov 16 20:20:07 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74E25106564A for ; Tue, 16 Nov 2010 20:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 309958FC15 for ; Tue, 16 Nov 2010 20:20:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id oAGKK73f091120 for ; Tue, 16 Nov 2010 20:20:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id oAGKK70Z091119; Tue, 16 Nov 2010 20:20:07 GMT (envelope-from gnats) Resent-Date: Tue, 16 Nov 2010 20:20:07 GMT Resent-Message-Id: <201011162020.oAGKK70Z091119@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, Grigory Rechistov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB329106564A for ; Tue, 16 Nov 2010 20:10:21 +0000 (UTC) (envelope-from ggg_mail@inbox.ru) Received: from smtp6.mail.ru (smtp6.mail.ru [94.100.176.48]) by mx1.freebsd.org (Postfix) with ESMTP id 3F62A8FC0C for ; Tue, 16 Nov 2010 20:10:21 +0000 (UTC) Received: from [93.80.243.182] (port=52361 helo=atakua.doesntexist.org) by smtp6.mail.ru with asmtp id 1PIRr8-0000JS-00 for FreeBSD-gnats-submit@freebsd.org; Tue, 16 Nov 2010 23:10:18 +0300 Received: by atakua.doesntexist.org (sSMTP sendmail emulation); Tue, 16 Nov 2010 23:09:48 +0300 Message-Id: Date: Tue, 16 Nov 2010 23:09:48 +0300 From: "Grigory Rechistov" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/152306: devel/binutils create binary incompatible kernel modules X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Grigory Rechistov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 20:20:07 -0000 >Number: 152306 >Category: ports >Synopsis: devel/binutils create binary incompatible kernel modules >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Nov 16 20:20:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Grigory Rechistov >Release: FreeBSD 8.1-STABLE i386 >Organization: >Environment: System: FreeBSD atakua.doesntexist.org 8.1-STABLE FreeBSD 8.1-STABLE #3: Wed Oct 20 02:06:12 MSD 2010 root@atakua.doesntexist.org:/usr/obj/usr/src/sys/INTOX i386 >Description: When one has devel/binutils port installed and the $PATH is configured the way the utilities from this port take precedence over the system ones (from /usr/bin) it is possible that kernel modules build from port system are binary incompatible with kernel and thus cannot be loaded and used. I experienced this issue with cuse4bsd-kmod and Virtualbox kernel modules. See ports/151603 for example. >How-To-Repeat: 1) Set your $PATH the way thet /usr/local/bin is the first entry in it: export PATH=/usr/local/bin:$PATH 2) Install virtualbox-ose with virtualbox-ose-kmod from ports. 3) Try to load the kernel module vboxdrv.ko 4) You'll see messages on undefined symbols 5) Try to build, install and them load cuse4bsd.ko from ports - it won't create any proper /dev/cuse devices expected from this kernel module >Fix: 1) Deinstall devel/binutils before building kernel modules or 2) Change $PATH so that system binutils are found, not the ones from the port The actually fixed situation should either allow to build _usable_ kernel modules with any binutils in use, or automatically detect the correct ones, or at least warn a user about possible issues. >Release-Note: >Audit-Trail: >Unformatted: