From owner-freebsd-current Wed May 8 17:45:44 2002 Delivered-To: freebsd-current@freebsd.org Received: from corbulon.video-collage.com (corbulon.video-collage.com [64.35.99.179]) by hub.freebsd.org (Postfix) with ESMTP id 7CD7A37B488; Wed, 8 May 2002 17:45:29 -0700 (PDT) Received: from misha.murex.com (250-217.customer.cloud9.net [168.100.250.217]) by corbulon.video-collage.com (8.12.2/8.12.2) with ESMTP id g490jR5D013349 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 8 May 2002 20:45:28 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) X-Authentication-Warning: corbulon.video-collage.com: Host 250-217.customer.cloud9.net [168.100.250.217] claimed to be misha.murex.com Content-Type: text/plain; charset="us-ascii" From: Mikhail Teterin Organization: Virtual Estates, Inc. To: questions@FreeBSD.org, current@FreeBSD.org Subject: does the order of .a files matter? Date: Wed, 8 May 2002 20:44:09 -0400 X-Mailer: KMail [version 1.4] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200205082044.09459.mi+mx@aldan.algebra.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello! I'm trying to port a huge application to FreeBSD. The app's build process creates over a hundred of static libraries (.a) and then tries to link them (and a few object files) into the executable. The process seems to work fine on the existing platforms (a number of Unixes and NT), but on FreeBSD I keep getting unresolved symbols. The most frustrating thing is, the number of such symbols varies greatly with the order, in which I list the libraries on the command line. Is not the linker supposed to make several runs over the given libraries if needed? Each .a is created "by the book": ar cq lib.a `lorder ${_OBJS} | tsort -q` ranlib lib.a and the executable creation is: cc ... -o ${_OBJS} ${_LIBS} ... It "almost" works, if I try to bypass the libraries completely and just link all of object files, but for the real application I hit the shell's limit on the number of arguments -- there are too many object files. Any suggestions? Thanks a lot! -mi P.S. This is on ``FreeBSD 5.0-CURRENT #2: Fri Apr 26 13:04:00 GMT 2002'' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message