From owner-freebsd-current@FreeBSD.ORG Sun Jun 15 01:44:27 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A03E157 for ; Sun, 15 Jun 2014 01:44:27 +0000 (UTC) Received: from mail-ig0-f169.google.com (mail-ig0-f169.google.com [209.85.213.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D105B21C9 for ; Sun, 15 Jun 2014 01:44:26 +0000 (UTC) Received: by mail-ig0-f169.google.com with SMTP id a13so2731967igq.2 for ; Sat, 14 Jun 2014 18:44:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:content-type:mime-version:subject :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=o399qWYhnt9c+mba62ZQXM+e+louBEWFUiZ0QhwcH7I=; b=iqHZcBb6RxsZ4ih7PJWtiZKMGdyVHSbypPeLZn4cJM1nd4pRhi62rnpWwN6UFgTosu X2xM1h/0sEHShatBDhNiKi5+u5qUjbQjBGcmZ0PnyhsttZXSOGA5MjXM4/EGj9bkWGsF 0CH0vsXRh1XZbDDF+UjVqxgm4hlY4lSfWTrneOoK4gCctF/pHhp4aLRw4dcW9y+HQ5gw eHfqQBoQsXfn6bEOSuDJ01pAAv1/SntXKKHnTKq+5m626zgqwg6NRylOPPMb/lNf2Y1x dSlf2aSStzhLpdCZBVWF+TgSVuR/b8WeHCKSQB4Y5uRsG3ZcR6le3d/Y7T/sXNJLvFwl YPJQ== X-Gm-Message-State: ALoCoQn52OVPC2xgS74BIMo75e84B5QgzRuNiwExA05LHMj0Gc+P5eO8sy4/4WkZxlQQsn64BKrW X-Received: by 10.50.29.9 with SMTP id f9mr15531541igh.39.1402796665435; Sat, 14 Jun 2014 18:44:25 -0700 (PDT) Received: from [10.0.0.119] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id p12sm8195827igx.18.2014.06.14.18.44.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 14 Jun 2014 18:44:24 -0700 (PDT) Sender: Warner Losh From: Warner Losh X-Google-Original-From: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: In tree builds broken in lib/ncurses? In-Reply-To: <20140615013057.GA66589@troutmask.apl.washington.edu> Date: Sat, 14 Jun 2014 19:44:29 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <5B8DE5E2-FC48-4B61-B759-7951821C72C3@gmail.com> References: <20140614201933.GA65847@troutmask.apl.washington.edu> <20140614221236.GA66187@troutmask.apl.washington.edu> <20140614223002.GB66187@troutmask.apl.washington.edu> <4610322.zAJlsEjG1I@overcee.wemm.org> <20140615013057.GA66589@troutmask.apl.washington.edu> To: Steve Kargl X-Mailer: Apple Mail (2.1878.2) Cc: freebsd-current@freebsd.org, Peter Wemm X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 01:44:27 -0000 On Jun 14, 2014, at 7:30 PM, Steve Kargl = wrote: > On Sat, Jun 14, 2014 at 03:38:58PM -0700, Peter Wemm wrote: >> On Saturday 14 June 2014 15:30:02 Steve Kargl wrote: >>> On Sat, Jun 14, 2014 at 03:12:36PM -0700, Steve Kargl wrote: >>>> On Sat, Jun 14, 2014 at 03:01:20PM -0700, Peter Wemm wrote: >>>>> On Saturday 14 June 2014 14:44:39 Steve Kargl wrote: >>>>>>=20 >>>>>> Is it possible to using profiling on FreeBSD-current? After >>>>>> installing >>>>>> libc_p.a, I try to build math/lapack. It dies with >>>>>>=20 >>>>>> /usr/local/bin/ld: //usr/lib/libc_p.a(sbrk.po): undefined = reference to >>>>>> symbol '_end' //lib/libc.so.7: error adding symbols: DSO missing = from >>>>>> command line collect2: error: ld returned 1 exit status >>>>>> *** Error code 1 >>>>>=20 >>>>> collect2? I think you've got something odd going on there.. >>>>=20 >>>> Maybe. math/lapack is built with gfortran, which is from >>>> lang/gcc47 on my system. lang/gcc47 is probably picking >>>> up the installed devel/binutils. This would explain the >>>> /usr/local/bin/ld instead of our /usr/bin/ld. libc_p.a is >>>> built with clang, so I'm probably running into yet-another >>>> clang vs gcc problem. >>>=20 >>> Where is the symbol _end suppose to come from? >>>=20 >>> Script started on Sat Jun 14 15:26:08 2014 >>> laptop-kargl:kargl[201] foreach i (/usr/lib/*.a) >>> foreach? echo $i >>> foreach? nm $i | grep 'U _end' >>> foreach? nm $i | grep 'T _end' >>> foreach? end >>> /usr/lib/libc.a >>> U _end >>=20 >> _end is a dynamic symbol that is synthesized by ld or linker scripts. = =20 >> Normally that would be /usr/bin/ld >>=20 >> peter@hub[10:35pm]~-110> grep _end = /usr/libdata/ldscripts/elf_x86_64_fbsd.x >> ... >> _end. Align after .bss to ensure correct alignment even if the >> _end =3D .; PROVIDE (end =3D .); >>=20 >> It used to be built into the a.out linker, but it's in the built-in = linker=20 >> scripts since the ELF switch. >>=20 >> Your problem isn't clang vs gcc or libc_p, it's /usr/local/bin/ld or = a linker=20 >> script the gfortran stuff is using. >>=20 >=20 > Thanks for the pointer. The problem appears to be /usr/local/bin/ld. > If I move it to ld.old and then symlink /usr/local/bin/ld to = /usr/bin/ld, > I can build math/lapack without a problem. I guess I'll poke around > in devel/bintuils. We don=92t support building the tree with any ld but the one in the = tree. However, having said that, if you can fix it, that would be = awesome. I=92d like to see our support expand to include latter-day = versions of binutils on all platforms to help with the eventual demise = of in-tree gcc... Warner=