From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Nov 19 22:50:06 2011 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 8B8851065670 for ; Sat, 19 Nov 2011 22:50:05 +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 5BCCF8FC14 for ; Sat, 19 Nov 2011 22:50:05 +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 pAJMo5Q7050980 for ; Sat, 19 Nov 2011 22:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id pAJMo5pa050979; Sat, 19 Nov 2011 22:50:05 GMT (envelope-from gnats) Resent-Date: Sat, 19 Nov 2011 22:50:05 GMT Resent-Message-Id: <201111192250.pAJMo5pa050979@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, Don Lewis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 214DF1065670 for ; Sat, 19 Nov 2011 22:41:14 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) by mx1.freebsd.org (Postfix) with ESMTP id E2FEB8FC0C for ; Sat, 19 Nov 2011 22:41:13 +0000 (UTC) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id pAJMCH7j045259 for ; Sat, 19 Nov 2011 14:12:17 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from mousie.catspoiler.org (localhost.catspoiler.org [127.0.0.1]) by mousie.catspoiler.org (8.14.5/8.14.5) with ESMTP id pAJMCG6o037480; Sat, 19 Nov 2011 14:12:16 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: (from dl@localhost) by mousie.catspoiler.org (8.14.5/8.14.5/Submit) id pAJMCGfB037479; Sat, 19 Nov 2011 14:12:16 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201111192212.pAJMCGfB037479@mousie.catspoiler.org> Date: Sat, 19 Nov 2011 14:12:16 -0800 (PST) From: Don Lewis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: maho@mousie.catspoiler.org Subject: ports/162686: atlas build tries to use 64 bit fortran compiler on AMD64 hardware running 32 bit kernel [patch] X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Don Lewis List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Nov 2011 22:50:06 -0000 >Number: 162686 >Category: ports >Synopsis: atlas build tries to use 64 bit fortran compiler on AMD64 hardware running 32 bit kernel [patch] >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: Sat Nov 19 22:50:04 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Don Lewis >Release: FreeBSD 9.9-CURRENT i386 >Organization: none >Environment: System: FreeBSD scratch.catspoiler.org 9.9-CURRENT FreeBSD 10.0-CURRENT #64: Mon Nov 14 15:09:48 PST 2011 dl@scratch.catspoiler.org:/usr/obj/usr/src/sys/GENERICSMB i386 AMD64 running i386 kernel, userland, and ports gcc-4.6.3.20111111 >Description: When attempting to build the math/atlas port on x86_64 hardware running a 32 bit kernel, userland, and ports, the atlas hardware probe detects that it is running on an x86_64 architecture CPU. The build then assumes that it should do a 64 bit build and falls over when gfortran rejects the -m64 option. Strangely, it doesn't attempt this when compiling C code with gcc. cmnd=make IRunCComp CC='gcc46' CCFLAGS='-O -fomit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC ' | fgrep SUCCESS gcc46 -O -fomit-frame-pointer -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC : SUCCESS! f951: sorry, unimplemented: 64-bit mode not compiled in cmnd=make IRunF77Comp F77='gfortran46' F77FLAGS='-fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC -m64' | fgrep SUCCESS gfortran46 -fomit-frame-pointer -mfpmath=387 -O2 -falign-loops=4 -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC -m64 : FAILURE! f951: sorry, unimplemented: 64-bit mode not compiled in cmnd=make IRunF77Comp F77='gfortran46' F77FLAGS='-O -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC -m64' | fgrep SUCCESS gfortran46 -O -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC -m64 : FAILURE! g77: not found cmnd=make IRunF77Comp F77='g77' F77FLAGS='-O -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC ' | fgrep SUCCESS g77 -O -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC : FAILURE! f77: not found cmnd=make IRunF77Comp F77='f77' F77FLAGS='-O -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC ' | fgrep SUCCESS f77 -O -Wl,-rpath=/usr/local/lib/gcc46 -fpic -DPIC : FAILURE! Unable to find usable compiler for F77; abortingMake sure compilers are in your path, and specify good compilers to configure (see INSTALL.txt or 'configure --help' for details)*** Error code 7 Stop in /usr/ports/math/atlas/work/ATLAS/shared. *** Error code 1 Stop in /usr/ports/math/atlas/work/ATLAS/shared. Assertion failed: (!system(ln)), function ProbeComp, file /usr/ports/math/atlas/work/ATLAS/shared/..//CONFIG/src/config.c, line 125. cmnd=make IRun_OS args="-v 2 " | fgrep 'OS=' OS configured as FreeBSD (10) cmnd=make IRun_asm args="-v 2 -O 10" | fgrep 'ASM=' Assembly configured as GAS_x8632 (1) cmnd=make IRun_vec args="-v 2 -O 10 -s 1" | fgrep 'VECFLAG=' Vector ISA Extension configured as SSE3 (2,60) cmnd=make IRun_arch args="-v 2 -O 10 -s 1 -a" | fgrep 'MACHTYPE=' Architecture configured as HAMMER (24) cmnd=make IRun_arch args="-v 2 -O 10 -s 1 -m" | fgrep 'CPU MHZ=' Clock rate configured as 2500Mhz cmnd=make IRun_arch args="-v 2 -O 10 -s 1 -n" | fgrep 'NCPU=' Maximum number of threads configured as 2 cmnd=make IRun_arch args="-v 2 -O 10 -s 1 -b" | fgrep 'PTR BITS=' Pointer width configured as 64 cmnd=make IRun_arch args="-v 2 -O 10 -s 1 -t" | fgrep 'CPU THROTTLE=' Cannot detect CPU throttling. Abort trap (core dumped) xconfig exited with 134 *** Error code 134 Stop in /usr/ports/math/atlas. *** Error code 1 Stop in /usr/ports/math/atlas. >How-To-Repeat: Attempt to build the math/atlas port on x86_64 hardware running a 32 bit kernel and userland. >Fix: There is probably a way that the hardware probe could detect that the CPU is running in 32 bit mode on x86_64 hardware that could be added to the generic probe code. The following patch just skips the generic probe so that the FreeBSD specific probe is executed instead. --- CONFIG/src/probe_arch.c.orig 2011-05-14 10:33:24.000000000 -0700 +++ CONFIG/src/probe_arch.c 2011-10-24 18:29:44.000000000 -0700 @@ -107,7 +107,7 @@ /* * If Assembler right or unspecified, try x86 probe */ - if (asmd == gas_x86_32 || asmd == gas_x86_64) + if ((asmd == gas_x86_32 || asmd == gas_x86_64) && OS != OSFreeBSD) { sprintf(cmnd, "make IRunArchInfo_x86 MYFLAGS=\"-DATL_OS_%s -DATL_%s\" args=\"%s\" %s | fgrep '%s'", osnam[OS], ASMNAM[asmd], flag, targ, find); >Release-Note: >Audit-Trail: >Unformatted: