From owner-freebsd-current@freebsd.org Mon May 30 19:51:18 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F718B559DF for ; Mon, 30 May 2016 19:51:18 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 85E6C1BA5; Mon, 30 May 2016 19:51:18 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id u4UJpHew094127 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 May 2016 12:51:17 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id u4UJpHg9094126; Mon, 30 May 2016 12:51:17 -0700 (PDT) (envelope-from sgk) Date: Mon, 30 May 2016 12:51:16 -0700 From: Steve Kargl To: Dimitry Andric Cc: freebsd-current@freebsd.org Subject: Re: Recent seems to have broken toolchain Message-ID: <20160530195116.GA93546@troutmask.apl.washington.edu> References: <20160529022702.GA57282@troutmask.apl.washington.edu> <1EF864CF-12E8-4A48-B6E9-317D438B7B7C@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1EF864CF-12E8-4A48-B6E9-317D438B7B7C@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Tue, 31 May 2016 10:57:34 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 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: Mon, 30 May 2016 19:51:18 -0000 On Mon, May 30, 2016 at 09:29:40PM +0200, Dimitry Andric wrote: > On 29 May 2016, at 04:27, Steve Kargl wrote: > > > > I have a Fortran application that has built forever on FreeBSD-current; > > that is, until recently. It now dies with the following error: > > > > gfortran48 -O2 -pipe -march=native -mtune=native -static -funroll-loops \ > > --param max-unroll-times=4 -ftree-vectorize -Wall\ > > -rpath /usr/local/lib/gcc48 -I/home/kargl/modules -o acolor acolor.f90 \ > > globalm.o saxm.o -L/home/kargl/lib -L. -L/usr/local/lib -L. -ltgt -loa \ > > -L/home/kargl/lib -L. -L/usr/local/lib -lm90 -llapack -lblas > > ./liboa.a(pointm.o): In function `__pointm_MOD_l2norm2': > > pointm.f90:(.text+0x490): multiple definition of `__pointm_MOD_l2norm2' > > /home/kargl/lib/libtgt.a(pointm.o):pointm.f90:(.text+0x0): first defined here > > > > Yes, pointm.o is in both libtgt.a and liboa.a. In the past, during > > linking, the symbols are resolved from the first of -ltgt or -loa > > depending on the order on the command line. > > If you run the above command line with -v, what linker does it use? I > suspect this may be something caused by a newer binutils port, or even > by a newer gfortran. > > If this is using /usr/local/bin/ld, you might want to try downgrading > your binutils. > It happens with both /usr/bin/ld and /usr/local/bin/ld. I remove the binutils port and still had the issue. I tried reverting recent changes to elftoolchain/libelftc, the resulting tree would not build. For the record, % /usr/bin/ld -v GNU ld 2.17.50 % /usr/local/bin/ld -v GNU ld (GNU Binutils) 2.25.1 I forgot to note that the problem does not occur for amd64 FreeBSD at r299122. Unfortunately, I won't have time until the end of the week to try to bisect the src tree (which is going to be a monumental pain with keeping everything in sync). As a workaround, I have added -Wl,--allow-multiple-definition to the compiler options for gfortran48. -- Steve