From owner-freebsd-toolchain@freebsd.org Sun Dec 6 16:30:54 2015 Return-Path: Delivered-To: freebsd-toolchain@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 87E1D9A04EC for ; Sun, 6 Dec 2015 16:30:54 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BE7119D4 for ; Sun, 6 Dec 2015 16:30:54 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from kabini1.local (dynamic-216-186-213-32.knology.net [216.186.213.32] (may be forged)) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id tB6GUqA1024674 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sun, 6 Dec 2015 10:30:53 -0600 Subject: Re: mixed language link problems To: FreeBSD toolchain mailing list !!!! References: <56646257.4080605@hiwaay.net> From: "William A. Mahaffey III" Message-ID: <566462BC.90809@hiwaay.net> Date: Sun, 6 Dec 2015 10:36:22 -0553.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56646257.4080605@hiwaay.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2015 16:30:54 -0000 On 12/06/15 10:33, William A. Mahaffey III wrote: > > > I am using gcc5-devel to maintain some inhouse mixed-language (C++ > main & some lower stuff, *LOTTA* ANSI C, bits of FORTRAN77) program. I > am getting the following link errors trying to link up a fully static > version of the code to use on other machines which have minimal dev. > environments installed: > > > ar xv > /home/wam/V8/Cnx/test/junk/cart/unstaggered/bfc/pre/../lib/R4/opteron/libmaiPre.a > Main.o > x - Main.o > g++5 -o /usr/local/bin/PreBFCGL.opteron.TEST.static -static-libgcc > -Wl,-s,--allow-multiple-definition Main.o > -L/home/wam/V8/Cnx/test/junk/cart/unstaggered/bfc/pre/../ > lib/R4/opteron -L/home/wam/lib/R4 -L/usr/lib64/openmotif > -Wl,--start-group -lmaiPre -lPre -lPrecxx -lutils -lftndmp -lftnO2pre > -lftnO2 -lBC_Phi -license -Wl,--end-gr > oup -lMemIO -lMotif -lStdHash -lmpi -ltet -lgomp -lMrm -lXm -lXt -lGL > -lGLU -lGLw -lX11 -ljpeg -lpng -lz -lm -Bstatic -lgfortran && \rm -f > Main.o > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__getf2@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__addtf3@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__eqtf2@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__lttf2@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__gttf2@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__subtf3@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__divtf3@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__multf3@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__netf2@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__floatsitf@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__letf2@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__floatunditf@GCC_4.6.0' > /usr/local/lib/gcc5/gcc/x86_64-portbld-freebsd9.3/5.2.1/../../../libgfortran.so: > undefined reference to `__floatditf@GCC_4.6.0' > collect2: error: ld returned 1 exit status > 1 error > *** [/usr/local/bin/PreBFCGL.opteron.TEST.static] Error code 1 > (continuing) > `usual' not remade because of errors. > > > It looks to me like the gcc5 driver is looking in the wrong place for > some FORTRAN libraries, *OR* the operator forgot some link-time > incantations to make this work. This set of args works on another box > on my LAN, Linux, FC14 (soon to be updated to CentOS 6), Intel > compiler suite, FWIW. What do I need to do to get this to link ? TIA & > have a good one. > *Eeeeeeeeeek* always forget: [wam@devbox, TEST, 10:18:06am] 1654 % uname -a FreeBSD devbox 9.3-RELEASE-p30 FreeBSD 9.3-RELEASE-p30 #0: Mon Nov 2 10:11:50 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 [wam@devbox, TEST, 10:36:50am] 1655 % -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.