From owner-freebsd-toolchain@freebsd.org Sun Dec 6 16:29:21 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 088269A03D8 for ; Sun, 6 Dec 2015 16:29:21 +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 D199C192E for ; Sun, 6 Dec 2015 16:29:20 +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 tB6GTBgG023935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sun, 6 Dec 2015 10:29:12 -0600 To: FreeBSD toolchain mailing list !!!! From: "William A. Mahaffey III" Subject: mixed language link problems Message-ID: <56646257.4080605@hiwaay.net> Date: Sun, 6 Dec 2015 10:34:41 -0553.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; 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:29:21 -0000 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. -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.