From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13840 invoked by alias); 2 Feb 2014 01:33:02 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 13823 invoked by uid 89); 2 Feb 2014 01:33:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.9 required=5.0 tests=AWL,BAYES_50,FORGED_YAHOO_RCVD,FREEMAIL_FROM,URI_HEX autolearn=no version=3.3.2 X-HELO: sam.nabble.com Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sun, 02 Feb 2014 01:33:00 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1W9lvd-00079n-RK for gcc-help@gcc.gnu.org; Sat, 01 Feb 2014 17:32:57 -0800 Date: Sun, 02 Feb 2014 01:33:00 -0000 From: ken72cc To: gcc-help@gcc.gnu.org Message-ID: <1391304777840-1007813.post@n5.nabble.com> Subject: Gfortran: trouble creating statically link executable MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2014-02/txt/msg00002.txt.bz2 I'm trying to create a standalone executable that will run on a system w/o fortran installed. Spent the entire morning and cannot figure out how to do it. If I try the following, I get an error message that the lapack library can't be found even though the static libraries exist in the specified directory. Does -Wl-R somehow not work for static libraries? It know it works for shared libraries. [guest@T61 DGELS_Lib]$ gfortran -o dgels3 TestDGELS_2.f -static -Wl,-R/usr/lib64/atlas-sse3 -llapack -lf77blas /usr/bin/ld: cannot find -llapack collect2: ld returned 1 exit status [guest@T61 DGELS_Lib]$ ls -l /usr/lib64/atlas-sse3/liblapack.a /usr/lib64/atlas-sse3/libf77blas.a -rw-r--r--. 1 root root 562242 Mar 20 2012 /usr/lib64/atlas-sse3/libf77blas.a -rw-r--r--. 1 root root 9639442 Mar 20 2012 /usr/lib64/atlas-sse3/liblapack.a What am I doing wrong? Ken -- View this message in context: http://gcc.1065356.n5.nabble.com/Gfortran-trouble-creating-statically-link-executable-tp1007813.html Sent from the gcc - Help mailing list archive at Nabble.com.