From owner-freebsd-questions@FreeBSD.ORG Mon Sep 9 14:24:08 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 253B080C for ; Mon, 9 Sep 2013 14:24:08 +0000 (UTC) (envelope-from matthew@freebsd.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AF96129F5 for ; Mon, 9 Sep 2013 14:24:07 +0000 (UTC) Received: from ox-dell39.ox.adestra.com ([178.78.126.226]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.7/8.14.7) with ESMTP id r89ENt1e006661 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Mon, 9 Sep 2013 15:24:02 +0100 (BST) (envelope-from matthew@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.8.3 smtp.infracaninophile.co.uk r89ENt1e006661 Authentication-Results: smtp.infracaninophile.co.uk/r89ENt1e006661; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host [178.78.126.226] claimed to be ox-dell39.ox.adestra.com Message-ID: <522DD9FB.1050205@freebsd.org> Date: Mon, 09 Sep 2013 15:23:55 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130828 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: When statically linked Abort trap: 6 (core dumped) References: <1378729305.77647.YahooMailNeo@web161906.mail.bf1.yahoo.com> In-Reply-To: <1378729305.77647.YahooMailNeo@web161906.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.8 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00, DCC_CHECK, RDNS_NONE, SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2013 14:24:08 -0000 On 09/09/13 13:21, Unga wrote: > This is FreeBSD 9.1 on i386. > > My program works well without any issue when all libraries are dynamically linked. > > But when some libraries are statically link and run it develops: > Abort trap: 6 (core dumped) > > How I compile and link: > cc myprog.c -Wall -O \ > -L. -ls1 -ls2 \ > -lz -lm -lmd -lpthread \ > -o myprog > > > libs1.a and libs2.a are static libs. > > Any idea why? Not the foggiest, and we aren't going to be able to tell you anything sensible without a lot more detailed debugging information. I mean, between us we know a lot, but we are by no means omniscient. How about getting a back trace from the core file your program has produced? Cheers, Matthew